@extends('layouts.app') @section('title', 'Invoices') @section('content') @php $money = fn ($v) => \App\Support\Fmt::money($v); $plain = fn ($v) => rtrim(rtrim(number_format((float) $v, 2), '0'), '.'); $statusClasses = fn (string $s) => match ($s) { 'Pending' => 'bg-amber-500/15 text-amber-700', 'Approved' => 'bg-emerald-500/15 text-emerald-700', 'Paid' => 'bg-teal-500/15 text-teal-700', default => 'bg-rose-500/15 text-rose-700', }; $tabs = ['All', 'Pending', 'Approved', 'Paid', 'Rejected']; @endphp
Record, approve and pay supplier invoices
| Invoice No. | Supplier Ref | Supplier | PO | Date | Subtotal | VAT | Total | Status | Actions | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $invoice->invoice_no }} | {{ $invoice->supplier_ref ?: '—' }} | {{ $invoice->supplier?->company_name ?? '—' }} | @if ($invoice->po_id) {{ $invoice->po_id }} @else — @endif | {{ \App\Support\Fmt::day($invoice->received_date) }} | {{ $money($invoice->subtotal()) }} | {{ $money($invoice->taxTotal()) }} | {{ $money($invoice->grandTotal()) }} | {{ $invoice->status }} |
@if ($invoice->status === 'Pending')
@include('inventory.partials.status-form', [
'action' => route('inventory.invoices.status', $invoice),
'status' => 'Approved', 'label' => 'Approve',
])
@include('inventory.partials.status-form', [
'action' => route('inventory.invoices.status', $invoice),
'status' => 'Rejected', 'label' => 'Reject', 'outline' => true,
])
@elseif ($invoice->status === 'Approved')
@endif
|
||||||||||
|
{{ $invoice->invoice_no }}
{{ $invoice->status }}
{{ $invoice->supplier?->company_name ?? '—' }}
Supplier Ref
{{ $invoice->supplier_ref ?: '—' }} Purchase Order
{{ $invoice->po_id ?: '—' }} Received Date
{{ \App\Support\Fmt::day($invoice->received_date) }} Total
{{ $money($invoice->grandTotal()) }}
Paid on {{ \App\Support\Fmt::day($invoice->payment_date) }} via {{ $invoice->payment_method }} — ref {{ $invoice->payment_reference }} @endif @if ($invoice->notes){{ $invoice->notes }} @endif
@if ($invoice->status === 'Pending')
@include('inventory.partials.status-form', [
'action' => route('inventory.invoices.status', $invoice),
'status' => 'Approved', 'label' => 'Approve',
])
@include('inventory.partials.status-form', [
'action' => route('inventory.invoices.status', $invoice),
'status' => 'Rejected', 'label' => 'Reject', 'outline' => true,
])
@elseif ($invoice->status === 'Approved')
@include('inventory.partials.payment-form', [
'action' => route('inventory.invoices.payment', $invoice),
'today' => $today,
])
@endif
@include('inventory.partials.invoice-form', [
'action' => route('inventory.invoices.update', $invoice),
'method' => 'PUT',
'prefix' => 'inv-edit-'.$invoice->id,
'row' => $invoice,
'suppliers' => $suppliers,
'orders' => $orders,
'today' => $today,
])
Edit the invoice below and save your changes. |
|||||||||||||||||||
| No invoices match your filters. | |||||||||||||||||||