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