@extends('layouts.app') @section('title', 'Purchases') @section('content')
Manage all purchase records
| # | Purchase No | Supplier | Purchase Date | Invoice No | Grand Total | Payment Status | Action |
|---|---|---|---|---|---|---|---|
| {{ $purchases->firstItem() + $loop->index }} | {{-- Purchase Number --}}{{ $purchase->purchase_no }} | {{-- Supplier --}}@if($purchase->supplier) {{ $purchase->supplier->company_name }} @else N/A @endif | {{-- Purchase Date --}}{{ $purchase->purchase_date ? \Carbon\Carbon::parse($purchase->purchase_date)->format('d-m-Y') : '-' }} | {{-- Invoice Number --}}{{ $purchase->invoice_no ?? '-' }} | {{-- Grand Total --}}₹{{ number_format((float) $purchase->grand_total, 2) }} | {{-- Payment Status --}}@if($purchase->payment_status === 'Paid') Paid @elseif($purchase->payment_status === 'Partial') Partial @else Unpaid @endif | {{-- Actions --}}|