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