From ab92e330dae8528faf5a98910b693b31a7ceb2ba Mon Sep 17 00:00:00 2001 From: P-Froggy <60393001+P-Froggy@users.noreply.github.com> Date: Sun, 16 Feb 2020 23:08:32 +0100 Subject: [PATCH] Fix: Wrong filter for supplier default bank account The query for default bank account field in the supplier master only allowed company bank accounts. With this fix it's now possible to one of the supplier bank accounts as default bank account. --- erpnext/buying/doctype/supplier/supplier.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js index 4ddc458175..074888afd9 100644 --- a/erpnext/buying/doctype/supplier/supplier.js +++ b/erpnext/buying/doctype/supplier/supplier.js @@ -17,10 +17,11 @@ frappe.ui.form.on("Supplier", { } } }); - frm.set_query("default_bank_account", function() { + frm.set_query("default_bank_account", function(doc, cdt, cdn) { return { filters: { - "is_company_account":1 + "is_company_account":0, + "party":doc.name } } });