Revised the cash account view in the accounting application.

This commit is contained in:
依瑪貓 2020-07-14 22:16:13 +08:00
parent c65d778a1b
commit 14ed892534

View File

@ -74,6 +74,7 @@ def cash(request, subject_code, period_spec):
last_txn = Transaction.objects.order_by("-date").first()
data_end = last_txn.date if last_txn is not None else None
period = Period(period_spec, data_start, data_end)
# The subject
subjects = list(Subject.objects.raw("""SELECT s.*
FROM accounting_subjects AS s
WHERE s.code IN (SELECT s1.code