@extends('layouts.app') @section('title', 'Account Ledger') @section('page-title', 'Account Ledger') @section('content')
@if($account){{ ucfirst($account->account_type) }} · Normal balance: {{ $account->normal_balance }}
| Date | Voucher # | Type | Narration | Debit (₹) | Credit (₹) | Balance (₹) |
|---|---|---|---|---|---|---|
| — | — | Opening | Opening Balance | {{ $account->normal_balance === 'debit' && $account->opening_balance > 0 ? number_format($account->opening_balance,2) : '—' }} | {{ $account->normal_balance === 'credit' && $account->opening_balance > 0 ? number_format($account->opening_balance,2) : '—' }} | ₹{{ number_format($account->opening_balance,2) }} |
| {{ $entry->voucher->voucher_date->format('d M Y') }} | {{ $entry->voucher->voucher_number }} | {{ str_replace('_',' ',$entry->voucher->voucher_type) }} | {{ $entry->voucher->narration }} | {{ $entry->debit_amount > 0 ? number_format($entry->debit_amount,2) : '—' }} | {{ $entry->credit_amount > 0 ? number_format($entry->credit_amount,2) : '—' }} | ₹{{ number_format(abs($runningBalance),2) }} {{ $runningBalance < 0 ? '(Cr)' : '' }} |
| No transactions in this period | ||||||
| Closing Balance | ₹{{ number_format($entries->sum('debit_amount'),2) }} | ₹{{ number_format($entries->sum('credit_amount'),2) }} | ₹{{ number_format(abs($runningBalance ?? $account->opening_balance),2) }} | |||
Select an account to view its ledger