@extends('layouts.app') @section('title', 'Supplier bills') @section('content')

Supplier bills

Bills and payables for inventory purchases

Excel PDF
@include('inventory.partials.subnav', ['invActive' => 'bills']) @if($errors->any())
{{ $errors->first() }}
@endif @if(session('success'))
{{ session('success') }}
@endif @php $bst = $stats ?? []; @endphp

Pending bills

{{ $bst['pending'] ?? 0 }}

Overdue

{{ $bst['overdue'] ?? 0 }}

Paid this month

{{ \App\Support\Format::mwkDecimal($bst['paid_month'] ?? 0) }}

Outstanding

{{ \App\Support\Format::mwkDecimal($bst['outstanding'] ?? 0) }}

@forelse($bills as $b) @php $bb = match ($b->status) { 'Paid' => 'g', 'Overdue', 'Cancelled' => 'r', 'Partially Paid' => 'a', default => 'b', }; @endphp @empty @endforelse
Bill #SupplierPOBill dateDueAmountBalanceStatusAction
{{ $b->bill_number }} {{ $b->supplier?->company_name }} {{ $b->inventoryPurchaseOrder?->po_number ?? '—' }} {{ $b->bill_date?->format('Y-m-d') }} {{ $b->due_date?->format('Y-m-d') ?? '—' }} {{ \App\Support\Format::mwkDecimal($b->total_amount) }} {{ \App\Support\Format::mwkDecimal($b->balance_due) }} {{ $b->status }} View @if(! in_array($b->status, ['Paid', 'Cancelled'], true)) Pay @endif
No supplier bills.
{{ $bills->links() }}
@endsection @push('scripts') @endpush