@extends('layouts.app') @section('title', 'Purchase Report') @section('breadcrumb')
{{ $from->format('d M Y') }} — {{ $to->format('d M Y') }}
| Supplier | Count | Total | Due |
|---|---|---|---|
| {{ $row->supplier?->name }} | {{ $row->count }} | ৳{{ number_format($row->total,0) }} | {{ $row->due > 0 ? '৳'.number_format($row->due,0) : '—' }} |
| # | Product | Qty | Total Cost |
|---|---|---|---|
| {{ $i+1 }} |
{{ $item->productVariant?->product?->name }}
{{ $item->productVariant?->variant_name }}
|
{{ $item->total_qty }} | ৳{{ number_format($item->total_cost,0) }} |
| Invoice | Date | Supplier | Total | Paid | Due | Status |
|---|---|---|---|---|---|---|
| {{ $pur->invoice_no }} | {{ $pur->purchase_date->format('d M Y') }} | {{ $pur->supplier->name }} | ৳{{ number_format($pur->total_amount,2) }} | ৳{{ number_format($pur->paid_amount,2) }} | {{ $pur->due_amount > 0 ? '৳'.number_format($pur->due_amount,2) : '—' }} | @php $pc=['received'=>'success','partial'=>'warning','paid'=>'success','ordered'=>'info','draft'=>'secondary']; @endphp{{ ucfirst($pur->status) }} |
| No purchases in this period | ||||||
| Totals: | ৳{{ number_format($totals->total_amount,2) }} | ৳{{ number_format($totals->total_paid,2) }} | ৳{{ number_format($totals->total_due,2) }} | |||