-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(VAT ID Check): add address query
- Loading branch information
1 parent
61c5a8c
commit 2160509
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
16 changes: 12 additions & 4 deletions
16
erpnext_germany/erpnext_germany/doctype/vat_id_check/vat_id_check.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
}, | ||
}; | ||
}); | ||
}, | ||
}); |