@extends('layouts.app') @section('title', 'Purchase #' . $purchase->id) @section('content')

Purchase #{{ $purchase->id }}

Back
Supplier: {{ $purchase->supplier->name }}
Date: {{ $purchase->date->format('d M Y') }}
Total: Rs. {{ number_format($purchase->total_amount, 2) }}
@if($purchase->notes)
Notes: {{ $purchase->notes }}
@endif
@foreach($purchase->items as $item) @endforeach
CategoryWeightBagsPrice/BagSubtotal
{{ $item->product->category->name ?? '-' }} {{ $item->product->weight->label ?? '-' }} {{ $item->bags }} Rs. {{ number_format($item->price_per_bag, 2) }} Rs. {{ number_format($item->subtotal, 2) }}
Total:Rs. {{ number_format($purchase->total_amount, 2) }}
Paid at Purchase:Rs. {{ number_format($purchase->paid_amount, 2) }}
@endsection