@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. --}} Bill {{ $bill['controlNumber'] }}
The United Republic of Tanzania
Ministry of Industry and Trade
Weights and Measures Agency
Government Bill
@if ($bill['cancelled'])
CANCELLED
@endif
Control Number:{{ $bill['controlNumber'] }}
Service Provider Code:SP419
Payer:{{ $bill['payerName'] }}
Payer Phone:+255{{ $bill['phoneNumber'] }}
Bill Description:{{ $bill['billDescription'] }}
@if ($qr && ! $pending)
GePG payment QR

Scan To Pay

@endif
@foreach ($bill['items'] as $index => $item) @endforeach
#Billed ItemAmount
{{ $index + 1 }}{{ $item['description'] ?: 'Billed Item' }}Tsh {{ $money($item['amount']) }}
Total Billed Amount:
@if ($showPartial)
Previous Paid:
Outstanding:
@endif
Amount In Words:
Expires On:
Prepared By:
Region:
Printed By:
Printed On:
Signature
{{ $money($bill['totalAmount']) }} (TZS)
@if ($showPartial)
{{ $money($paid) }} (TZS)
{{ $money($outstanding) }} (TZS)
@endif
{{ $bill['amountInWords'] ?: $words($bill['totalAmount']) }}
{{ $day($bill['expiresOn']) }}
{{ $bill['preparedBy'] ?: '-' }}
{{ $region !== '' ? $region : 'Weights and Measures Agency' }}
{{ $bill['printedBy'] }}
{{ now()->format('d M Y') }}
........................................ {{-- The officer who raised the bill signs it; the centre's stamp is struck across. --}} @if (! empty($bill['issuerSignature']))Signature@endif @if (! empty($stamp))Official stamp@endif

How to pay

  • 1 Via bank: visit any branch or bank agent of CRDB,NMB, reference number: {{ $bill['controlNumber'] }}
  • 2 Via Mobile Network Operators (MNO) :
    • Enter respective USSD menu of MNO
    • Select 4 (Make Payments)
    • Select 5 (Government payments enter {{ $bill['controlNumber'] }} as reference number)

Jinsi ya kulipa

  • ( Kupitia Benki: Fika tawi lolote au wakala wa benki ya CRDB,NMB, Namba ya kumbukumbu : {{ $bill['controlNumber'] }})
  • (Kupitia mitandao ya simu
    • Ingia kwenye menu ya mtandao husika
    • Chagua 4 (Lipa bili)
    • Chagua 5 (malipo ya serikali ingiza {{ $bill['controlNumber'] }} kama namba ya kumbukumbu)
Weights And Measures Agency Copyright © {{ now()->format('Y') }} All Rights Reserved
@foreach ($receipts as $receipt)
@if ($emblem)Coat of Arms@endif
THE UNITED REPUBLIC OF TANZANIA
MINISTRY OF INDUSTRY AND TRADE
WEIGHTS AND MEASURES AGENCY
Exchequer Receipt
@if ($logo)WMA Logo@endif
Receipt Number:{{ $receipt['receiptNumber'] }}
Received From:{{ $receipt['payerName'] }}
Phone Number:{{ $receipt['phoneNumber'] }}
Amount:{{ $money($receipt['paidAmount']) }}
Amount In Words:{{ $words($receipt['paidAmount']) }}
Outstanding Balance:{{ $money($receipt['outstanding']) }}
Bill Description:{{ $receipt['description'] }}
In Respect Of
#Billed ItemAmount
1{{ $receipt['itemDesc'] }}Tsh {{ $money($receipt['paidAmount']) }}
Total Billed Amount:
{{ $money($receipt['billAmount']) }} (TZS)
Bill Reference
{{ $receipt['billReference'] }}
Payment Control Number
{{ $receipt['controlNumber'] }}
Payment Date
{{ $day($receipt['date']) }}
Issued By
{{ $receipt['issuedBy'] }}
Printed By
{{ $receipt['printedBy'] }}
Date Issued
{{ $day($receipt['date']) }}
Signature
................................ {{-- As on the bill: the issuing officer's signature, and the centre's stamp across it. --}} @if (! empty($bill['issuerSignature']))Signature@endif @if (! empty($stamp))Official stamp@endif
@endforeach