@php($canManagePayroll = \App\Support\AdminAccess::canAction('staff_payroll', 'edit'))
{{ __('Payroll Module') }}

{{ __('Staff Payroll') }}

@if($canManagePayroll) @endif
@error('from_date') {{ $message }} @enderror
@error('to_date') {{ $message }} @enderror
{{-- {{ __('Selecting a month fills the from and to dates automatically.') }} --}} @error('month') {{ $message }} @enderror
{{ __('Calculation Formula') }}
{{ __('Monthly Salary / Month Days x Present Days') }}
{{ __('Staff Count') }}
{{ $summary['staff_count'] }}
{{ __('Period Days') }}
{{ $summary['period_days'] }}
{{ __('Total Payable') }}
Rs. {{ number_format((float) $summary['total_payable'], 2) }}
{{ __('Remaining Salary') }}
Rs. {{ number_format((float) $summary['total_remaining'], 2) }}
{{ __('Selected Period') }}: {{ $summary['period_label'] }}
{{ __('Payroll Sheet') }}
@forelse($payrollRows as $row) @empty @endforelse
{{ __('Staff') }} {{ __('Period Days') }} {{ __('Present') }} {{ __('Absent') }} {{ __('Monthly Salary') }} {{ __('Payable Salary') }} {{ __('Paid') }} {{ __('Remaining') }} {{ __('Status') }} {{ __('Action') }}
{{ $row['staff_name'] }}
{{ $row['designation'] }}
{{ $row['month_days'] }} {{ $row['present_days'] }} {{ $row['absent_days'] }} Rs. {{ number_format((float) $row['monthly_salary'], 2) }} Rs. {{ number_format((float) $row['payable_salary'], 2) }} Rs. {{ number_format((float) $row['paid_amount'], 2) }}{{ $row['account_name'] ?? __('Account not recorded') }} Rs. {{ number_format((float) $row['remaining_salary'], 2) }} {{ ucfirst($row['status']) }} @if($canManagePayroll)
@endif
{{ __('No payroll data found.') }}
{{ __('Saved Payroll Entries') }}
@forelse($savedPayrollRows as $record) @empty @endforelse
{{ __('Date') }} {{ __('Staff') }} {{ __('Month') }} {{ __('Range') }} {{ __('Account') }} {{ __('Paid') }} {{ __('Remaining') }} {{ __('Status') }} {{ __('Action') }}
{{ optional($record->paid_date)->format('d-m-Y') ?? '-' }} {{ $record->staff?->display_name ?? '-' }} {{ $record->payroll_month ?? '-' }} {{ optional($record->from_date)->format('d-m-Y') ?? '-' }} - {{ optional($record->to_date)->format('d-m-Y') ?? '-' }} {{ $record->account?->account_name ?? __('Account not recorded') }} Rs. {{ number_format((float) $record->paid_amount, 2) }} Rs. {{ number_format((float) $record->remaining_salary, 2) }} {{ ucfirst($record->status) }} @if($canManagePayroll)
@if((float) $record->paid_amount > 0) @endif
@endif
{{ __('No saved payroll entries found.') }}
{{ __('Staff Expenses & Advances') }}
@forelse($staffPayments as $payment) @empty @endforelse
{{ __('Date') }}{{ __('Reference') }}{{ __('Staff') }} {{ __('Type') }}{{ __('Account') }}{{ __('Amount') }} {{ __('Payment Status') }}{{ __('Note') }}
{{ $payment->payment_date->format('d-m-Y') }} STP-{{ $payment->id }} {{ $payment->staff?->display_name ?? '-' }} {{ $payment->type === 'advance' ? __('Advance') : __('Expense') }} {{ $payment->account?->account_name ?? '-' }} Rs. {{ number_format($payment->amount, 2) }} {{ __('Paid') }} {{ $payment->note ?: '-' }}
{{ __('No staff payments in this period.') }}
@if($showStaffPaymentModal) @endif