@extends('layout.erp.app') @section('title', 'Show Order') @section('page')
Order Invoice From:
  • Invoice: NO-100{{ $order->id }}
  • Phone: 01793 956 777
  • Email: mdaslamcric@gmail.com
Invoice To:
  • Customer Name: {{ optional($order->customers)->name }}
  • Address: {{ optional($order->customers)->address }}
  • Email: {{ optional($order->customers)->email }}
@php $total = 0; $total_discount = 0; @endphp @foreach ($orderdetails as $orderdetail) @php $subtotal = $orderdetail->price * $orderdetail->qty - $orderdetail->discount; $total += $subtotal; $total_discount += $orderdetail->discount; @endphp @endforeach @php $tax = $total * 0.05; $grandTotal = $total + $tax - $total_discount; @endphp
SL Product Qty Price Discount Subtotal
{{ $loop->iteration }} {{ optional($orderdetail->products)->name }} {{ $orderdetail->qty }} {{ number_format($orderdetail->price, 2) }} {{ number_format($orderdetail->discount, 2) }} {{ number_format($subtotal, 2) }}
Total {{ number_format($total, 2) }}
Tax (5%) {{ number_format($tax, 2) }}
Total Discount {{ number_format($total_discount, 2) }}
Grand Total {{ number_format($grandTotal, 2) }}
@endsection @section('script') @endsection