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:
ruthra kumar
2024-12-30 12:27:59 +05:30
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -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() {
erpnext.utils.get_address_display(this.frm);
erpnext.utils.set_taxes_from_address(this.frm, "supplier_address", "supplier_address", "supplier_address");

View File

@@ -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);
if (!is_drop_ship) {
console.log('get_shipping_address');
erpnext.utils.get_shipping_address(this.frm, function() {
set_party_account(set_pricing);
});