@if ($companyLogo) Company Logo @endif
{{ $companyName ?? $settings?->app_name ?? 'Water Billing System' }}
@if ($settings?->app_address) {{ $settings->app_address }}
@endif @if ($settings?->app_phone) Phone: {{ $settings->app_phone }}
@endif @if ($settings?->app_email) Email: {{ $settings->app_email }} @endif
WATER BILLING STATEMENT
Billing #: {{ $billing->billing_number }}
Billing Date: {{ $billing->billing_date->format('F d, Y') }}
Due Date: {{ $billing->due_date->format('F d, Y') }}
@if($billing->disconnection_date) Disconnection Date: {{ $billing->disconnection_date->format('F d, Y') }} @endif
Currency: {{ $companyCurrency ?? 'PHP' }}
BILLING TO
Account Number: {{ $billing->client->account_number }}
Name: {{ $billing->client->name }}
Meter Number: {{ $billing->client->meter_number ?? 'N/A' }}
Address: {{ $billing->client->address ?? '-' }}
City/Municipality: {{ $billing->client->city ?? '-' }}
Description Amount
Water Consumption Charges
From {{ number_format($billing->previous_reading, 2) }} cu.m to {{ number_format($billing->current_reading, 2) }} cu.m
Total Units: {{ number_format($billing->units_consumed, 2) }} cu.m
{{ $companyCurrency ?? '₱' }} {{ number_format($billing->subtotal, 2) }}
{{-- The previous balance is not a footnote on this bill — it is part of what has to be paid. It is itemised here, then merged into the one TOTAL AMOUNT DUE below together with this reading's own charges. --}} @php $previousLines = $statement['previousLines'] ?? collect(); $previousBalance = $statement['previousBalance'] ?? 0; $totalDue = $statement['totalOutstanding'] ?? (float) $billing->balance; $cur = $companyCurrency ?? '₱'; @endphp @if ($previousLines->count() > 0)
PREVIOUS UNPAID BILLINGS
@foreach ($previousLines as $line) @endforeach
Billing No. Period Due Date Amount Due Paid Penalties Balance
{{ $line['billing_number'] }} {{ $line['billing_period'] }} {{ $line['due_date'] }} {{ $cur }} {{ number_format($line['total_amount_due'], 2) }} {{ $cur }} {{ number_format($line['amount_paid'], 2) }} {{ $cur }} {{ number_format($line['penalties'], 2) }} {{ $cur }} {{ number_format($line['balance'], 2) }}
PREVIOUS BALANCE ({{ $previousLines->count() }} unpaid billing/s) {{ $cur }} {{ number_format($previousBalance, 2) }}
@if (($statement['payments'] ?? collect())->count() > 0)
Payments already received and credited to the billings above:
@foreach ($statement['payments'] as $statementPayment) @endforeach
Date Reference # Billing No. Method Amount
{{ $statementPayment->payment_date?->format('M d, Y') ?? '—' }} {{ $statementPayment->reference_number }} {{ $statementPayment->billing?->billing_number ?? '—' }} {{ ucfirst(str_replace('_', ' ', $statementPayment->payment_method)) }} {{ $cur }} {{ number_format($statementPayment->amount, 2) }}
TOTAL RECEIVED {{ $cur }} {{ number_format($statement['payments']->sum('amount'), 2) }}
@endif @endif @if ($billing->tax > 0) @endif @if ($billing->other_charges > 0) @endif @if ($billing->penalties > 0) @endif @if ($billing->amount_paid > 0) @endif @if ($previousBalance > 0) @endif @if (($projectedLateFee ?? 0) > 0) @endif
Subtotal (this reading) {{ $cur }} {{ number_format($billing->subtotal, 2) }}
Tax {{ $cur }} {{ number_format($billing->tax, 2) }}
Other Charges {{ $cur }} {{ number_format($billing->other_charges, 2) }}
Penalties {{ $cur }} {{ number_format($billing->penalties, 2) }}
Less: Amount Paid on This Billing - {{ $cur }} {{ number_format($billing->amount_paid, 2) }}
Add: Previous Balance ({{ $previousLines->count() }} unpaid billing/s) {{ $cur }} {{ number_format($previousBalance, 2) }}
TOTAL AMOUNT DUE {{ $cur }} {{ number_format($totalDue, 2) }}
Amount if paid on/before {{ $billing->due_date->format('M d, Y') }} {{ $cur }} {{ number_format($totalDue, 2) }}
AMOUNT AFTER DUE DATE
includes {{ $cur }} {{ number_format($projectedLateFee, 2) }} late payment fee
{{ $cur }} {{ number_format($totalDue + $projectedLateFee, 2) }}
@if ($billing->remarks)
Remarks:
{{ $billing->remarks }}
@endif @if($meterReader || $paymentProcessor)
Staff Information
@if($meterReader) Meter Reader: {{ $meterReader->name }}
@endif @if($paymentProcessor) Payment Processor: {{ $paymentProcessor->name }}
@endif
@endif @if($qrCode)
Billing QR Code
@endif @if ($settings?->billing_footer_text)
{{ $settings->billing_footer_text }}
@endif