fix(minor): filter bank accounts in bank statement import (#37525)
fix: filter by company in bank account
diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.js b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.js
index a70af7a..db68dfa 100644
--- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.js
+++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.js
@@ -2,6 +2,16 @@
// For license information, please see license.txt
frappe.ui.form.on("Bank Statement Import", {
+ onload(frm) {
+ frm.set_query("bank_account", function (doc) {
+ return {
+ filters: {
+ company: doc.company,
+ },
+ };
+ });
+ },
+
setup(frm) {
frappe.realtime.on("data_import_refresh", ({ data_import }) => {
frm.import_in_progress = false;