{{-- resources/views/purchases/index.blade.php --}} @extends('layouts.app') @section('title', 'Purchases') @section('content')
| ID | Invoice | Date | Supplier | Subtotal | Paid | Due | Items | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $purchase->id }} | {{ $purchase->invoice_no }} | {{ $purchase->date ? \Carbon\Carbon::parse($purchase->date)->format('d-m-Y') : '-' }} | {{ $purchase->supplier->name ?? 'N/A' }} | {{ number_format((float)$purchase->total, 2) }} | {{ number_format((float)$purchase->paid, 2) }} | {{ number_format((float)$purchase->due, 2) }} | {{-- Click to view items --}}@if($hasItems) Click to view items @else No items @endif | ||||||||
|
Items
Invoice: {{ $purchase->invoice_no }} |
Date: {{ $purchase->date ? \Carbon\Carbon::parse($purchase->date)->format('d-m-Y') : '-' }}
@if(!$hasItems)
No items found.
@else
|
|||||||||||||||
| No purchases found. | |||||||||||||||