Merge pull request #38580 from ruthra-kumar/finance_book_filter_bug_in_general_ledger

fix: sql error while filtering on finance book in GL
This commit is contained in:
ruthra kumar 2023-12-05 14:40:34 +05:30 committed by GitHub
commit 5da3e532c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,8 @@ def get_conditions(filters):
if accounting_dimensions:
for dimension in accounting_dimensions:
if not dimension.disabled:
# Ignore 'Finance Book' set up as dimension in below logic, as it is already handled in above section
if not dimension.disabled and dimension.document_type != "Finance Book":
if filters.get(dimension.fieldname):
if frappe.get_cached_value("DocType", dimension.document_type, "is_tree"):
filters[dimension.fieldname] = get_dimension_with_children(