@php use Carbon\Carbon; @endphp
@if(isset($data->bannerUrl) && $data->bannerUrl != "") @endif
Name : @if(isset($data->customerModel->patient->dob)) {{$data->customerModel->patient->name}} @endif Reg : @if(isset($data->customerModel->patient->registrationNo)) {{$data->customerModel->patient->registrationNo}} @endif
Gender : @if(isset($data->customerModel->patient->gender)) {{$data->customerModel->patient->gender}} @endif Age : @if(isset($data->customerModel->patient->dob)) {{\Carbon\Carbon::parse($data->customerModel->patient->dob)->diff(\Carbon\Carbon::now())->format('%y Years, %m Months')}} @endif
Admission Date : @if(isset($data->customerModel->admissionDate)) {{dateFormatter($data->customerModel->admissionDate)}} @endif Admission ID : @if(isset($data->customerModel->admissionId)) {{($data->customerModel->admissionId)}} @endif
Bed/Cabin : @if(isset($data->customerModel->bed->bedNo)) {{($data->customerModel->bed->bedNo)}} @endif

Consolidate Billing Summary

{{-- summary section end--}}
@if($data->netPayable > 0) Draft @else Paid @endif
@if($data->netPayable >= 0) @endif @if($data->netPayable < 0) @endif
Total Bill Amount : {{number_format($data->totalBillAmount, 2), 2}}
Discount Amount : {{number_format($data->totalDiscountAmount, 2), 2}}
Net Bill Amount : {{number_format($data->netBillAmount, 2), 2}}
Paid Amount : {{number_format($data->paidAmount, 2), 2}}
Deposit Amount : {{number_format($data->depositAmount, 2), 2}}
Payable : {{number_format($data->netPayable, 2), 2}}
Return : {{number_format($data->returnAmount, 2), 2}}


{{-- summary section end--}}
Category Wise Summary
@foreach($data->consolidateList as $index => $item) @endforeach
SL Revenue Head Amount
{{$index + 1}} {{capitalizeFirstChar($item->billingType)}} {{number_format($item->amount, 2), 2}}
Zone Total: {{number_format($data->totalBillAmount, 2), 2}}


Category Wise Details
@foreach($data->billingDetails as $billingType => $items) {{-- Category Header --}} @php $sl = 1; $categoryTotal = 0; @endphp @foreach($items as $item) @php $categoryTotal += $item->netSales; @endphp @endforeach {{-- Category Total --}} @endforeach
SL Item Name Qty Unit Price Discount Net Amount
{{ ucfirst(strtolower($billingType)) }}
{{ $sl++ }} {{ $item->itemName }} {{ $item->quantity }} {{ number_format($item->unitPrice, 2) }} {{ number_format($item->discountAmount, 2) }} {{ number_format($item->netSales, 2) }}
{{ ucfirst(strtolower($billingType)) }} Total : {{ number_format($categoryTotal, 2) }}
{{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- user {{$data->createdBy}}--}} {{--
--}}
D&T - {{ now()->timezone('Asia/Dhaka')->format('d-M-Y g:i A') }}    Powered By - {{$data->poweredBy}}  {PAGENO}/{nbpg}