@extends('layouts.app') @section('title', $run->run_number) @section('content')

Payroll run

{{ $run->run_number }}

{{ $run->period->period_name }} · {{ $run->branch?->name ?? 'All branches' }} · {{ $run->group?->name ?? 'All payroll groups' }}

Back to payroll@if(in_array($run->status,['draft','calculated'])) @if(auth()->check() && auth()->user()->hasPermission('payroll.process'))
@csrf
@endif @endif @if($run->status==='calculated')
@csrf
@elseif($run->status==='hr_reviewed')
@csrf
@elseif($run->status==='finance_reviewed') @if(auth()->check() && auth()->user()->hasPermission('payroll.approve'))
@csrf
@endif @elseif($run->status==='approved') @if(auth()->check() && auth()->user()->hasPermission('payroll.approve'))
@csrf
@endif @endif
{{ str_replace('_',' ',$run->status) }}@foreach(['Calculated','HR reviewed','Finance reviewed','Approved & locked','Paid'] as $index=>$label){{ $label }}@endforeach

Gross payroll

AED {{ number_format((float)$run->gross_total,2) }}

Deductions

AED {{ number_format((float)$run->deduction_total,2) }}

Net payable

AED {{ number_format((float)$run->net_total,2) }}

@if($run->validation_warnings)

Payroll validation warnings

@endif

Employee calculation breakdown

Every amount is stored as a period snapshot; approved payroll cannot be casually edited.

@foreach($run->items as $item) @endforeach
EmployeeBasicAllowancesOTGrossAbsenceUnpaid leaveLoanOther deductionNetActions
{{ $item->employee->full_name }}{{ $item->employee->employee_code }} · {{ $item->working_days }} working / {{ $item->present_days }} presentAED {{ number_format((float)$item->basic_salary,2) }}AED {{ number_format((float)$item->housing_allowance+(float)$item->transport_allowance+(float)$item->other_earnings,2) }}AED {{ number_format((float)$item->overtime_amount,2) }}{{ $item->overtime_minutes }} minAED {{ number_format((float)$item->gross_salary,2) }}AED {{ number_format((float)$item->absence_deduction,2) }}AED {{ number_format((float)$item->unpaid_leave_deduction,2) }}AED {{ number_format((float)$item->loan_deduction,2) }}AED {{ number_format((float)$item->other_deductions,2) }}AED {{ number_format((float)$item->net_salary,2) }}
Payslip@if(in_array($run->status,['draft','calculated'])) @if(auth()->check() && auth()->user()->hasPermission('payroll.process'))@endif @endif
@csrf
@if(in_array($run->status,['approved','paid'])) @if(auth()->check() && auth()->user()->hasPermission('payroll.wps.export'))

WPS salary batches

Prepares a modular salary file only. It does not claim direct bank or government submission.

@csrf
@if($run->paymentBatches->isNotEmpty())
@foreach($run->paymentBatches as $batch){{ $batch->batch_number }} · {{ ucfirst($batch->status) }} ↓@endforeach
@endif
@endif @endif
@endsection