chore: Add missing validations

This commit is contained in:
Deepesh Garg
2023-03-19 12:46:42 +05:30
parent 00fe3042b2
commit 0aadb680eb
3 changed files with 35 additions and 10 deletions

View File

@@ -486,8 +486,6 @@ def get_accounting_entries(
gl_entry.account,
gl_entry.debit,
gl_entry.credit,
gl_entry.is_opening,
gl_entry.fiscal_year,
gl_entry.debit_in_account_currency,
gl_entry.credit_in_account_currency,
gl_entry.account_currency,
@@ -498,7 +496,7 @@ def get_accounting_entries(
query = query.where(gl_entry.account.isin(accounts))
if doctype == "GL Entry":
query = query.select(gl_entry.posting_date)
query = query.select(gl_entry.posting_date, gl_entry.is_opening, gl_entry.fiscal_year)
query = query.where(gl_entry.is_cancelled == 0)
query = query.where(gl_entry.posting_date <= to_date)
else: