@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) @if(isset($dateGroup->patientGroups)) @foreach($dateGroup->patientGroups as $patientIndex => $patientGroup) @if(isset($patientGroup->smccGroups)) @foreach($patientGroup->smccGroups as $smccIndex => $smccGroup) @if(isset($smccGroup->items)) @foreach($smccGroup->items as $itemIndex => $item) @endforeach @endif @endforeach @endif @endforeach @endif @if($dateIndex < count($groupedData) - 1) @endif @endforeach
Date Patient Name Reg No Mobile No Branch Sub-Branch Location Location Type Category Item Name Qty Cash Received Cash Refund Net Amount
{{ ($patientIndex === 0 && $smccIndex === 0 && $itemIndex === 0) ? ($dateGroup->date ?? '') : '' }} {{ ($smccIndex === 0 && $itemIndex === 0) ? ($patientGroup->patientName ?? '') : '' }} {{ ($smccIndex === 0 && $itemIndex === 0) ? ($patientGroup->registrationNo ?? '') : '' }} {{ ($smccIndex === 0 && $itemIndex === 0) ? ($patientGroup->mobileNo ?? '') : '' }} {{ ($itemIndex === 0) ? ($smccGroup->branchName ?? '') : '' }} {{ ($itemIndex === 0) ? ($smccGroup->subBranchName ?? '') : '' }} {{ ($itemIndex === 0) ? ($smccGroup->location ?? '') : '' }} {{ ($itemIndex === 0) ? ($smccGroup->locationType ?? '') : '' }} {{$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)}}
Patient Total: {{number_format($patientGroup->patientTotalCashReceived ?? 0, 2)}} {{number_format($patientGroup->patientTotalCashRefund ?? 0, 2)}} {{number_format($patientGroup->patientTotalNetAmount ?? 0, 2)}}
Date Total: {{number_format($dateGroup->dateTotalCashReceived ?? 0, 2)}} {{number_format($dateGroup->dateTotalCashRefund ?? 0, 2)}} {{number_format($dateGroup->dateTotalNetAmount ?? 0, 2)}}
Grand Total: {{number_format($grandTotalCashReceived, 2)}} {{number_format($grandTotalCashRefund, 2)}} {{number_format($grandTotalNetAmount, 2)}}