@php $money = fn ($v) => number_format((float) $v, 0); $day = fn ($v) => $v ? \Illuminate\Support\Carbon::parse($v)->format('d M Y') : ''; $pending = in_array(strtoupper(trim((string) $bill['controlNumber'])), ['', '0', 'PENDING'], true); $paid = (float) ($bill['paidAmount'] ?? 0); $outstanding = (float) ($bill['outstandingAmount'] ?? max(0, (float) $bill['totalAmount'] - $paid)); $showPartial = $paid > 0; $words = fn ($amount) => ucwords(str_replace('-', ' ', (string) (new \NumberFormatter('en', \NumberFormatter::SPELLOUT))->format((int) round((float) $amount)))).' Tanzanian Shillings Only'; $region = trim(str_ireplace(['Wakala Wa Vipimo', 'Center', 'Office'], '', (string) ($bill['collectionCenter'] ?? ''))); @endphp {{-- The bill and the receipts of the case file, laid out as Bill Management prints them: the Government Bill slip (modules/Bills/components/BillPreview.jsx) with its GePG "Scan To Pay" QR, the issuing officer's signature and the centre's stamp, and the Exchequer Receipt of Search Payment (modules/Payments/components/PaymentReceiptPreview.jsx). Each sheet is drawn at the screen size of those components and zoomed to fit A4, as their "Download PDF" does. --}}
Scan To Pay
| # | Billed Item | Amount |
|---|---|---|
| {{ $index + 1 }} | {{ $item['description'] ?: 'Billed Item' }} | Tsh {{ $money($item['amount']) }} |
| # | Billed Item | Amount |
|---|---|---|
| 1 | {{ $receipt['itemDesc'] }} | Tsh {{ $money($receipt['paidAmount']) }} |