@extends('layouts.app') @section('title', 'Payment Management') @section('content')
Collect outstanding payments or view completed payments.
{{ $tab === 'pending' ? 'Pending and partially paid invoices. Pay the remaining balance to complete an invoice.' : 'Fully paid invoices. Open an invoice to view and download it.' }}
| {{ $heading }} | @endforeach||||||||
|---|---|---|---|---|---|---|---|---|
|
{{ $invoice->invoice_number }}
{{ $invoice->invoice_date?->format('d-m-Y') ?? 'N/A' }}
|
{{ $invoice->client_name ?? 'N/A' }}
{{ $invoice->client_phone ?? 'N/A' }}
@foreach ($invoice->customer?->customerMembers ?? [] as $member)
{{ $member->proof_type === 'ic_number' ? 'IC Number' : ucwords(str_replace('_', ' ', $member->proof_type ?? 'ID')) }}: {{ $member->proof_number ?? 'N/A' }}
@endforeach
|
{{ $invoice->locker_number ?? 'N/A' }} | {{ ['create' => 'Registration', 'add' => 'Locker Add', 'renewal' => 'Renewal', 'change' => 'Change'][$invoice->payment_type] ?? ucwords(str_replace('_', ' ', $invoice->payment_type ?? 'N/A')) }} | {{ number_format($invoice->total_amount, 2) }} | {{ number_format($paidAmount, 2) }} | {{ number_format($balanceAmount, 2) }} | {{ $status === 'partial' ? 'Partially Paid' : ucfirst($status ?: 'Unknown') }} |
@if ($invoice->customer && $invoice->lockerRegistration)
{{ $status === 'paid' ? 'View / Download' : 'View' }}
@if (in_array($status, ['pending', 'partial'], true) && $balanceAmount > 0)
@endif
@else
Registration unavailable
@endif
|
| No invoices match your filters. | ||||||||