fix: billing address does not belongs to the company error

(cherry picked from commit 9df07b367a)
(cherry picked from commit 5c392d6123)
This commit is contained in:
Rohit Waghchaure
2026-05-29 19:17:34 +05:30
committed by Mergify
parent 9e7b03173d
commit c2063c4707

View File

@@ -176,14 +176,9 @@ erpnext.buying = {
callback: (r) => {
if (!r.message) return;
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") &&
!this.frm.doc.shipping_address
) {
if (frappe.meta.has_field(this.frm.doc.doctype, "shipping_address")) {
this.frm.set_value("shipping_address", r.message.shipping_address || "");
}
},