Agent {{ $viewType === 'statement' ? 'Statement' : 'Payment History' }}

Agent: {{ $selectedAgent ? $selectedAgent->name : 'All Agents' }}

@if($from || $to)

Date Range: {{ $from }} to {{ $to }}

@endif @if($viewType === 'statement' && $serviceId)

Service: {{ $services->find($serviceId)->name ?? 'All Services' }}

@endif

Generated on: {{ now()->format('Y-m-d H:i:s') }}

@if($agentId !== null || $showAllAgents) @if($viewType === 'statement' && count($items) > 0) @forelse($items as $item) @empty @endforelse
Type Date Customer Name Customer Identity Service Name Voucher ID Branch Payment Method Transaction ID Payable Paid Due
{{ $item['type'] }} {{ \Carbon\Carbon::parse($item['delivery_date'])->format('Y-m-d H:i') }} {{ Str::limit($item['customer_name'], 12) }} {{ Str::limit($item['identity_no'], 12) }} {{ Str::limit($item['service_name'], 12) }} {{ $item['voucher_id'] ? Str::of($item['voucher_id'])->replace('-', '') : '' }} {{ Str::limit($item['branch'], 10) }} {{ Str::limit($item['payment_method'], 10) }} {{ Str::limit($item['trx_id'], 10) }} {{ number_format($item['payable'], 2) }} {{ number_format($item['paid'], 2) }} {{ number_format($item['due'], 2) }}
No data found.
Totals: {{ number_format($totalPayable, 2) }} {{ number_format($totalPaid, 2) }} {{ number_format($totalDue, 2) }}
@elseif($viewType === 'payment' && $payments->isNotEmpty()) @foreach($payments as $payment) @endforeach
Voucher ID Payment Date Branch Paid
{{ Str::limit(Str::of($payment->voucher_id ?? 'N/A')->replace('-', ''), 15) }} {{ $payment->created_at->format('Y-m-d H:i') }} {{ Str::limit($payment->payment->branch->name ?? 'N/A', 15) }} {{ number_format($payment->amount, 0) }}
Total Paid: {{ number_format($totalPaid, 0) }}
@else

No data found for the selected criteria.

@endif @endif

Thank you for your business! For inquiries, contact us at 0550893716