@extends('layouts.app') @section('title', 'Monthly Disconnection Report') @section('content') @php $cur = ($filters['currency'] ?? 'PHP') === 'PHP' ? '₱' : $filters['currency'] . ' '; @endphp
Notices, disconnections and reconnections per month, plus accounts at risk
| Month | Notices Sent | Disconnections | Reconnections | Reconnection Fees | Late Fees Applied | Late Fee Amount |
|---|---|---|---|---|---|---|
| {{ $row['label'] }} | {{ number_format($row['notices']) }} | {{ number_format($row['disconnections']) }} | {{ number_format($row['reconnections']) }} | {{ $cur }}{{ number_format($row['reconnection_fees'], 2) }} | {{ number_format($row['late_fee_count']) }} | {{ $cur }}{{ number_format($row['late_fees'], 2) }} |
| No disconnection activity in this period. | ||||||
| Total | {{ number_format($totals['notices']) }} | {{ number_format($totals['disconnections']) }} | {{ number_format($totals['reconnections']) }} | {{ $cur }}{{ number_format($totals['reconnection_fees'], 2) }} | {{ number_format($totals['late_fee_count']) }} | {{ $cur }}{{ number_format($totals['late_fees'], 2) }} |
| Bill # | Account | Due Date | Cut-off Date | Days Overdue | Balance | Notice | For Disconnection |
|---|---|---|---|---|---|---|---|
| {{ $row['billing_number'] }} |
{{ $row['client_name'] }}
{{ $row['account_number'] }}
|
{{ $row['due_date']?->format('M d, Y') ?? '—' }} | {{ $row['disconnection_date']?->format('M d, Y') ?? '—' }} | {{ number_format($row['days_overdue']) }} | {{ $cur }}{{ number_format($row['balance'], 2) }} | @if($row['disconnection_status'] === 'notice_sent') Sent @else Not sent @endif | @if($row['eligible']) Due for cut-off @else Within grace period @endif |
| No accounts are pending disconnection. | |||||||
| Total ({{ number_format($atRisk->count()) }} bills) | {{ $cur }}{{ number_format($atRisk->sum('balance'), 2) }} | ||||||
The monthly table is driven by the disconnection events recorded against each account; the accounts list reflects the current state and ignores the date filter. Cut-off dates follow the company's disconnection settings (fixed date or days after due date). The CSV export covers the monthly activity table. @if(in_array(auth()->user()->role?->name, ['super_admin', 'company_admin', 'company_owner'])) Actions live in Disconnection Management. @endif