@extends('layouts.app') @section('title', 'Booking Details · ' . $booking->booking_no) @section('content') @php $item = $booking->items->first(); $payment = $booking->payments; $advance = (float) ($payment?->advance_amount ?? 0); $balance = max(0, (float) $booking->grand_total - $advance); @endphp

{{ $booking->booking_no }}

@if($booking->status === 'Confirmed') Confirmed @else Pending @endif

Booked on {{ date('d M, Y', strtotime($booking->booking_date)) }}

Customer Details

{{ $booking->customer?->name ?? $booking->customer_name }}

Mobile: {{ $booking->mobile ?: '-' }}

Address: {{ $booking->address ?: '-' }}

Job Information

{{ $booking->job_name }}

@if($item?->product_name) Product: {{ $item->product_name }} @endif Qty: {{ $item?->quantity ?? 1 }}
@if($booking->printJob) @endif

Payment Summary

Grand Total
₹{{ number_format($booking->grand_total, 2) }}
Paid ({{ $payment?->payment_mode ?? '-' }})
₹{{ number_format($advance, 2) }}
Balance Due
₹{{ number_format($balance, 2) }}
Discount / GST
₹{{ number_format($booking->discount, 2) }} / {{ $booking->gst_percentage }}%
@endsection