mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-31 23:07:51 +00:00
fix: keep customer shipping address on drop ship purchase order (backport #59415)
Drop ship Purchase Orders keep the customer's shipping address.
(cherry picked from commit 56e9e6f8ed)
This commit is contained in:
@@ -178,7 +178,11 @@ erpnext.buying = {
|
||||
|
||||
this.frm.set_value("billing_address", r.message.primary_address || "");
|
||||
|
||||
if (frappe.meta.has_field(this.frm.doc.doctype, "shipping_address")) {
|
||||
const is_drop_ship = this.frm.doc.items.some((item) => item.delivered_by_supplier);
|
||||
if (
|
||||
frappe.meta.has_field(this.frm.doc.doctype, "shipping_address") &&
|
||||
!is_drop_ship
|
||||
) {
|
||||
this.frm.set_value("shipping_address", r.message.shipping_address || "");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user