@php $__currency = $currency ?? 'SAR'; $__rate = $rate ?? 0; $fmtNum = function($amount, $d = 2) use ($__currency, $__rate) { if ($amount === null || $amount === '') return ''; $val = $__currency === 'BDT' ? $amount * $__rate : $amount; return number_format($val, $d); }; $fmtCurrency = function($amount, $d = 2) use ($__currency, $__rate) { if ($amount === null || $amount === '') return ''; $val = $__currency === 'BDT' ? $amount * $__rate : $amount; return ($__currency === 'BDT' ? 'BDT ' : 'SAR ') . number_format($val, $d); }; @endphp

Customer Due Report ({{ $__currency }})

{{ $branch->name }} | BM Umrah Booking System

@if($dateFrom || $dateTo) @endif @forelse($customers as $row) @empty @endforelse
Customer Name Mobile Invoice ID Actual Flight Date Total Package Paid Due
{{ $row['name'] }} {{ $row['mobile'] }} {{ $row['invoiceId'] }} {{ $row['ticketDate'] }} {{ $fmtCurrency($row['totalPackage']) }} {{ $fmtCurrency($row['paid']) }} {{ $fmtCurrency($row['due']) }}
No customer due data found
@if(count($customers) > 0)
@php $totalPackage = array_sum(array_column($customers, 'totalPackage')); $totalPaid = array_sum(array_column($customers, 'paid')); $totalDue = array_sum(array_column($customers, 'due')); @endphp
Total Customers: {{ count($customers) }}
Total Package Amount: {{ $fmtCurrency($totalPackage) }}
Total Paid: {{ $fmtCurrency($totalPaid) }}
Total Due: {{ $fmtCurrency($totalDue) }}
@endif