Renamed "subject" to "account" in the models of the accounting application.

This commit is contained in:
依瑪貓
2020-07-21 10:43:05 +08:00
parent 076a68c028
commit bace7bb93b
2 changed files with 6 additions and 6 deletions
accounting

@ -865,12 +865,12 @@ def _ledger_accounts():
"""
# TODO: Te be replaced with the Django model queries
return list(Account.objects.raw("""SELECT s.*
FROM accounting_subjects AS s
FROM accounting_accounts AS s
WHERE s.code IN (SELECT s.code
FROM accounting_subjects AS s
FROM accounting_accounts AS s
INNER JOIN (SELECT s.code
FROM accounting_subjects AS s
INNER JOIN accounting_records AS r ON r.subject_sn = s.sn
FROM accounting_accounts AS s
INNER JOIN accounting_records AS r ON r.account_sn = s.sn
GROUP BY s.code) AS u
ON u.code LIKE s.code || '%'
GROUP BY s.code)