@extends('pdf.layout') @section('title', 'Collections Summary Report') @section('meta-info') @if (isset($start_date) && isset($end_date))

Period: {{ $start_date }} to {{ $end_date }}

@else

Period: All Time

@endif @endsection @section('content')

Overall Summary

Total Collections {{ $data['summary']['total_count'] ?? 0 }}
Total Quantity {{ number_format($data['summary']['total_quantity'] ?? 0, 3) }}
Total Amount {{ number_format($data['summary']['total_amount'] ?? 0, 2) }}
@if (isset($data['by_product']) && count($data['by_product']) > 0)

Collections by Product

@foreach ($data['by_product'] as $product) @endforeach
Product Name Count Quantity Amount
{{ $product['product_name'] }} {{ $product['count'] }} {{ number_format($product['total_quantity'], 3) }} {{ number_format($product['total_amount'], 2) }}
@endif @if (isset($data['by_supplier']) && count($data['by_supplier']) > 0)

Collections by Supplier

@foreach ($data['by_supplier'] as $supplier) @endforeach
Supplier Code Supplier Name Count Quantity Amount
{{ $supplier['supplier_code'] }} {{ $supplier['supplier_name'] }} {{ $supplier['count'] }} {{ number_format($supplier['total_quantity'], 3) }} {{ number_format($supplier['total_amount'], 2) }}
@endif @endsection