@extends('index') @section('content')

Expense Info

@if($transaction['bank_id']) @else @endif @php // Properly handle null and zero values in both debit and credit columns // For expense incurred: stored in credit column // For expense reversal: stored in debit column $expenseAmount = 0; if (isset($transaction['credit']) && $transaction['credit'] > 0) { $expenseAmount = $transaction['credit']; } elseif (isset($transaction['debit']) && $transaction['debit'] > 0) { $expenseAmount = $transaction['debit']; } @endphp @if($transaction['description'])@endif
Voucher No: SLE-{{ date('Y') }}-{{ str_pad($transaction['transaction_id'], 4, '0', STR_PAD_LEFT) }}
Paid By: {{$transaction['bname']}}
Account Title: {{$transaction['account_title']}}
Account No: {{$transaction['account']}}
Paid By: Cash Payment
Amount: {{number_format($expenseAmount)}}
Amount in Words: {{ numberToWordsWithCurrency($expenseAmount) }}
Detail:
@php echo $transaction['description'] @endphp
Expense Head: {{$transaction['hname']}}
Expense Date: {{\Carbon\Carbon::parse($transaction['transaction_date'])->format('d-m-Y')}}
@if($image->count())
Images
@foreach($image as $item)
@csrf
@endforeach
@else
No Images
@endif
@endsection