@extends('layouts.app') @section('title', 'Locum Payments') @section('content') @include('locum.partials.payroll-tabs', ['active' => 'payments']) @php $canPay = Auth::user()->hasAnyRole('Super Admin','Hospital Admin'); // Receptionist sees a simplified payments view: no payroll math // (Gross / WHT / Deductions / Net), no shift counts, no stat tiles. // They only need to see *that* a locum was paid, when, and how. $canSeeFinancials = Auth::user()->hasAnyRole('Super Admin','Hospital Admin','HR User','Finance User'); @endphp {{-- Filters --}}
@if(request()->hasAny(['search','status']))Clear@endif
{{-- Payments Table --}} @if($canSeeFinancials) @endif @forelse($items as $item) @if($canSeeFinancials) @endif @empty @endforelse
Locum PeriodShifts Gross Pay WHT (5%) Net PayPay Mode Status Transaction Date Paid Actions
{{ $item->locum->full_name ?? '' }}

{{ $item->locum->role_designation ?? '' }} · {{ $item->locum->payment_mode ?? '' }} · {{ $item->locum->mpesa_no ?? $item->locum->bank_name ?? '' }}

{{ $item->batch->month_name ?? '' }}{{ $item->total_shifts }} KES {{ number_format($item->gross_pay) }} KES {{ number_format($item->wht_amount) }} KES {{ number_format($item->net_pay) }}{{ $item->payment_method ?? $item->locum->payment_mode ?? '-' }} {{ ucfirst($item->payment_status) }} {{ $item->transaction_code ?? '-' }} {{ $item->payment_date ? $item->payment_date->format('d M Y') : '-' }} @if($item->payment_status === 'pending') @if($canPay) @else Pending @endif @else Completed @endif
@if(Auth::user()->hasAnyRole('Super Admin','Hospital Admin','HR User')) No payment records found. Generate and approve a payroll batch first from Locum Payroll. @else No payment records found. @endif
@if($items->hasPages())
{{ $items->links() }}
@endif
{{-- Payment Modal --}} @endsection @section('scripts') @endsection