mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 21:52:21 +01:00
fix: check gl account of an associated bank account in bank transaction
(cherry picked from commit 8fe0bf4ba3)
This commit is contained in:
@@ -372,11 +372,12 @@ def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries
|
|||||||
("unallocated_amount", "bank_account"),
|
("unallocated_amount", "bank_account"),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
bt_bank_account = frappe.db.get_value("Bank Account", bt.bank_account, "account")
|
||||||
|
|
||||||
if bt.bank_account != gl_bank_account:
|
if bt_bank_account != gl_bank_account:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
|
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
|
||||||
bt.bank_account, payment_entry.payment_entry, gl_bank_account
|
bt_bank_account, payment_entry.payment_entry, gl_bank_account
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user