Glass Name: {{ $glassName }}  |  {{ number_format($data->count()) }} bill(s)
@if($data->isEmpty())
No sale bills found for this glass name in the selected date range.
@else @foreach($data as $index => $row) @php $subTotal = (float) ($row->SubTotal ?? 0); $advance = (float) ($row->Advance ?? 0); $balance = (float) ($row->NetAmount ?? 0); $totalPaid = $subTotal - $balance; @endphp @endforeach
# Bill No Sale Date Patient Name Mobile No Sub Total Advance Total Paid Balance Payment Mode Delivery Date
{{ $index + 1 }} {{ $row->BillNo }} {{ date('d/m/Y', strtotime(str_replace('-', '/', $row->SaleDate))) }} {{ $row->PatientName }} {{ $row->MobileNo }} ₹{{ number_format($subTotal, 2) }} ₹{{ number_format($advance, 2) }} ₹{{ number_format($totalPaid, 2) }} ₹{{ number_format($balance, 2) }} {{ $row->PayMode }} @if(!empty($row->DeliveryDate)) {{ date('d/m/Y', strtotime(str_replace('-', '/', $row->DeliveryDate))) }} @endif
Total ₹{{ number_format($totalSubTotal, 2) }} ₹{{ number_format($totalAdvance, 2) }} ₹{{ number_format($totalPaid, 2) }} ₹{{ number_format($totalBalance, 2) }}
@endif