@if(isset($data->bannerUrl) && $data->bannerUrl != "") @endif
Sales Report
Date Range: {{$data->fromDate}} To {{$data->toDate}}
@php $groupedData = $data->groupedData ?? []; $grandTotalCashReceived = $data->grandTotalCashReceived ?? 0; $grandTotalCashRefund = $data->grandTotalCashRefund ?? 0; $grandTotalNetAmount = $data->grandTotalNetAmount ?? 0; @endphp @foreach($groupedData as $dateIndex => $dateGroup) @php $dateRowSpan = 0; if(isset($dateGroup->patientGroups)) { foreach($dateGroup->patientGroups as $patientGroup) { if(isset($patientGroup->smccGroups)) { foreach($patientGroup->smccGroups as $smccGroup) { if(isset($smccGroup->items)) { $dateRowSpan += count($smccGroup->items); } } } } } @endphp @if(isset($dateGroup->patientGroups)) @foreach($dateGroup->patientGroups as $patientIndex => $patientGroup) @php $patientRowSpan = 0; if(isset($patientGroup->smccGroups)) { foreach($patientGroup->smccGroups as $smccGroup) { if(isset($smccGroup->items)) { $patientRowSpan += count($smccGroup->items); } } } @endphp @if(isset($patientGroup->smccGroups)) @foreach($patientGroup->smccGroups as $smccIndex => $smccGroup) @php $smccRowSpan = isset($smccGroup->items) ? count($smccGroup->items) : 0; @endphp @if(isset($smccGroup->items)) @foreach($smccGroup->items as $itemIndex => $item) @if($smccIndex === 0 && $itemIndex === 0) @endif @if($itemIndex === 0) @endif @endforeach @endif @endforeach @endif @endforeach @endif @endforeach
Date Patient Name Reg No Mobile No Branch Sub-Branch Location Type Community Category Item Name Qty Cash Received Cash Refund Net Amount
{{ $dateGroup->date ?? '' }} {{ $patientGroup->patientName ?? '' }} {{ $patientGroup->registrationNo ?? '' }} {{ $patientGroup->mobileNo ?? '' }}{{ $smccGroup->branchName ?? '' }} {{ $smccGroup->subBranchName ?? '' }} {{ $smccGroup->locationType ?? '' }} {{ $smccGroup->location ?? '' }}{{$item->category ?? ''}} {{$item->itemName ?? ''}} {{number_format($item->quantity ?? 0, 0)}} {{number_format($item->cashReceived ?? 0, 2)}} {{number_format($item->cashRefund ?? 0, 2)}} {{number_format($item->netAmount ?? 0, 2)}}
Grand Total: {{number_format($grandTotalCashReceived, 2)}} {{number_format($grandTotalCashRefund, 2)}} {{number_format($grandTotalNetAmount, 2)}}