commit | cd98be6088acc0a9d6170c88da7bdf440306f425 | [log] [tgz] |
---|---|---|
author | Gursheen Anand <gursheen@frappe.io> | Tue Aug 01 23:22:49 2023 +0530 |
committer | Gursheen Anand <gursheen@frappe.io> | Tue Aug 01 23:22:49 2023 +0530 |
tree | 3a05acd4bc78233dbdb1a2b7e8d841c0d0edc7a3 | |
parent | bd3fc7c4342195ce22cd860cba83e287aaac15b5 [diff] |
fix: check root type only when not none
diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index f1e665a..080e45a 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py
@@ -654,11 +654,12 @@ & (gle.posting_date <= to_date) & (account.lft >= root_lft) & (account.rgt <= root_rgt) - & (account.root_type == root_type) ) .orderby(gle.account, gle.posting_date) ) + if root_type: + query = query.where(account.root_type == root_type) additional_conditions = get_additional_conditions(from_date, ignore_closing_entries, filters, d) if additional_conditions: query = query.where(Criterion.all(additional_conditions))