@extends('layouts.app') @section('title', 'Payroll Run') @php $readOnly = $run->status === 'Paid' || $run->status === 'Cancelled'; $rs = match($run->status) { 'Draft' => 's', 'Approved' => 'b', 'Paid' => 'g', default => 'r', }; @endphp @section('content')
← Back to Payroll & HR

Payroll Run

{{ $run->period_start->format('M j, Y') }} – {{ $run->period_end->format('M j, Y') }} {{ $run->status }}

PDF Excel @if($run->status === 'Draft')
@csrf @method('PUT')
@endif
@if ($errors->any())
@foreach ($errors->all() as $err)

{{ $err }}

@endforeach
@endif

Employees Included

{{ $run->items->count() }}

Gross Pay

{{ \App\Support\Format::mwkDecimal($run->total_gross) }}

Deductions

{{ \App\Support\Format::mwkDecimal($run->total_deductions) }}

Net Pay

{{ \App\Support\Format::mwkDecimal($run->total_net) }}

@if($run->status === 'Approved')

Mark as paid

Posts one expense transaction to Finance (category Payroll, grouped under Labour in reports). Cannot be duplicated.

@csrf @method('PUT')
@endif @if($readOnly)

This payroll run is read-only.

@endif

Pay lines

@foreach($run->items as $row) @php $tb = match($row->employment_type_snapshot) { 'Permanent' => 'g', 'Casual' => 'v', default => 'a', }; $is = match($row->status) { 'Paid' => 'g', 'Excluded' => 's', default => 'b', }; @endphp @endforeach
Employee Role Project Type Gross Deductions Net Status
{{ $row->employee_name_snapshot }} {{ $row->job_title_snapshot }} {{ $row->project?->name ?? '—' }} {{ $row->employment_type_snapshot }} {{ \App\Support\Format::mwkDecimal($row->gross_pay) }} {{ \App\Support\Format::mwkDecimal($row->deductions) }} {{ \App\Support\Format::mwkDecimal($row->net_pay) }} {{ $row->status }}
@if($run->transaction_id)

Finance transaction #{{ $run->transaction_id }} @if($run->payment_date) · paid {{ $run->payment_date->format('M j, Y') }} @endif

@endif
@endsection