@extends('layouts.app') @section('title', 'Debt Tracker') @section('page_title', 'Receivables & Debt Aging') @section('content')
| Invoice # | Customer | Due Date | Days Overdue | Original Amount | Outstanding Debt | Actions |
|---|---|---|---|---|---|---|
| {{ $d->invoice->invoice_number }} |
{{ $d->client->full_name }}
{{ $d->client->client_code }}
|
{{ $d->due_date ? \Carbon\Carbon::parse($d->due_date)->format('M d, Y') : '-' }} | @if($d->days_overdue > 60) {{ $d->days_overdue }} days @elseif($d->days_overdue > 0) {{ $d->days_overdue }} days @else Current @endif | {{ number_format($d->original_amount) }} UGX | {{ number_format($d->outstanding_balance) }} UGX | |
| No outstanding customer debts! | ||||||
| Waiver ID | Customer | Invoice | Waived Amount | Reason | Requested By | Status | Actions |
|---|---|---|---|---|---|---|---|
| WAIVER-{{ $w->id }} | {{ $w->client->full_name }} | {{ $w->debt->invoice->invoice_number }} |
-{{ number_format($w->waived_amount) }} UGX | {{ $w->reason }} |
{{ $w->requestedBy->full_name }}
{{ $w->created_at->format('M d, Y') }}
|
{{ ucfirst($w->status) }} | @if($w->status === 'pending' && (auth()->user()->isManager() || auth()->user()->isSuperAdmin())) @elseif($w->status === 'approved') Approved by {{ $w->approvedBy->full_name }} @else - @endif |
| No debt waivers logged yet. | |||||||