Invoice | 
                
                     Invoice No 56677 Date: {{ $month_name }} {{ $year }}  | 
            
| Seller | Buyer | |
|---|---|---|
| 
                     Toyo Address: No. F/S-14, Bayintnaung Road, Kamaryut Township, Yangon, Myanmar Phone: +(95-9) 4200 775 07  | 
                
                     {{ $merchant->name ?? '-' }} Phone: {{ $merchant->phone_number ?? '-' }} Address: {{ $merchant->address->address ?? '-' }}  | 
            
| Date | Order Id | Product | Unit Price | Quantity | Price | 
|---|
| {{ Carbon\Carbon::parse($order->created_at)->format('d-m-Y') }} | {{ $order->id }} | @foreach ($order->orderDetails as $key =>$order_details) @php $total += $order_details->price * $order_details->quantity; @endphp @if($key == 0) {{-- @if($key>0)@endif --}} | {{ $order_details->product->model ?? '-' }} | {{ number_format($order_details->price ?? '-')}} | {{ $order_details->quantity ?? '-'}} | {{ number_format($order_details->price * $order_details->quantity ?? '-') }} | @else @php $lastOrders[] = $order_details; @endphp @endif @endforeach|
| {{ $order_details->product->model ?? '-' }} | {{ number_format($order_details->price ?? '-') }} | {{ $order_details->quantity ?? '-'}} | {{ number_format($order_details->price * $order_details->quantity ?? '-') }} | ||||
| Total Amount | {{ number_format($total) }} | ||||||
| Total Purchased Products | 
|---|
| No. | Product | Quantity | Total Price | 
|---|
| {{ $index+1 }} | {{ $purchase->product->model }} | {{ $purchase->qty }} | {{ number_format($purchase->total_price) }} | |
| Total Amount | {{ number_format($total_product_sold) }} | |||