Skip to content

Commit

Permalink
fix: allow all dispatch address for drop ship invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Dec 6, 2024
1 parent 029dc94 commit 125a352
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/public/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,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,
};
},

Expand Down

0 comments on commit 125a352

Please sign in to comment.