From 2160509ff27d340a5071c93d8eb25daf1161b038 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:01:14 +0200 Subject: [PATCH] fix(VAT ID Check): add address query --- .../doctype/vat_id_check/vat_id_check.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/erpnext_germany/erpnext_germany/doctype/vat_id_check/vat_id_check.js b/erpnext_germany/erpnext_germany/doctype/vat_id_check/vat_id_check.js index 1c272d6..7604ba8 100644 --- a/erpnext_germany/erpnext_germany/doctype/vat_id_check/vat_id_check.js +++ b/erpnext_germany/erpnext_germany/doctype/vat_id_check/vat_id_check.js @@ -1,8 +1,16 @@ // Copyright (c) 2023, ALYF GmbH and contributors // For license information, please see license.txt -frappe.ui.form.on('VAT ID Check', { - // refresh: function(frm) { - - // } +frappe.ui.form.on("VAT ID Check", { + setup: function (frm) { + frm.set_query("customer_address", function (doc) { + return { + query: "frappe.contacts.doctype.address.address.address_query", + filters: { + link_doctype: "Customer", + link_name: doc.customer, + }, + }; + }); + }, });