@extends('dashboard.layouts.app') @section('content') @include('components.alert') @php $currentMonth = now()->month; $currentYear = now()->year; $monthParam = request('month'); $yearParam = request('year'); $isAllMonth = ($monthParam === 'all'); $isAllYear = ($yearParam === 'all'); $selectedMonth = $isAllMonth ? null : (int) ($monthParam ?: $currentMonth); $selectedYear = $isAllYear ? null : (int) ($yearParam ?: $currentYear); $selectedMonthName = $selectedMonth ? date('F', mktime(0, 0, 0, $selectedMonth, 10)) : 'All months'; $selectedYearLabel = $selectedYear ? (string) $selectedYear : 'All years'; $canCheckRun = !is_null($selectedMonth) && !is_null($selectedYear); $runExistsForSelected = $canCheckRun ? DB::table('payroll_runs')->where('month', $selectedMonth)->where('year', $selectedYear)->exists() : null; $payrollRowsCount = !empty($rows) ? collect($rows)->count() : 0; @endphp
Current payroll view is filtered by the selected month and year.
Staff payroll records with pay period, run date, salary values, payment method, and payment status.
There are no payroll records matching the current period.
There are no payroll records matching the current period.