@push('header') @endpush
@if($selectedSupplierId) Clear @endif
@if($selectedDesignation) Clear @endif

Leave empty to show all salesmen

Moon Traders
Percentage Expense Report
@if($selectedDesignation) Designation: {{ $selectedDesignation }}
@endif Salesmen: {{ $selectedSalesmanNames }}
For the period {{ \Carbon\Carbon::parse($startDate)->format('d-M-Y') }} to {{ \Carbon\Carbon::parse($endDate)->format('d-M-Y') }}
Printed by: {{ auth()->user()->name }} | {{ now()->format('d-M-Y h:i A') }}

@foreach($dates as $date) @endforeach @foreach ($reportSalesmen as $salesman) @foreach($dates as $date) @php $salesmanMatrix = $matrix[$salesman->id] ?? []; $hasAmount = array_key_exists($date, $salesmanMatrix); $amount = $hasAmount ? $salesmanMatrix[$date] : null; @endphp @endforeach @endforeach @foreach($dates as $date) @endforeach
# Employee Name {{ \Carbon\Carbon::parse($date)->format('d') }} Total
{{ $loop->iteration }} {{ $salesman->name }} {{ $hasAmount ? number_format($amount, 2) : '-' }} {{ number_format($salesmanTotals[$salesman->id] ?? 0, 2) }}
Grand Total {{ number_format($dateTotals[$date] ?? 0, 2) }} {{ number_format($grandTotal, 2) }}
@push('scripts') @endpush