@extends('layouts.app') @section('content') @if(in_array(auth()->user()->role->name, ['super_admin', 'company_admin', 'company_owner']))
Late fees, overdue billings, and history for {{ $client->name ?? 'Client' }}
{{ $client->name ?? 'Unknown' }}
{{ $client->account_number ?? 'N/A' }}
{{ $client->phone ?? 'N/A' }}
{{ $client->email ?? 'N/A' }}
{{ $client->address ?? 'N/A' }}
₱{{ number_format($lateFeesSummary['total_overdue_balance'] ?? 0, 2) }}
₱{{ number_format($lateFeesSummary['total_late_fees'] ?? 0, 2) }}
{{ $lateFeesSummary['overdue_billings_count'] ?? 0 }}
{{ $lateFeesSummary['days_overdue'] ?? 0 }}
{{ isset($lateFeesSummary['latest_due_date']) ? $lateFeesSummary['latest_due_date'] : 'N/A' }}
| Billing No. | Period | Amount Due | Paid | Balance | Days Overdue | Late Fees | Due Date | Status |
|---|---|---|---|---|---|---|---|---|
| {{ $line['billing_number'] }} | {{ $line['billing_period'] }} | ₱{{ number_format($line['total_amount_due'], 2) }} | ₱{{ number_format($line['amount_paid'], 2) }} | ₱{{ number_format($line['balance'], 2) }} | @if($line['days_overdue'] > 0) {{ $line['days_overdue'] }} days @else Not yet due @endif | ₱{{ number_format($line['penalties'], 2) }} | {{ $line['due_date'] }} | @php $status = $line['billing']->disconnection_status ?? 'none'; $statusClass = [ 'none' => 'secondary', 'notice_sent' => 'warning', 'disconnected' => 'danger', 'reconnected' => 'success' ]; $statusBg = $statusClass[$status] ?? 'secondary'; $statusLabel = [ 'none' => 'Active', 'notice_sent' => 'Notice Sent', 'disconnected' => 'Disconnected', 'reconnected' => 'Reconnected' ]; @endphp {{ $statusLabel[$status] ?? ucfirst($status) }} |
| No unpaid billings found. | ||||||||
| TOTAL FOR ALL BILLINGS | ₱{{ number_format($statement['totalBilled'], 2) }} | ₱{{ number_format($statement['totalPaid'], 2) }} | ₱{{ number_format($statement['totalOutstanding'], 2) }} | ₱{{ number_format($statement['totalPenalties'], 2) }} | ||||
| 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)) }} | ₱{{ number_format($statementPayment->amount, 2) }} |
| TOTAL RECEIVED | ₱{{ number_format($statement['payments']->sum('amount'), 2) }} | |||
| Date | Billing | Fee Amount | Type | Notes |
|---|---|---|---|---|
| {{ $payment->created_at ? $payment->created_at->format('M d, Y H:i') : 'N/A' }} | #{{ $payment->billing_id ?? 'N/A' }} | ₱{{ number_format($payment->amount ?? 0, 2) }} | {{ ucfirst($payment->payment_type ?? 'N/A') }} | {{ $payment->notes ?? '-' }} |
| No late fee history found. | ||||
This list tracks all late payments for this client, including payments made after reconnection to help monitor recurring patterns.
| Date | Billing | Due Date | Days Late | Amount | Status | Notes |
|---|---|---|---|---|---|---|
| {{ $payment->created_at ? $payment->created_at->format('M d, Y') : 'N/A' }} | #{{ $payment->billing_id }} | {{ $payment->due_date ? $payment->due_date->format('M d, Y') : 'N/A' }} | {{ $payment->days_late ?? 0 }} days | ₱{{ number_format($payment->amount ?? 0, 2) }} | {{ ucfirst($payment->payment_status ?? 'pending') }} | {{ $payment->notes ?? '-' }} |
| No late payments recorded. | ||||||
₱{{ number_format($statement['totalOutstanding'] ?? 0, 2) }} across {{ $statement['unpaidCount'] ?? 0 }} unpaid billing/s @if(($reconnectionFee ?? 0) > 0) + ₱{{ number_format($reconnectionFee, 2) }} reconnection fee @endif
Only Super Admin and Company Admin users can access the Disconnection Management system.
Back to Dashboard