From 27ecb54b8cd437e6a39e751f3fdd25be5e0c8903 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 27 Jul 2021 17:48:59 +0530 Subject: [PATCH] fix: Deadlock while doing payment reconciliation --- 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 f42899ab5d9..6b2f8e3e88a 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -294,7 +294,8 @@ def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None, select account, posting_date, party_type, party, cost_center, fiscal_year,voucher_type, voucher_no, against_voucher_type, against_voucher, cost_center, company from `tabGL Entry` - where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no), as_dict=True) + where voucher_type=%s and voucher_no=%s + for update""", (voucher_type, voucher_no), as_dict=True) if gl_entries: validate_accounting_period(gl_entries)