@php use App\Models\Payment; $money = fn ($value) => 'R '.number_format((float) $value, 2); $period = $filters['period'] ?? 'this_month'; $max = max(1, (float) $chart['max']); @endphp Payments & Collections @can('view-financial-reports') Export Revenue @endcan

Revenue register

Filter received payments

Partial payments count by the amount received.

{{ $range['label'] }}
Reset

Total Received

{{ $money($summary['total_received']) }}

Successful payments.

Payments

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

Received transactions.

Average Payment

{{ $money($summary['average_payment']) }}

For this report.

Partial Received

{{ $money($summary['partial_received']) }}

From partially paid invoices.

Outstanding Balance

{{ $money($summary['outstanding_balance']) }}

Current collectible balance.

Revenue trend

{{ ucfirst($chart['granularity']) }} received payments for this range.

{{ $range['label'] }}
@foreach ($chart['points'] as $point) @php $height = max(6, round(((float) $point['total'] / $max) * 180)); @endphp
{{ $point['label'] }}
@endforeach

Received payments

Only successful payments with a paid date are listed.

@if ($payments->isEmpty()) @else
@foreach ($payments as $payment) @endforeach
Paid At Invoice Client Method Reference Amount
{{ $payment->paid_at?->format('d M Y H:i') }} @if ($payment->invoice) {{ $payment->invoice->invoice_number }} {{ $payment->invoice->statusLabel() }} @else Invoice unavailable @endif {{ $payment->invoice?->client?->name ?? 'No client' }} {{ $payment->methodLabel() }} {{ $payment->payment_reference ?: ($payment->gateway_reference ?: 'No reference') }} {{ $money($payment->amount_paid) }}
{{ $payments->links() }}
@endif

Partially paid invoices

Received money counts as revenue; remaining balances stay collectible.

Outstanding {{ $money($summary['outstanding_balance']) }}
@forelse ($partialInvoices as $invoice) @php $paid = (float) ($invoice->paid_total ?? $invoice->totalPaid()); $balance = (float) ($invoice->balance_due ?? $invoice->remainingBalance()); $progress = min(100, round(($paid / max(1, (float) $invoice->grand_total)) * 100)); @endphp
{{ $invoice->invoice_number }}

{{ $invoice->client?->name }}

{{ $invoice->statusLabel() }}
Total
{{ $money($invoice->grand_total) }}
Received
{{ $money($paid) }}
Balance
{{ $money($balance) }}
@empty @endforelse