@extends('layouts.app') @section('content')

Account Ledger Report

@csrf
@isset($data)
Back Export PDF Export To Excel Crystal Report
@if(isset($accountTitle) && isset($openingBalance))
Account Title: {{ $accountTitle }}
Opening Balance: {{ number_format($openingBalance, 2) }}
@endif
{{-- NEW --}} @php $balance = 0; @endphp @forelse($data as $row) @php $amount = floatval($row->Amount); @endphp @php $balance += $row->Amount; @endphp {{-- Cl. Balance --}} @empty @endforelse
Voucher ID Voucher Date Remarks Cheque Debit Credit Cl. Balance
{{ $row->Voucher }}{{ $row->VoucherDate }} {{ $row->Remarks }} {{ $row->Cheque_No }} {{ $amount > 0 ? number_format($amount, 2) : '' }} {{ $amount < 0 ? number_format(abs($amount), 2) : '' }} {{ number_format($balance, 2) }}
No data found for the selected filters.
@endisset
@endsection