@extends('layouts.app') @section('title', 'Unpaid Report') @section('content') @php $cur = ($filters['currency'] ?? 'PHP') === 'PHP' ? '₱' : $filters['currency'] . ' '; $bucketColors = [ 'Current' => 'secondary', '1-30 Days' => 'info', '31-60 Days' => 'warning', '61-90 Days' => 'orange', 'Over 90 Days' => 'danger', ]; @endphp
Back to Reports

Unpaid Report

Bills still carrying a balance, with aging analysis

@include('reports.partials.filter', ['route' => 'reports.unpaid', 'showSearch' => true])
Total Unpaid

{{ $cur }}{{ number_format($summary['balance'], 2) }}

{{ number_format($summary['bills']) }} bills
Past Due

{{ $cur }}{{ number_format($summary['overdue_balance'], 2) }}

{{ number_format($summary['overdue_bills']) }} bills past due date
Accounts Affected

{{ number_format($summary['accounts']) }}

avg {{ $summary['accounts'] > 0 ? $cur . number_format($summary['balance'] / $summary['accounts'], 2) : $cur . '0.00' }} per account
Partially Paid

{{ $cur }}{{ number_format($summary['paid'], 2) }}

already received on these bills
Aging Summary
@foreach($aging as $bucket => $data)
{{ $bucket }}
{{ $cur }}{{ number_format($data['amount'], 2) }}
{{ number_format($data['count']) }} bills
@endforeach
Unpaid Bills
Oldest due date first
@forelse($paginated as $row) @empty @endforelse @if($rows->isNotEmpty()) @endif
Bill # Account Billing Date Due Date Total Due Paid Balance Days Overdue Aging Status
{{ $row['billing_number'] }}
{{ $row['client_name'] }}
{{ $row['account_number'] }}
{{ $row['billing_date']?->format('M d, Y') ?? '—' }} {{ $row['due_date']?->format('M d, Y') ?? '—' }} {{ number_format($row['total_amount_due'], 2) }} {{ number_format($row['amount_paid'], 2) }} {{ $cur }}{{ number_format($row['balance'], 2) }} {{ $row['days_overdue'] > 0 ? number_format($row['days_overdue']) : '—' }} {{ $row['bucket'] }} {{ ucfirst($row['status']) }} @if($row['is_disconnected']) Disconnected @elseif($row['disconnection_status'] === 'notice_sent') Notice Sent @endif
No unpaid bills for this period. 🎉
Total ({{ number_format($summary['bills']) }} bills) {{ number_format($summary['billed'], 2) }} {{ number_format($summary['paid'], 2) }} {{ $cur }}{{ number_format($summary['balance'], 2) }}
@if($paginated->hasPages()) @endif

The date filter applies to the billing date. Use "All Time" to see every outstanding bill regardless of when it was issued.

@endsection