From 3ff88dc02952d4148c2ccaa05f6075e2e58899ee Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 14 Jul 2023 15:56:59 +0530 Subject: [PATCH 1/2] fix: Handle multi-company in patch (#36127) fix: Handle multi-compnay in patch (cherry picked from commit ac9ad8ec364fcf507357062db37355b18af66ba9) --- erpnext/patches/v14_0/update_closing_balances.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index 8849c11fcac3..2947b98740b5 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -50,6 +50,7 @@ def execute(): "voucher_no": ["!=", pcv.name], "posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]], "is_opening": "No", + "company": company, }, fields=["*"], ) @@ -58,7 +59,7 @@ def execute(): # add opening entries only for the first pcv closing_entries += frappe.db.get_all( "GL Entry", - filters={"is_cancelled": 0, "is_opening": "Yes"}, + filters={"is_cancelled": 0, "is_opening": "Yes", "company": company}, fields=["*"], ) From 5f0f8444a17448984177907aea9e08621ef3cafa Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 14 Jul 2023 15:59:08 +0530 Subject: [PATCH 2/2] chore: re trigger patch --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2e8b26ff475d..4b09e0c10f6d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -336,4 +336,4 @@ erpnext.patches.v14_0.cleanup_workspaces erpnext.patches.v14_0.enable_allow_existing_serial_no erpnext.patches.v14_0.set_report_in_process_SOA erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance -erpnext.patches.v14_0.update_closing_balances #14-07-2023 +erpnext.patches.v14_0.update_closing_balances #15-07-2023