15 lines
318 B
Python
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;
|
|
"""
|