Merge pull request #14253 from rohitwaghchaure/financial_report_issue
[Fix] Data not displaying in financial reports
This commit is contained in:
commit
65684564c2
@ -365,10 +365,10 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
company_finance_book = erpnext.get_default_finance_book(filters.get("company"))
|
||||
|
||||
if not filters.get('finance_book') or (filters.get('finance_book') == company_finance_book):
|
||||
additional_conditions.append("finance_book in ('%s', '')" %
|
||||
additional_conditions.append("ifnull(finance_book, '') in ('%s', '')" %
|
||||
frappe.db.escape(company_finance_book))
|
||||
elif filters.get("finance_book"):
|
||||
additional_conditions.append("finance_book = '%s' " %
|
||||
additional_conditions.append("ifnull(finance_book, '') = '%s' " %
|
||||
frappe.db.escape(filters.get("finance_book")))
|
||||
|
||||
return " and {}".format(" and ".join(additional_conditions)) if additional_conditions else ""
|
||||
|
@ -380,10 +380,10 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
company_finance_book = erpnext.get_default_finance_book(filters.get("company"))
|
||||
|
||||
if not filters.get('finance_book') or (filters.get('finance_book') == company_finance_book):
|
||||
additional_conditions.append("finance_book in ('%s', '')" %
|
||||
additional_conditions.append("ifnull(finance_book, '') in ('%s', '')" %
|
||||
frappe.db.escape(company_finance_book))
|
||||
elif filters.get("finance_book"):
|
||||
additional_conditions.append("finance_book = '%s' " %
|
||||
additional_conditions.append("ifnull(finance_book, '') = '%s' " %
|
||||
frappe.db.escape(filters.get("finance_book")))
|
||||
|
||||
return " and {}".format(" and ".join(additional_conditions)) if additional_conditions else ""
|
||||
|
Loading…
Reference in New Issue
Block a user