Fixed the ledger when there is no brought-forward records in the accounting application.
This commit is contained in:
parent
4c821a73ea
commit
39428d1d35
@ -427,7 +427,7 @@ def ledger(request, subject_code, period_spec):
|
||||
period.start - timedelta(days=1),
|
||||
current_subject.code + "%"])
|
||||
row = cursor.fetchone()
|
||||
balance = row[0]
|
||||
balance = 0 if row[0] is None else row[0]
|
||||
record_brought_forward = Record(
|
||||
transaction=Transaction(
|
||||
date=records[-1].transaction.date),
|
||||
|
Loading…
Reference in New Issue
Block a user