@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @section('content') @php $offset = ($data->currentPage() - 1) * $data->perPage(); $activeFilters = collect([ request('employee_id'), request('department_id'), request('designation_id'), request('category_id'), request('grade_id'), ])->filter(fn($v) => !empty($v))->count(); $pendingOnPage = collect($data->items())->where('is_pending', true)->count(); @endphp
@foreach(['status' => 'success', 'error' => 'danger'] as $key => $variant) @if(session($key)) @endif @endforeach
FY {{ $fy->label ?? 'N/A' }} @if($activeFilters > 0) {{ $activeFilters }} filter{{ $activeFilters > 1 ? 's' : '' }} active × @endif
@if(($missingCount ?? 0) > 0)
@csrf
@endif @if($data->total() > 0) As of Recalculate All @endif
{{-- Gmail-style: when the whole page is selected, offer to extend to all pending matching the filters --}} {{-- Approve-all (filtered) — submitted by the merged button when no rows are selected --}}
@csrf
@csrf
@foreach($monthCols as $c) @endforeach @forelse($data as $row) @foreach($monthCols as $c) @endforeach @php $overDeducted = $row['total_tds'] > $row['total_tax']; @endphp @empty @endforelse
# Employee Status Regime Projected Salary Total Tax{{ $c['label'] }}Total TDS
@if($row['is_pending']) @endif {{ $offset + $loop->iteration }} {{ $row['emp_name'] }} @if($row['employee_code']){{ $row['employee_code'] }}@endif @if($row['is_pending']) Pending @else Approved @endif {{ $row['regime'] }} {{ number_format($row['projected_salary'], 0) }} {{ number_format($row['total_tax'], 0) }}{{ ($row['months'][$c['key']] ?? 0) > 0 ? number_format($row['months'][$c['key']], 0) : '—' }} {{ number_format($row['total_tds'], 0) }} @if($overDeducted)@endif
No TDS calculations found for FY {{ $fy->label ?? 'N/A' }}.
@if($data->total() > 0)
{{ $data->links('pagination::bootstrap-5') }}
@endif
{{-- ===================== Filter offcanvas ===================== --}}
Filters
Financial Year
Employee (name / code)
Department
Designation
Category
Grade
@endsection @push('footer-script') @endpush