{{-- Author By : zulfazdliabuas@gmail.com | Date : 2026 --}} @php $seller = config('einvoice.seller', []); $sellerAddress = $seller['address'] ?? []; $taxRate = (float) (config('einvoice.tax.rate') ?? 0); $grossAmount = (float) ($request->amount ?? 0); $netAmount = $taxRate > 0 ? round($grossAmount / (1 + $taxRate), 2) : $grossAmount; $taxAmount = round($grossAmount - $netAmount, 2); $grandTotal = $grossAmount; $showTaxBreakdown = (bool) ($showTaxBreakdown ?? false); $logoPath = public_path('images/subs_logo.jpeg'); $logoData = null; if (is_file($logoPath)) { $logoData = 'data:image/png;base64,' . base64_encode(file_get_contents($logoPath)); } $period = $request->invoice_cycle_month ? \Carbon\Carbon::parse($request->invoice_cycle_month)->format('m/Y') : '-'; $deadline = $request->request_window_ends_at ? \Carbon\Carbon::parse($request->request_window_ends_at)->format('d/m/Y') : null; @endphp {{-- HEADER --}}
@if($logoData) {{ config('app.name', 'SUBS') }} @else {{ strtoupper(substr(config('app.name', 'SUBS'), 0, 2)) }} @endif
PAYMENT RECEIPT
{{ $seller['name'] ?? config('app.name', 'SUBS') }} ({{ $seller['registration_number'] ?? '-' }})
{{ $sellerAddress['line1'] ?? '' }}
@if(!empty($sellerAddress['line2'])) {{ $sellerAddress['line2'] }}
@endif {{ $sellerAddress['postcode'] ?? '' }} {{ $sellerAddress['city'] ?? '' }}, {{ $sellerAddress['state'] ?? '' }}
Tel: {{ $seller['contact_number'] ?? '-' }}   Email: {{ $seller['email'] ?? '-' }}
PAID
Receipt No: {{ $request->receipt_no ?? '-' }}
Payment Date: {{ optional($request->payment_date)->format('d/m/Y') ?? '-' }}

{{-- DETAILS SECTION --}} {{-- CUSTOMER --}} {{-- DETAILS --}}
CUSTOMER
Customer ID  : {{ $request->customer_id ?? $request->ic_passport ?? '-' }}
Customer       : {{ $request->name ?? '-' }}
@if(!empty($request->email))
{{ $request->email }}
@endif
Contact         : {{ $request->phone ?? '-' }}
DETAILS
Invoice No        : {{ $request->invoice_no ?? '-' }}
Invoice Date      : {{ optional($request->txn_date)->format('d/m/Y') ?? '-' }}
Receipt No        : {{ $request->receipt_no ?? '-' }}
Payment Method  : {{ $request->payment_method ?? '-' }}
Reference         : {{ $request->payment_reference ?? '-' }}

{{-- ITEMS TABLE --}}
No Car Plate Site Period Description Amount
1 {{ $request->car_plate ?? '-' }} {{ $request->site->name ?? '-' }} {{ $period }} Parking Subscription - {{ $request->site->name ?? '-' }} RM {{ number_format($grossAmount, 2) }}
{{-- SUMMARY --}}
@if($taxRate > 0) @endif
Subtotal RM {{ number_format($netAmount, 2) }}
Add Service Tax ({{ number_format($taxRate * 100, 0) }}%) RM {{ number_format($taxAmount, 2) }}
Total Paid RM {{ number_format($grandTotal, 2) }}
{{-- SERVICE TAX SUMMARY --}} @if($taxRate > 0)
Service Tax Summary Amount(RM) Tax(RM)
* {{ number_format($taxRate * 100, 2) }}% {{ number_format($netAmount, 2) }} {{ number_format($taxAmount, 2) }}
** Nil 0.00 -
@endif {{-- QR & NOTICE --}}
E-Invoice Request
If you require an e-invoice, please scan the QR code or click the link below to submit your request @if($deadline) before {{ $deadline }}. @else within the allowed request window. @endif
@if(!empty($qrDataUri))
Request E-Invoice
Scan to request e-invoice
@endif