@extends('pdf.layout') @section('title', 'Payments 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 Payments {{ $data['summary']['total_count'] ?? 0 }}
Total Amount {{ number_format($data['summary']['total_amount'] ?? 0, 2) }}
@if (isset($data['by_type']) && count($data['by_type']) > 0)

Payments by Type

@foreach ($data['by_type'] as $type) @endforeach
Payment Type Count Amount
{{ $type['type'] }} {{ $type['count'] }} {{ number_format($type['total_amount'], 2) }}
@endif @if (isset($data['by_supplier']) && count($data['by_supplier']) > 0)

Payments by Supplier

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