From 16193a614eab509570aa49bcccbd73e80331f41e Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 24 Feb 2021 11:03:24 +0530 Subject: [PATCH] fix: make round off GLE always non-opening Opening GL entries can not be for profit and loss accounts. Round off accounts are by default P&L account. Hence when making opening entry, make round off entries as non-opening. Related issue: ISS-20-21-09677 --- erpnext/accounts/general_ledger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 86504ba47fd..8d265080747 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -252,7 +252,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): if not round_off_gle: for k in ["voucher_type", "voucher_no", "company", - "posting_date", "remarks", "is_opening"]: + "posting_date", "remarks"]: round_off_gle[k] = gl_map[0][k] round_off_gle.update({ @@ -264,6 +264,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): "cost_center": round_off_cost_center, "party_type": None, "party": None, + "is_opening": "No", "against_voucher_type": None, "against_voucher": None })