@php use Carbon\Carbon; @endphp
@if(isset($data->bannerUrl) && $data->bannerUrl != "") @endif

Customer Copy
@if(isset($data->invoiceNo)) Invoice - {{$data->invoiceNo}} @endif @if(isset($data->createdDate)) Date - {{dateFormatter($data->createdDate)}} @endif
@if(isset($data->customer->admission->bed->bedNo)) @endif {{-- --}} {{-- @if(isset($data->customer->billToContact))--}} {{-- --}} {{-- --}} {{-- --}} {{-- @endif --}} {{-- --}}
Name : @if(isset($data->customer)) {{$data->customer->name}}  @if (isset($data->customer->patientAnimal->species)) ({{$data->customer->patientAnimal->species}}) @endif (Reg- {{$data->customer->registrationNo}} ) @endif
@if(isset($data->qrCode)) Invoice No @endif
Age : @if(isset($data->customer)) {{\Carbon\Carbon::parse($data->customer->dob)->startOfDay()->diff(\Carbon\Carbon::now())->format('%yY %mM %dD')}}   Sex: @if(isset($data->customer)) {{$data->customer->gender}} @endif @endif
Phone : @if(isset($data->customer)) {{$data->customer->mobileNo}} @endif
Referred By : @if(isset($data->referredBy)) {{$data->referredBy}} @endif
Cabin No : {{$data->customer->admission->bed->bedNo}}
Bill to Contact:--}} {{-- {{$data->customer->billToContact->name}} --}} {{-- ( Reg-{{$data->customer->billToContact->billToRegistrationNo}} )--}} {{--
@foreach($data->groupedMap as $index => $list)

@if($list[0] == "MEDICINE") @endif @if($list[0] == "MEDICINE") @endif @if($list[0] === "INVESTIGATION") @endif @if($list[0] == "MEDICINE") @endif @if($list[0] == "MEDICINE") @endif @if($list[0] === "INVESTIGATION") @endif @if($list[0] === "INVESTIGATION") @endif @if($list[0] != "MEDICINE" && $list[0] != "INVESTIGATION") @endif @if($list[0] == "MEDICINE") @endif @php $total = 0; @endphp @foreach($list[1] as $i => $item) @if(isset($item->unitPrice) && $list[0] == "MEDICINE") @endif @if(isset($item->discountRate) && $list[0] == "MEDICINE") @endif @if($list[0] === "INVESTIGATION") @endif @if($list[0] === "INVESTIGATION") @endif @if(isset($item->saleAmount) && $list[0] == "MEDICINE") @endif @if(isset($item->quantity) && $list[0] == "MEDICINE") @endif @if($list[0] === "INVESTIGATION") @endif @if($list[0] != "MEDICINE" && $list[0] != "INVESTIGATION") @endif @if($list[0] == "MEDICINE") @endif @php $total += $item->netSales; @endphp @endforeach
{{capitalizeFirstChar($list[0])}}
Sl NameRateDiscount(%)Delivery TimePriceQuantityRoom NoTotalTotalTotal
{{$i+1}} @if(isset($item->productItem->name)) {{$item->productItem->name}} @else {{$item->itemName}} @endif {{number_format($item->unitPrice, 2), 2}}{{number_format($item->discountRate, 2)}} @if(isset($item->productItem->deliveryTime) && isset($item->productItem->deliveryUom)) {{getDeliveryTime($item->productItem->deliveryTime, $item->productItem->deliveryUom, $data->createdDate)->format('d-M g:i A')}} @endif @if(isset($item->productItem->sampleCollectionRoom)) {{$item->productItem->sampleCollectionRoom}} @endif {{number_format($item->saleAmount, 2)}}{{$item->quantity}}{{number_format($item->netSales, 2), 2}}{{number_format($item->netSales, 2), 2}}{{number_format($item->netSales, 2), 2}}
Sub Total of {{capitalizeFirstChar($list[0])}} : {{number_format($total, 2), 2}}
@if (count($data->groupedMap)-1 != $index)
@endif @endforeach

@foreach($data->billingPaymentDetails as $index => $item) @endforeach
Payment Mode Transaction No Amount
{{capitalizeFirstChar($item->paymentMethod)}} {{$item->transactionId}} {{$item->payAmount}}
Grand Total : {{number_format($data->totalSaleAmount, 2), 2}}
Discount Amount : {{number_format($data->totalDiscountAmount, 2), 2}}
Total : {{number_format($data->totalSaleAmount - $data->totalDiscountAmount, 2), 2}}
Paid : {{number_format($data->totalCashAmount + $data->totalCardAmount + $data->totalMFSAmount, 2), 2}}
Due : {{number_format($data->totalDue, 2), 2}}
Return : {{number_format($data->totalReturn, 2), 2}}
@foreach($data->deptWiseProducts as $index => $unCatList)

 


@if(isset($data->invoiceNo)) Invoice - {{$data->invoiceNo}} @endif @if(isset($data->createdDate)) Date - {{dateFormatter($data->createdDate)}} @endif
@if(isset($data->customer->admission->bed->bedNo)) @endif {{-- --}} {{-- @if(isset($data->customer->billToContact))--}} {{-- --}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- --}}
Name : @if(isset($data->customer)) {{$data->customer->name}}  @if (isset($data->customer->patientAnimal->species)) ({{$data->customer->patientAnimal->species}}) @endif (Reg- {{$data->customer->registrationNo}} ) @endif
@if(isset($data->qrCode)) Invoice No @endif
Age : @if(isset($data->customer)) {{\Carbon\Carbon::parse($data->customer->dob)->startOfDay()->diff(\Carbon\Carbon::now())->format('%yY %mM %dD')}}   Sex: @if(isset($data->customer)) {{$data->customer->gender}} @endif @endif
Phone : @if(isset($data->customer)) {{$data->customer->mobileNo}} @endif
Referred By : @if(isset($data->referredBy)) {{$data->referredBy}} @endif
Cabin No : {{$data->customer->admission->bed->bedNo}}
Bill to Contact:--}} {{-- {{$data->customer->billToContact->name}} --}} {{-- ( Reg-{{$data->customer->billToContact->billToRegistrationNo}} )--}} {{--

@php $total = 0; @endphp @php $totalDiscount = 0; @endphp @foreach($unCatList->products as $i => $item) @php $total += $item->totalSalesAmount; @endphp @php $totalDiscount += ($item->totalSalesAmount * $item->overAllDiscountPercentage) /100; @endphp @endforeach
{{capitalizeFirstChar($unCatList->name)}}
Sl Name Delivery Time Room No Total
{{$i+1}} {{$item->productItem->name}} ({{$item->sampleCollectSite}}) @if(isset($item->productItem->deliveryTime)) {{getDeliveryTime($item->productItem->deliveryTime, $item->productItem->deliveryUom, $data->createdDate)->format('d-M g:i A')}} @endisset {{$item->productItem->sampleCollectionRoom}} {{number_format($item->totalSalesAmount , 2), 2}}
@foreach($data->groupedMap as $index => $list) @if (count($data->groupedMap)-1 != $index)
@endif @endforeach
Sub Total of {{capitalizeFirstChar($unCatList->name)}} : {{number_format($total, 2), 2}}
Discount Amount : {{number_format($totalDiscount, 2), 2}}
Total : {{number_format($total - $totalDiscount, 2), 2}}
@endforeach
Printed By - {{$data->createdBy}}
Print Date & Time - {{ now()->timezone('Asia/Dhaka')->format('d-M-Y g:i A') }}    Powered By - {{$data->poweredBy}}