mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
Merge pull request #44963 from frappe/mergify/bp/version-15-hotfix/pr-44906
fix: set/update billing address on change of company (backport #44906)
This commit is contained in:
@@ -145,6 +145,18 @@ erpnext.buying = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
company(){
|
||||||
|
if(!frappe.meta.has_field(this.frm.doc.doctype, "billing_address")) return;
|
||||||
|
|
||||||
|
frappe.call({
|
||||||
|
method: "erpnext.setup.doctype.company.company.get_default_company_address",
|
||||||
|
args: { name: this.frm.doc.company, existing_address:this.frm.doc.billing_address },
|
||||||
|
callback: (r) => {
|
||||||
|
this.frm.set_value("billing_address", r.message || "");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
supplier_address() {
|
supplier_address() {
|
||||||
erpnext.utils.get_address_display(this.frm);
|
erpnext.utils.get_address_display(this.frm);
|
||||||
erpnext.utils.set_taxes_from_address(this.frm, "supplier_address", "supplier_address", "supplier_address");
|
erpnext.utils.set_taxes_from_address(this.frm, "supplier_address", "supplier_address", "supplier_address");
|
||||||
|
|||||||
@@ -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