fix: set/update billing address on change of company

(cherry picked from commit 0adfebee85)
This commit is contained in:
Sanket322
2024-12-25 18:14:10 +05:30
committed by Mergify
parent 6bb2b76040
commit cfa432dbca
2 changed files with 8 additions and 1 deletions

View File

@@ -719,6 +719,14 @@ frappe.ui.form.on("Purchase Invoice", {
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 || "");
},
});
}
},
});

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);
});