@extends('layouts.vouchers') @section('content')

Voucher Details

Back to List @if($voucher->canBeEdited())
@csrf @method('DELETE')
@endif
Voucher Information

Voucher Number: {{ $voucher->voucher_number }}

Sub Agent: {{ $voucher->subAgent->name ?? 'N/A' }}

Type: {{ ucfirst($voucher->voucher_type) }}

Status: {{ ucfirst($voucher->status) }}

Total Amount: {{ number_format($voucher->total_amount, 2) }}

Created: {{ $voucher->created_at->format('M d, Y H:i') }}

Workers
@foreach($voucher->workers as $worker) @endforeach
Name Passport Amount
{{ $worker->name }} {{ $worker->passport_number }} {{ number_format($worker->pivot->amount, 2) }}
Actions
@if($voucher->canBeApproved())
@csrf @method('PATCH')
@endif @if($voucher->canBeRejected())
@csrf @method('PATCH')
@endif @if($voucher->canBeCancelled())
@csrf @method('PATCH')
@endif @if($voucher->canBeMarkedAsPaid())
@csrf @method('PATCH')
@endif
@endsection