@extends('layout') @section('page_title', 'Reports') @section('content')

Business Reports

Back to Dashboard
Customers
{{ $metrics['customers_total'] }}
Agreements
{{ $metrics['agreements_total'] }}
Payments (Paid)
{{ $metrics['payments_paid_count'] }}
Amount: {{ $currency }}{{ number_format($metrics['paid_amount_sum'], 2) }}
Payments (Pending)
{{ $metrics['payments_unpaid_count'] }}
Outstanding: {{ $currency }}{{ number_format($metrics['outstanding_amount_sum'], 2) }}

Recent Payments

@if($recentPayments->isEmpty())

No payment activity yet.

@else
@foreach($recentPayments as $p) @endforeach
Agreement Customer Product Due Date Amount Status
#{{ $p->agreement_id }} {{ optional($p->agreement->customer)->name ?? '—' }} {{ optional($p->agreement->product)->name ?? '—' }} {{ optional($p->due_date)->format('M d, Y') }} {{ $currency }}{{ number_format($p->amount, 2) }} {{ $p->paid_at ? 'Paid' : 'Pending' }}
@endif

Recent Instalments

@if($recentAgreements->isEmpty())

No agreements created yet.

@else
@foreach($recentAgreements as $a) @endforeach
ID Customer Product Total Instalments Status
{{ $a->id }} {{ optional($a->customer)->name ?? $a->customer_name }} {{ optional($a->product)->name ?? '—' }} {{ number_format($a->total_amount, 2) }} {{ $a->instalments_count }} {{ $a->status }}
@endif
@endsection