Invoice Number: {{ $invoice->slug }}
Date: {{ $invoice->created_at->format('d M Y') }}
Guest Name: {{ $invoice->guest->name }}
Contact: {{ $invoice->guest->phone }}
@if ($invoice->booking) @php $checkIn = \Carbon\Carbon::parse($invoice->booking->check_in_date); $checkOut = \Carbon\Carbon::parse($invoice->booking->check_out_date); $nights = $checkIn->diffInDays($checkOut); $room = $invoice->booking->room; $roomType = $room->roomType; $roomRate = $roomType->base_price; $roomTotal = $nights * $roomRate; $roomTax = $roomTotal * 0.18; $roomCgst = $roomTax / 2; $roomSgst = $roomTax / 2; @endphpRoom: {{ $room->room_number }} ({{ $roomType->name }})
Check-in: {{ $checkIn->format('d M Y') }}
Check-out: {{ $checkOut->format('d M Y') }}
Nights: {{ $nights }}
@endif# | Item | Type | Qty | Rate | Amount | CGST | SGST | Total |
---|---|---|---|---|---|---|---|---|
{{ $i++ }} | Room Rent | Room | {{ $nights }} | {{ number_format($roomRate, 2) }} | {{ number_format($roomTotal, 2) }} | {{ number_format($roomCgst, 2) }} | {{ number_format($roomSgst, 2) }} | {{ number_format($total, 2) }} |
{{ $i++ }} | {{ $item->item->name }} | {{ ucfirst($item->item->type) }} | {{ $item->quantity }} | {{ number_format($item->unit_price, 2) }} | {{ number_format($amount, 2) }} | {{ number_format($cgst, 2) }} | {{ number_format($sgst, 2) }} | {{ number_format($total, 2) }} |
Subtotal | {{ number_format($subTotal, 2) }} | {{ number_format($cgstTotal, 2) }} | {{ number_format($sgstTotal, 2) }} | {{ number_format($grandTotal, 2) }} |