@extends('layouts.app') @section('title', $bill->bill_number) @section('content') @php $bb = match ($bill->status) { 'Paid' => 'g', 'Overdue', 'Cancelled' => 'r', 'Partially Paid' => 'a', default => 'b', }; @endphp
{{ $bill->bill_number }}
{{ $bill->supplier?->company_name }}
{{ $bill->status }}Bill date
{{ $bill->bill_date?->format('Y-m-d') }}
Due
{{ $bill->due_date?->format('Y-m-d') ?? '—' }}
Linked PO
{{ $bill->inventoryPurchaseOrder?->po_number ?? '—' }}
Cash outflow #{{ $bill->cashOutflow->id }} — {{ $bill->cashOutflow->is_paid ? 'Paid' : 'Pending' }}
@endifLine items
| Material | Qty | Unit | Total |
|---|---|---|---|
| {{ $it->material?->name }} | {{ rtrim(rtrim((string) $it->quantity, '0'), '.') }} | {{ \App\Support\Format::mwkDecimal($it->unit_cost) }} | {{ \App\Support\Format::mwkDecimal($it->total_cost) }} |
Record payment
Marks the linked cash outflow as paid and posts one finance expense transaction (full balance).