mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 14:32:13 +00:00
fix: set/update billing address on change of company
(cherry picked from commit 0adfebee85)
This commit is contained in:
@@ -719,6 +719,14 @@ frappe.ui.form.on("Purchase Invoice", {
|
|||||||
if (response) frm.set_value("credit_to", response.message);
|
if (response) frm.set_value("credit_to", response.message);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.call({
|
||||||
|
method: "erpnext.setup.doctype.company.company.get_default_company_address",
|
||||||
|
args: { name: frm.doc.company },
|
||||||
|
callback: (r) => {
|
||||||
|
frm.set_value("billing_address", r.message || "");
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -959,7 +959,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
let is_drop_ship = me.frm.doc.items.some(item => item.delivered_by_supplier);
|
let is_drop_ship = me.frm.doc.items.some(item => item.delivered_by_supplier);
|
||||||
|
|
||||||
if (!is_drop_ship) {
|
if (!is_drop_ship) {
|
||||||
console.log('get_shipping_address');
|
|
||||||
erpnext.utils.get_shipping_address(this.frm, function() {
|
erpnext.utils.get_shipping_address(this.frm, function() {
|
||||||
set_party_account(set_pricing);
|
set_party_account(set_pricing);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user