@extends('garage.layouts.app') @section('title', ($glOrder ?? 'Order').' vouchers') @section('content')

{{ $glOrder ?? 'Order' }} vouchers

{{ $glOrder ?? 'Order' }}: {{ $repairOrder->repair_order_number }} · {{ $repairOrder->repair_order_date }} @if(isset($repairOrder->advance_amount) && (float) $repairOrder->advance_amount > 0) · Advance: PKR {{ number_format((float) $repairOrder->advance_amount, 2) }} @endif

Advance journal: Dr Orders Account, Cr Customer. Editing the order and saving again updates the same active voucher (no duplicate).

@forelse($vouchers as $v) @empty @endforelse
Purpose Voucher Date Type Status Amount Action
{{ str_replace('_', ' ', (string) ($v->purpose ?? 'order')) }} {{ $v->voucher_no }} {{ $v->voucher_date }} {{ $v->voucher_type }} {{ $v->status ?? '—' }} {{ number_format((float) ($v->total_amount ?? $v->link_amount ?? 0), 2) }} Open
No vouchers linked to this {{ strtolower($glOrder ?? 'order') }}. @if(isset($repairOrder->advance_amount) && (float) $repairOrder->advance_amount > 0) Advance is recorded — edit the order and save again to post the journal. @endif
@endsection