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

Moon Traders
Scheme Discount Report
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 // Matrix is now [employee_id][date] $amount = $matrix[$salesman->id][$date] ?? 0; @endphp @endforeach @endforeach @foreach($dates as $date) @endforeach
# Employee Name {{ \Carbon\Carbon::parse($date)->format('d') }} Total
{{ $loop->iteration }} {{ $salesman->name }} {{ number_format($amount, 0) }} {{ number_format($salesmanTotals[$salesman->id] ?? 0, 0) }}
Grand Total {{ number_format($dateTotals[$date] ?? 0, 0) }} {{ number_format($grandTotal, 0) }}