@php if (!function_exists('amountToWords')) { function amountToWords($number) { $f = new NumberFormatter("en", NumberFormatter::SPELLOUT); return ucfirst($f->format($number)); } } @endphp

BANK PAYMENT VOUCHER

Date: {{ \Carbon\Carbon::parse($bbmp->date)->format('d-M-Y') }}

Voucher No: {{ $bbmp->sno }}

@php $totalAmount = 0; @endphp @foreach ($bbmp->bbdp as $bl) @php $totalAmount += (float)$bl->amount; @endphp @endforeach {{-- 3. Grand Totals --}}
Code Account Title / Head Inv # Debit (Rs.) Credit (Rs.)
{{ $bl->account }} {{ $bl->accountname }} {{ $bl->invno ?? '0' }} {{ number_format($bl->amount, 2) }} 0.00
{{$bbmp->acccode}} {{ $bbmp->accname }} - 0.00 {{ number_format($totalAmount, 2) }}
Total {{ number_format($totalAmount, 2) }} {{ number_format($totalAmount, 2) }}
Rupees: {{ amountToWords($totalAmount) }} Only
Narration: {{ $bbmp->naration ?? 'N/A' }}