@extends('layouts.print') @section('title', 'Expense '.$expense->reference) @section('kind', 'Expense voucher') @section('number', $expense->reference ?: 'EXP-'.$expense->id) @section('status', title_case_words($expense->status)) @section('content')

Payable to

{{ $expense->vendor ?: '—' }}
@if ($expense->reference)
Reference {{ $expense->reference }}
@endif

Recorded by

{{ $expense->recordedBy?->name ?: '—' }}
@if ($expense->branch)
{{ $expense->branch->name }}
@endif
Date{{ $expense->expense_date?->format('d M Y') }}
Category{{ title_case_words($expense->category) }}
Settled by{{ title_case_words($expense->payment_method ?? 'cash') }}
Status{{ title_case_words($expense->status) }}
DescriptionLedger accountAmount
{{ $expense->description }} {{ $expense->account?->code }} — {{ $expense->account?->name }} {{ money($expense->amount) }}
Total{{ money($expense->amount) }}
@if ($expense->status === 'approved')

Ledger entry

AccountDebitCredit
{{ $expense->account?->code }} — {{ $expense->account?->name }} {{ money($expense->amount) }}
{{ $expense->payment_method === 'on_credit' ? 'Accounts payable' : ($expense->payment_method === 'momo' ? 'Mobile money float' : 'Cash at bank') }} {{ money($expense->amount) }}
@else

Not yet approved — this expense has not been posted to the ledger.

@endif @endsection