diff --git a/erpnext/accounts/doctype/closing_balance/closing_balance.json b/erpnext/accounts/doctype/closing_balance/closing_balance.json index 37d26b8578..ea6da145b7 100644 --- a/erpnext/accounts/doctype/closing_balance/closing_balance.json +++ b/erpnext/accounts/doctype/closing_balance/closing_balance.json @@ -116,7 +116,8 @@ "fieldtype": "Link", "in_standard_filter": 1, "label": "Period Closing Voucher", - "options": "Period Closing Voucher" + "options": "Period Closing Voucher", + "search_index": 1 }, { "default": "0", @@ -128,7 +129,7 @@ "icon": "fa fa-list", "in_create": 1, "links": [], - "modified": "2023-02-27 19:47:36.658224", + "modified": "2023-03-06 08:56:36.393237", "modified_by": "Administrator", "module": "Accounts", "name": "Closing Balance", diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index 9d6f68d192..db6b9dc964 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -201,11 +201,12 @@ def get_opening_balance( ) if doctype == "Closing Balance": - opening_balance = opening_balance.where(closing_balance.closing_date < filters.from_date) if period_closing_voucher: opening_balance = opening_balance.where( closing_balance.period_closing_voucher == period_closing_voucher ) + else: + opening_balance = opening_balance.where(closing_balance.closing_date < filters.from_date) else: opening_balance = opening_balance.where(closing_balance.posting_date < filters.from_date)