Skip to content

Commit 746b5d9

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 79cf614 commit 746b5d9

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
@@ -375,11 +375,12 @@ def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries
375375
("unallocated_amount", "bank_account"),
376376
as_dict=True,
377377
)
378+
bt_bank_account = frappe.db.get_value("Bank Account", bt.bank_account, "account")
378379

379-
if bt.bank_account != gl_bank_account:
380+
if bt_bank_account != gl_bank_account:
380381
frappe.throw(
381382
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
382-
bt.bank_account, payment_entry.payment_entry, gl_bank_account
383+
bt_bank_account, payment_entry.payment_entry, gl_bank_account
383384
)
384385
)
385386

0 commit comments

Comments
 (0)