@extends('layouts.app') @section('title', 'Sales Invoices') @section('content')
Track customer invoices and payments
| Invoice # | Customer | SO # | Date | Total | Paid | Outstanding | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $invoice->invoice_number }} | {{ $invoice->customer->name ?? '' }} | {{ $invoice->salesOrder->order_number ?? '-' }} | {{ $invoice->invoice_date ? \Carbon\Carbon::parse($invoice->invoice_date)->format('d M Y') : '' }} | {{ number_format($invoice->total_amount, 2) }} | {{ number_format($invoice->paid_amount, 2) }} | {{ number_format($outstanding, 2) }} | @php $badgeClass = match($invoice->status ?? 'unpaid') { 'unpaid' => 'badge-red', 'partial' => 'badge-yellow', 'paid' => 'badge-green', default => 'badge-gray', }; @endphp {{ ucfirst($invoice->status ?? 'unpaid') }} | |
| No invoices found. | ||||||||