Skip to content

Commit 6b286ae

Browse files
ervishnucsmergify[bot]
authored andcommitted
fix: check gl account of an associated bank account in bank transaction
(cherry picked from commit 8fe0bf4)
1 parent d59d30c commit 6b286ae

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

erpnext/accounts/doctype/bank_transaction/bank_transaction.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,12 @@ def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries
372372
("unallocated_amount", "bank_account"),
373373
as_dict=True,
374374
)
375+
bt_bank_account = frappe.db.get_value("Bank Account", bt.bank_account, "account")
375376

376-
if bt.bank_account != gl_bank_account:
377+
if bt_bank_account != gl_bank_account:
377378
frappe.throw(
378379
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
379-
bt.bank_account, payment_entry.payment_entry, gl_bank_account
380+
bt_bank_account, payment_entry.payment_entry, gl_bank_account
380381
)
381382
)
382383

0 commit comments

Comments
 (0)