mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
feat: add dispatch address support in party details and controllers
This commit is contained in:
@@ -54,6 +54,18 @@ erpnext.buying = {
|
||||
return erpnext.queries.company_address_query(this.frm.doc)
|
||||
});
|
||||
}
|
||||
|
||||
if(this.frm.get_field('dispatch_address')) {
|
||||
this.frm.set_query("dispatch_address", () => {
|
||||
if(this.frm.doc.supplier) {
|
||||
return {
|
||||
query: 'frappe.contacts.doctype.address.address.address_query',
|
||||
filters: { link_doctype: 'Supplier', link_name: this.frm.doc.supplier }
|
||||
};
|
||||
} else
|
||||
return erpnext.queries.dispatch_address_query(this.frm.doc)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setup_queries(doc, cdt, cdn) {
|
||||
|
||||
Reference in New Issue
Block a user