mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
fix: preserve address if present
(cherry picked from commit 0678638106)
# Conflicts:
# erpnext/public/js/controllers/transaction.js
This commit is contained in:
@@ -171,13 +171,15 @@ erpnext.buying = {
|
|||||||
shipping_address: this.frm.doc.shipping_address
|
shipping_address: this.frm.doc.shipping_address
|
||||||
},
|
},
|
||||||
callback: (r) => {
|
callback: (r) => {
|
||||||
this.frm.set_value("billing_address", r.message.primary_address || "");
|
if (!this.frm.doc.billing_address)
|
||||||
|
this.frm.set_value("billing_address", r.message.primary_address || "");
|
||||||
|
|
||||||
if (!frappe.meta.has_field(this.frm.doc.doctype, "shipping_address")) return;
|
if (
|
||||||
this.frm.set_value(
|
!frappe.meta.has_field(this.frm.doc.doctype, "shipping_address") ||
|
||||||
"shipping_address",
|
this.frm.doc.shipping_address
|
||||||
r.message.shipping_address || this.frm.doc.shipping_address || ""
|
)
|
||||||
);
|
return;
|
||||||
|
this.frm.set_value("shipping_address", r.message.shipping_address || "");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
erpnext.utils.set_letter_head(this.frm)
|
erpnext.utils.set_letter_head(this.frm)
|
||||||
|
|||||||
@@ -1023,6 +1023,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
set_pricing();
|
set_pricing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
|
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
|
||||||
@@ -1034,6 +1035,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
set_party_account(set_pricing);
|
set_party_account(set_pricing);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
if (
|
||||||
|
frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
|
||||||
|
["Purchase Order", "Purchase Receipt", "Purchase Invoice"].includes(this.frm.doctype) &&
|
||||||
|
!this.frm.doc.shipping_address
|
||||||
|
) {
|
||||||
|
let is_drop_ship = me.frm.doc.items.some((item) => item.delivered_by_supplier);
|
||||||
|
>>>>>>> 0678638106 (fix: preserve address if present)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
set_party_account(set_pricing);
|
set_party_account(set_pricing);
|
||||||
|
|||||||
Reference in New Issue
Block a user