@extends('layouts.app') @section('title', 'Purchase Report') @section('breadcrumb') @endsection @section('content') @include('reports.partials.date-filter')
{{ number_format($totals->total_count) }}
Purchases
৳{{ number_format($totals->total_amount,0) }}
Total Value
৳{{ number_format($totals->total_paid,0) }}
Paid
৳{{ number_format($totals->total_due,0) }}
Due
By Supplier
@foreach($bySupplier as $row) @endforeach
SupplierCountTotalDue
{{ $row->supplier?->name }} {{ $row->count }} ৳{{ number_format($row->total,0) }} {{ $row->due > 0 ? '৳'.number_format($row->due,0) : '—' }}
Top Purchased Items
@foreach($topItems as $i => $item) @endforeach
#ProductQtyTotal Cost
{{ $i+1 }}
{{ $item->productVariant?->product?->name }}
{{ $item->productVariant?->variant_name }}
{{ $item->total_qty }} ৳{{ number_format($item->total_cost,0) }}
Purchase Records ({{ $purchases->total() }})
@forelse($purchases as $pur) @empty @endforelse
InvoiceDateSupplierTotalPaidDueStatus
{{ $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) }}
@if($purchases->hasPages())@endif
@endsection