@foreach($orders as $order)
@php
$mark = $order->markList ?? null;
$invoice = $order->invoice ?? null;
$shipment = $order->shipments->first() ?? null;
$invoiceStatus = strtolower($invoice->status ?? '');
$shipmentStatus = strtolower(str_replace('_', ' ', $shipment->status ?? ''));
@endphp
| {{ $order->order_id ?? '-' }} |
{{ $shipment->shipment_id ?? '-' }} |
{{ $mark->customer_id ?? '-' }} |
{{ $mark->company_name ?? '-' }} |
{{ $mark->origin ?? $order->origin ?? '-' }} |
{{ $mark->destination ?? $order->destination ?? '-' }} |
{{ $order->created_at ? $order->created_at->format('d-m-Y') : '-' }} |
{{ $invoice->invoice_number ?? '-' }} |
{{ $invoice?->invoice_date ? date('d-m-Y', strtotime($invoice->invoice_date)) : '-' }}
|
{{ $invoice?->final_amount ? '₹'.number_format($invoice->final_amount, 2) : '-' }}
|
{{ $invoice?->final_amount_with_gst ? '₹'.number_format($invoice->final_amount_with_gst, 2) : '-' }}
|
@if($invoice?->status)
{{ ucfirst($invoice->status) }}
@else
Pending
@endif
|
@if($shipment?->status)
{{ ucfirst($shipmentStatus) }}
@else
Pending
@endif
|
|
@endforeach