@php $subtotalWithoutTax = (float) ($summary['subtotal_without_tax'] ?? $orders->sum(fn ($o) => (float) ($o->grand_total ?? 0) - (float) ($o->service_charges ?? 0) - (float) ($o->pra_tax ?? 0) - (float) ($o->gst_tax ?? 0))); $serviceCharges = (float) ($summary['service_charges'] ?? $orders->sum(fn ($o) => (float) ($o->service_charges ?? 0))); $gstTax = (float) ($summary['gst_tax'] ?? $orders->sum(fn ($o) => (float) ($o->gst_tax ?? 0))); $praTax = (float) ($summary['pra_tax'] ?? $orders->sum(fn ($o) => (float) ($o->pra_tax ?? 0))); $grandTotal = (float) ($summary['grand_total'] ?? $orders->sum(fn ($o) => (float) ($o->grand_total ?? 0))); $todayServiceCharges = (float) ($summary['today_service_charges'] ?? $serviceCharges); $todayPraTax = (float) ($summary['today_pra_tax'] ?? $praTax); @endphp
@include('print.partials.print-report-branding')

Order Sales Report

From: {{ $startOfDay->format('d M Y, h:i A') }} — To: {{ $endOfDay->format('d M Y, h:i A') }}

Subtotal (Excl. Tax & Service)
Rs {{ number_format($subtotalWithoutTax, 2) }}
Without Service & PRA Tax ({{ number_format($orders->count()) }} Orders)
Service (7%)
Rs {{ number_format($serviceCharges, 2) }}
Today's Service (7%): Rs {{ number_format($todayServiceCharges, 2) }}
PRA Tax (8%)
Rs {{ number_format($praTax, 2) }}
Today's PRA (8%): Rs {{ number_format($todayPraTax, 2) }}
Grand Total (Incl. Tax)
Rs {{ number_format($grandTotal, 2) }}
Including Service (7%) & PRA (8%)
@foreach ($orders as $index => $order) @php $rowGst = (float) ($order->gst_tax ?? 0); $rowPra = (float) ($order->pra_tax ?? 0); $rowService = (float) ($order->service_charges ?? 0); $rowGrand = (float) ($order->grand_total ?? 0); $rowSubExclTax = $rowGrand - $rowService - $rowPra - $rowGst; @endphp @endforeach
# Order # Type Status Subtotal (Excl. Tax & Service) Service (7%) GST Tax PRA Tax (8%) Grand Total Order Date Comments
{{ $index + 1 }} #{{ $order->id }} {{ ucfirst(str_replace('_', ' ', $order->order_type)) }} {{ ucfirst($order->status) }} Rs {{ number_format($rowSubExclTax, 2) }} Rs {{ number_format($rowService, 2) }} Rs {{ number_format($rowGst, 2) }} Rs {{ number_format($rowPra, 2) }} Rs {{ number_format($rowGrand, 2) }} {{ $order->created_at?->format('d M Y h:i A') }} {{ $order->comments ?: '—' }}
Totals: Rs {{ number_format($subtotalWithoutTax, 2) }} Rs {{ number_format($serviceCharges, 2) }} Rs {{ number_format($gstTax, 2) }} Rs {{ number_format($praTax, 2) }} Rs {{ number_format($grandTotal, 2) }}