From 49f28b0dbbaaad97f80f74921b8d80e22f39e159 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:17:04 +0530 Subject: [PATCH] fix: Accounts closing balance patch (#36113) fix: Accounts closing balance patch (#36113) fix: Accounts closing balance patch (#36113) (cherry picked from commit d631c7dffaab22709cfbeaf6d306a9eba3c2a4ca) Co-authored-by: Deepesh Garg (cherry picked from commit cf29156139b56f3aaf72d45095e82a4329348c5e) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/patches/v14_0/update_closing_balances.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index d66467775c8..9a814f3ee4f 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -62,7 +62,10 @@ def execute(): entry["closing_date"] = pcv_doc.posting_date entry["period_closing_voucher"] = pcv_doc.name - make_closing_entries(gl_entries + closing_entries, voucher_name=pcv.name) + entries = gl_entries + closing_entries + if entries: + make_closing_entries(entries, voucher_name=pcv.name) + company_wise_order[pcv.company].append(pcv.posting_date) i += 1