Files
njts-accounting-core/backend/app/modules/general_ledger/sql.py
2025-12-14 23:54:48 +09:00

15 lines
318 B
Python

# sql.py
GENERAL_LEDGER_SQL = """
SELECT
j.journal_date,
j.description,
l.debit,
l.credit
FROM journal_lines l
JOIN journal_entries j
ON j.journal_id = l.journal_id
WHERE l.account_id = %(account_id)s
AND j.journal_date BETWEEN %(date_from)s AND %(date_to)s
ORDER BY j.journal_date, l.line_id;
"""