Fixed the date of the brought-forward record in the accounting application.

This commit is contained in:
依瑪貓 2020-07-18 08:46:30 +08:00
parent 85b8515a0a
commit c21f079321

View File

@ -420,8 +420,7 @@ def ledger(request, subject_code, period_spec):
is_credit=True, then=-1), is_credit=True, then=-1),
default=1) * F("amount")))["balance"] default=1) * F("amount")))["balance"]
record_brought_forward = Record( record_brought_forward = Record(
transaction=Transaction( transaction=Transaction(date=period.start),
date=records[-1].transaction.date),
subject=current_subject, subject=current_subject,
summary=pgettext("Accounting|", "Brought Forward"), summary=pgettext("Accounting|", "Brought Forward"),
is_credit=balance < 0, is_credit=balance < 0,