Blue Ocean Residency

45 Beach Road, Chennai - 600002
GSTIN: 33ABCDE1234F1Z5
Phone: +91 98765 43210


@php $bill = $billDetails[0] ?? null; // print_r($billHeader); @endphp @if($bill)
Guest Information
Name:
{{ $billHeader->billing_name ?? 'N/A' }}
Room No:
{{ $billHeader->roomno ?? '-' }}
Check-In:
{{ $billHeader->checkindate ?? '-' }}
Check-Out:
{{ $billHeader->checkoutdate ?? '-' }}
Staying Days:
{{ $billHeader->dayscount ?? '-' }}
Bill Details
Bill No:
{{ $billHeader->billno ?? '-' }}
Date:
{{ $billHeader->billingdate ?? '-' }}
GST No:
{{ $billHeader->gstno ?? '-' }}
@endif
Room & Other Charges
@php $chargeTotal = 0; $AdvanceTotal = 0; $DiscountTotal = 0; $RefundTotal = 0; $i = 1; @endphp {{-- ROOM / CHARGES --}} @foreach($billDetails as $item) @if($item->definetype != 'TAX') {{-- Accumulate totals based on type --}} @php switch($item->definetype){ case 'CHARGES': $chargeTotal += $item->amount; break; case 'ADVANCE': $AdvanceTotal += $item->amount; break; case 'DISCOUNT': case 'BILL DISCOUNT': $DiscountTotal += $item->amount; break; case 'REFUND': $RefundTotal += $item->amount; break; } @endphp @endif @endforeach {{-- Totals --}} @if($AdvanceTotal !=0) @endif @if($DiscountTotal !=0) @endif @if($RefundTotal !=0) @endif
# Particulars HSN Code Days Rate (₹) Amount (₹)
{{ $i++ }} {{ $item->chargename }} @if(!empty($item->planname))
{{ $item->planname }} - {{ $item->foodplancode }} @endif
{{ $item->hsncode ?? '-' }} {{ $item->chargeqty > 0 ? $item->chargeqty : '' }} {{ number_format($item->chargerate, 2) }} {{ number_format($item->amount, 2) }}
Sub Total ₹{{ $chargeTotal > 0 ? number_format($chargeTotal, 2) : 0 }}
Advance ₹{{ $AdvanceTotal > 0 ? number_format($AdvanceTotal, 2) : 0 }}
Discount ₹{{ $DiscountTotal > 0 ? number_format($DiscountTotal, 2) : 0 }}
Refund ₹{{ $RefundTotal > 0 ? number_format($RefundTotal, 2) : 0 }}
Receivable ₹{{ number_format($chargeTotal - $AdvanceTotal - $DiscountTotal - $RefundTotal, 2) }}