From 26f93f57b8e488fb8d340631021f7663948734e7 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 27 Mar 2025 01:04:38 +0530 Subject: [PATCH] fix: include auto_reconcile_vouchers flag in background job (cherry picked from commit 35fbbc20576fa9533cb7862b11b1ff7c949e61e4) --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index d47cc7b5968..7f97c3677bd 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -374,8 +374,6 @@ def auto_reconcile_vouchers( from_reference_date=None, to_reference_date=None, ): - frappe.flags.auto_reconcile_vouchers = True - bank_transactions = get_bank_transactions(bank_account) if len(bank_transactions) > 10: @@ -404,6 +402,8 @@ def auto_reconcile_vouchers( def start_auto_reconcile( bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date ): + frappe.flags.auto_reconcile_vouchers = True + reconciled, partially_reconciled = set(), set() for transaction in bank_transactions: linked_payments = get_linked_payments(