@extends('layouts.master') @section('title', 'Account Ledger | ') @section('content') @include('partials.header')

Account Ledger

A Printable Ledger Account Format


Account Ledger

Account Name: {{ $payment->Account_Title }}

From: {{ request('from_date') }} To: {{ request('to_date') }}

@php $runningBalance = 0; @endphp @foreach($details as $detail) @php $debit = $detail->entryType == 'D' ? $detail->Amount : 0; $credit = $detail->entryType == 'C' ? $detail->Amount : 0; $runningBalance += ($debit + $credit); @endphp @endforeach
Voucher# Date Entry Narration Debit Credit Closing Balance
{{ $detail->Id }}-{{ $detail->VoucherType }} {{ $detail->VoucherDate }} {{ $detail->Entry_Narration }} {{ number_format($debit, 2) }} {{ number_format($credit, 2) }} {{ number_format($runningBalance, 2) }}
Total {{ number_format($details->where('entryType', 'D')->sum('Amount'), 2) }} {{ number_format($details->where('entryType', 'C')->sum('Amount'), 2) }} {{ number_format($runningBalance, 2) }}
@endsection