@extends('layouts.app') @section('title', $customer->name . ' — Invoices & Receipts') @section('content')
Back to Profile
{{-- ── Sale Invoices ── --}}
Sale Invoices {{ $documents['sale_invoices']->count() }}
@if($documents['sale_invoices']->count())
@foreach($documents['sale_invoices'] as $inv) @endforeach
Invoice # Flat Total Price Discount Net Payable Issue Date PDF
{{ $inv->invoice_number }} {{ $inv->flat?->flat_number ?? '—' }} ৳ {{ number_format((float) $inv->total_price, 2) }} ৳ {{ number_format((float) $inv->discount, 2) }} ৳ {{ number_format((float) $inv->net_payable, 2) }} {{ $inv->issue_date?->format('d M Y') }}
@else

No sale invoices yet.

@endif
{{-- ── Installment Invoices ── --}}
Installment Invoices {{ $documents['installment_invoices']->count() }}
@if($documents['installment_invoices']->count())
@foreach($documents['installment_invoices'] as $inv) @endforeach
Invoice # Installment # Flat Due Date Amount Due Late Fee Status PDF
{{ $inv->invoice_number }} #{{ $inv->installment?->installment_number ?? '—' }} {{ $inv->flat?->flat_number ?? '—' }} {{ $inv->due_date?->format('d M Y') ?? '—' }} ৳ {{ number_format((float) $inv->amount_due, 2) }} ৳ {{ number_format((float) $inv->late_fee, 2) }} @php $statusClass = match ($inv->installment_status ?? 'pending') { 'paid' => 'badge-active', 'overdue' => 'badge-inactive', 'partial' => 'bg-warning text-dark', 'voided' => 'bg-dark', default => 'bg-secondary', }; @endphp {{ ucfirst($inv->installment_status ?? 'pending') }}
@else

No installment invoices yet.

@endif
{{-- ── Payment Receipts ── --}}
Payment Receipts {{ $documents['receipts']->count() }}
@if($documents['receipts']->count())
@foreach($documents['receipts'] as $rec) @endforeach
Receipt # Flat Method Paid Amount Remaining Date PDF
{{ $rec->receipt_number }} {{ $rec->flat?->flat_number ?? '—' }} {{ $rec->payment_method }} ৳ {{ number_format((float) $rec->paid_amount, 2) }} ৳ {{ number_format((float) $rec->remaining_balance, 2) }} {{ $rec->issue_date?->format('d M Y') }}
@else

No payment receipts yet.

@endif
@endsection