fix: allow all dispatch address for drop ship invoice
This commit is contained in:
@@ -107,9 +107,12 @@ $.extend(erpnext.queries, {
|
||||
},
|
||||
|
||||
dispatch_address_query: function (doc) {
|
||||
var filters = { link_doctype: "Company", link_name: doc.company || "" };
|
||||
var is_drop_ship = doc.items.some((item) => item.delivered_by_supplier);
|
||||
if (is_drop_ship) filters = {};
|
||||
return {
|
||||
query: "frappe.contacts.doctype.address.address.address_query",
|
||||
filters: { link_doctype: "Company", link_name: doc.company || "" },
|
||||
filters: filters,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user