@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

Date Wise Due Report ({{ $__currency }})

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

@if($dateFrom || $dateTo) @endif @forelse($dateWiseData as $row) @empty @endforelse
Date Due Collected Cash Collected Bank Total Collected New Due
{{ $row['date'] }} {{ $fmtCurrency($row['due']) }} {{ $fmtCurrency($row['cash']) }} {{ $fmtCurrency($row['bank']) }} {{ $fmtCurrency($row['totalCollected']) }} {{ $fmtCurrency($row['newDue']) }}
No date wise data found
@if(count($dateWiseData) > 0)
@php $totalDue = array_sum(array_column($dateWiseData, 'due')); $totalCash = array_sum(array_column($dateWiseData, 'cash')); $totalBank = array_sum(array_column($dateWiseData, 'bank')); $totalCollected = array_sum(array_column($dateWiseData, 'totalCollected')); $lastRow = last($dateWiseData); $finalNewDue = $lastRow['newDue'] ?? 0; @endphp
Total Entries: {{ count($dateWiseData) }}
Total Due: {{ $fmtCurrency($totalDue) }}
Total Collected Cash: {{ $fmtCurrency($totalCash) }}
Total Collected Bank: {{ $fmtCurrency($totalBank) }}
Total Collected Amount: {{ $fmtCurrency($totalCollected) }}
Final New Due: {{ $fmtCurrency($finalNewDue) }}
@endif