@extends('layouts.app') @section('title', 'Payroll Voucher') @section('breadcrumb') @endsection @section('content') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif
Filters
Print Voucher @if(auth()->user()->hasPermission('payroll', 'edit')) @endif {{ $matchCount }} employees match
@if(auth()->user()->hasPermission('payroll', 'edit')) @endif
Payroll Vouchers
@foreach($generator as $key => $value) @endforeach
@forelse($vouchers as $voucher) @empty @endforelse
Voucher No Period Voucher Type Department Employees Earnings Deductions Net Status Actions
{{ $voucher->voucher_no }} {{ $voucher->periodLabel() }} {{ $voucher->typeLabel() }} {{ $voucher->departmentLabel() }} {{ number_format($voucher->employee_count) }} {{ number_format($voucher->total_earnings, 2) }} {{ number_format($voucher->total_deductions, 2) }} {{ number_format($voucher->total_net, 2) }} @php $statusStyle = match($voucher->status) { 'approved' => ['#212529', '#f8f9fa'], 'pending_approval' => ['#664d03', '#fff3cd'], default => ['#495057', '#e9ecef'], }; @endphp {{ $voucher->statusLabel() }}
@if(auth()->user()->hasPermission('payroll','edit') && $voucher->status === 'pending_approval')
@csrf
@endif
No payroll vouchers found.
@if($vouchers->hasPages())
{{ $vouchers->links() }}
@endif
@endsection @push('scripts') @endpush