@extends('layouts.app') @section('title',$receipt->receipt_number) @section('page_title','Receipt Voucher') @section('content') @php($s=$receipt->status instanceof \App\Enums\DocumentStatus?$receipt->status->value:$receipt->status)

{{ $receipt->receipt_number }}

{{ $receipt->party->legal_name }} · {{ ucwords(str_replace('_',' ',$s)) }}

BackPrintPDF@if(in_array($s,['draft','rejected'])&&auth()->user()->hasPermission('receipts.edit_draft'))Edit@endif
Receipt Amount
{{ $receipt->currency_code }} {{ number_format((float)$receipt->amount,2) }}
Allocated
{{ number_format((float)$receipt->allocations->sum('amount'),2) }}
Unallocated / Advance
{{ number_format((float)$receipt->amount-(float)$receipt->allocations->sum('amount'),2) }}
Type
{{ ucwords(str_replace('_',' ',$receipt->receipt_type)) }}
Date
{{ $receipt->receipt_date->format('d M Y') }}
Method
{{ ucwords(str_replace('_',' ',$receipt->payment_method)) }}
Reference
{{ $receipt->reference_number?:'—' }}
Description
{{ $receipt->description?:'—' }}
Branch
{{ $receipt->branch->name }}
@if($receipt->allocations->isNotEmpty())
Invoice Allocations
@foreach($receipt->allocations as $a)@endforeach
InvoiceInvoice TotalAllocated
{{ $a->invoice->invoice_number }}{{ number_format((float)$a->invoice->grand_total,2) }}{{ number_format((float)$a->amount,2) }}
@endif @include('components.workflow-actions',['document'=>$receipt,'routePrefix'=>'receipts','permissionPrefix'=>'receipts','status'=>$s,'postLabel'=>'Post Receipt']) @endsection