@extends('layouts.school') @section('title', 'Payroll Run ' . $run->label()) @section('header', 'Payroll Run — ' . $run->period_start->format('M j') . ' – ' . $run->period_end->format('M j, Y')) @section('content') @php $statusColors = [ 'draft' => 'badge-gray', 'approved' => 'badge-blue', 'paid' => 'badge-green', 'cancelled' => 'badge-red', ]; @endphp
{{ ucfirst($run->status) }} @if ($run->status === 'draft')
@csrf @method('PATCH')
@endif @if ($run->status === 'approved')
@csrf @method('PATCH')
@endif @if (in_array($run->status, ['draft', 'approved']))
@csrf @method('PATCH')
@endif
@if ($errors->has('status'))
{{ $errors->first('status') }}
@endif

Staff

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

Gross

₦{{ number_format($run->total_gross, 2) }}

Deductions

₦{{ number_format($run->total_deductions, 2) }}

Net pay

₦{{ number_format($run->total_net, 2) }}

@forelse ($run->items as $item) @empty @endforelse @if ($run->status === 'paid' && $run->paid_at) @endif
Staff Basic Allowances Deductions Gross Net Bank
{{ $item->full_name }} ₦{{ number_format($item->basic_salary, 2) }} ₦{{ number_format($item->allowances_total, 2) }} ₦{{ number_format($item->deductions_total, 2) }} ₦{{ number_format($item->gross, 2) }} ₦{{ number_format($item->net, 2) }} @if ($item->bank_name && $item->account_number) {{ $item->bank_name }} ··{{ substr($item->account_number, -4) }} @else — @endif
No staff in this run.
Disbursed {{ $run->paid_at->format('M j, Y g:i A') }} into the cashbook.
@endsection