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

Purchases

New Purchase
@forelse($purchases as $p) @empty @endforelse
# Date Supplier Invoice Project Items Total Bill Paid Due Status Actions
{{ $p->id }} {{ $p->purchase_date->format('d M Y') }} {{ $p->supplier->name }} {{ $p->invoice_number ?? '—' }} {{ $p->project->project_name ?? '—' }} {{ $p->items->count() }} items ৳{{ number_format((float) $p->total_bill, 2) }} ৳{{ number_format((float) $p->paid_amount, 2) }} ৳{{ number_format((float) $p->due_amount, 2) }} @php $statusColors = ['draft' => 'secondary', 'posted' => 'primary', 'settled' => 'success']; @endphp {{ ucfirst($p->status) }}
No purchases found.
@if($purchases->hasPages()) @endif
@endsection