@php // Assume $booking, $details, $payments, $member, $voucher are passed to this view // Fetch all banks for lookup $banks = \DB::table('Luv2_bank')->pluck('name', 'code'); function paymentTypeName($type) { return match($type) { 'B' => 'Bank', 'C' => 'Credit', 'O' => 'Onsite', 'S' => 'Saldo', default => $type, }; } @endphp Payment Receipt - {{ $booking->no ?? 'Booking' }}
{{ $booking->qty ?? '1' }} x {{ $details->first()->name ?? 'Package' }} / {{ $booking->date ?? 'Booking Date' }}
ODYSSEYS
SURFPAYMENT
SCHOOLRECEIPT
Your Details
Name
{{ $member->name ?? 'Guest' }}
Email
{{ $member->email ?? '-' }}
Order Details
Booking No {{ $booking->no ?? '-' }}
Date {{ $booking->date ?? '-' }}
Status {{ ucfirst($booking->status ?? 'New') }}
Package Details
@foreach($details as $d) @endforeach
Code Name Price Qty Nett
{{ $d->code }} {{ $d->name }} {{ number_format($d->price, 0, ',', '.') }} {{ $d->qty }} {{ number_format($d->nett, 0, ',', '.') }}
Summary
Total Gross {{ number_format($booking->gross, 0, ',', '.') }}
Total Discount {{ number_format($booking->disc, 0, ',', '.') }}
Discount % {{ number_format($booking->discp, 2) }}%
Total Nett {{ number_format($booking->nett, 0, ',', '.') }}
@if($voucher)
Voucher: {{ $voucher->voucher }} - @if($voucher->tipe == 0) {{ $voucher->value }}% Discount @else Rp {{ number_format($voucher->value, 0, ',', '.') }} Discount @endif
@endif
Payment History
Payment Type Bank Amount
@foreach($payments as $p)
{{ paymentTypeName($p->type) }} @if($p->type === 'B') {{ $banks[$p->bank_code] ?? '-' }} @else - @endif {{ number_format($p->amount, 0, ',', '.') }}
@endforeach
TOTAL {{ number_format($booking->paid, 0, ',', '.') }}
{{ $details->first()->name ?? 'Package' }}
({{ $details->first()->code ?? 'PKG' }})
{{ $booking->date ?? 'Booking Date' }}