@extends('layouts.admin_fullwidth') @section('page-title', 'Employee – Month-wise Consolidated Conveyance') @section('page-subtitle', 'Session: ' . ($activeSession->name ?? ($activeSession->label ?? 'Active'))) @section('content') @php $totalEmployees = count($rows); @endphp
{{-- Top actions + summary (hide in Excel export) --}} @empty($isExport)
Back to Dashboard Session: {{ $activeSession->name ?? ($activeSession->label ?? '') }}

Employee × Month-wise Consolidated Conveyance

Each cell shows total submitted conveyance (onward + return, where applicable) for that employee in the given month of the active session.

{{-- Small KPI bar --}}

Employees

{{ $totalEmployees }}

Overall Total

₹ {{ number_format($overallTotal, 2) }}

Months Covered

@if(count($months)) {{ $months[0]['label'] }} – {{ $months[count($months) - 1]['label'] }} @else N/A @endif

@endempty {{-- Table container --}}
@foreach($months as $m) @endforeach @forelse($rows as $row) @php $user = $row['user']; @endphp {{-- Employee name (frozen first column) --}} {{-- Per month --}} @foreach($months as $m) @php $key = $m['key']; $val = $row['monthly'][$key] ?? 0; @endphp @endforeach {{-- Grand total per employee --}} @empty @endforelse {{-- Overall footer row (only in HTML, not necessary but nice) --}} @if(!empty($rows)) @foreach($months as $m) @php $key = $m['key']; $sumForMonth = 0; foreach ($rows as $row) { $sumForMonth += $row['monthly'][$key] ?? 0; } @endphp @endforeach @endif
Employee {{ $m['label'] }} Grand Total
{{ $user->name ?? ('User #' . $user->id) }} @if($val > 0) ₹ {{ number_format($val, 2) }} @else @endif @if($row['grand_total'] > 0) ₹ {{ number_format($row['grand_total'], 2) }} @else @endif
No submitted conveyance found for this session.
TOTAL @if($sumForMonth > 0) ₹ {{ number_format($sumForMonth, 2) }} @else @endif ₹ {{ number_format($overallTotal, 2) }}
@endsection