@extends('layouts.app')
@section('page_title','Purchases')
@section('content')<div class="card top-card"><div class="card-body"><div class="text-end mb-3"><a href="{{ route('purchases.create') }}" class="btn btn-success">New Purchase</a></div><div class="table-responsive"><table class="table"><thead><tr><th>No</th><th>Date</th><th>Supplier</th><th>Total</th><th>Paid</th><th>Due</th><th></th></tr></thead><tbody>@foreach($purchases as $purchase)<tr><td>{{ $purchase->purchase_no }}</td><td>{{ $purchase->purchase_date }}</td><td>{{ $purchase->supplier->name }}</td><td>{{ number_format($purchase->subtotal,2) }}</td><td>{{ number_format($purchase->paid_amount,2) }}</td><td>{{ number_format($purchase->due_amount,2) }}</td><td><a href="{{ route('purchases.show',$purchase) }}" class="btn btn-sm btn-outline-primary">View</a></td></tr>@endforeach</tbody></table></div>{{ $purchases->links() }}</div></div>@endsection
