@extends('layouts.user') @section('title', __('hr.hr_dashboard')) @section('page_title', __('hr.hr_dashboard')) @section('breadcrumb', __('hr.hr_payroll')) @section('content')
{{-- Stats --}}

{{ __('hr.total_employees') }}

{{ $totalEmployees }}

{{ __('hr.active_employees') }}

{{ $activeEmployees }}

{{ __('hr.monthly_employees') }}

{{ $monthlyEmployees }}

{{ __('hr.daily_roz') }}

{{ $dailyRozEmployees }}

{{ __('hr.outstanding_advance') }}

৳ {{ number_format($outstandingAdvance, 2) }}

{{-- Quick Links --}}
👥 {{ __('hr.employees') }} 💰 {{ __('hr.salary') }} 📅 {{ __('hr.attendance') }} 🧾 {{ __('hr.payroll') }} 📊 {{ __('hr.ledger') }}
{{-- Payroll + Recent --}}
{{-- Current Payroll --}}

{{ __('hr.current_payroll') }}

@if($currentPayroll) {{ __('hr.view') }} @endif
@if($currentPayroll)
{{ __('hr.month') }}
{{ sprintf('%02d', $currentPayroll->payroll_month) }}-{{ $currentPayroll->payroll_year }}
{{ __('hr.status') }}
{{ ucwords(str_replace('_', ' ', $currentPayroll->status)) }}
{{ __('hr.gross') }}
৳ {{ number_format($currentPayrollStats['gross'], 2) }}
{{ __('hr.advance') }}
৳ {{ number_format($currentPayrollStats['advance'], 2) }}
{{ __('hr.net') }}
৳ {{ number_format($currentPayrollStats['net'], 2) }}
{{ __('hr.due') }}
৳ {{ number_format($currentPayrollStats['due'], 2) }}
@else
{{ __('hr.no_payroll_generated_this_month') }}
@endif
{{-- Recent Payrolls --}}
{{-- Employees + Advances --}}
{{-- Employees --}}

{{ __('hr.recent_employees') }}

{{ __('hr.all') }}
@forelse($recentEmployees as $employee)
{{ $employee->name }}
{{ $employee->employee_code }}
{{ ucfirst($employee->status) }}
@empty
{{ __('hr.no_employee_found') }}
@endforelse
{{-- Advances --}}

{{ __('hr.recent_advances') }}

{{ __('hr.all') }}
@forelse($recentAdvances as $advance)
{{ $advance->employee?->name ?? '-' }}
{{ optional($advance->advance_date)->format('d M Y') }}
৳ {{ number_format($advance->amount, 2) }}
{{ ucwords(str_replace('_',' ',$advance->status)) }}
@empty
{{ __('hr.no_advance_found') }}
@endforelse
@endsection