fix: Correct company address not getting copied from Purchase Order to Invoice (#27217)
* fix: Correct company adderess not getting copied from Purchase Order to Invoice * fix: Linting issues
This commit is contained in:
parent
9de0f7538f
commit
fd467e6d32
@ -871,16 +871,20 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
});
|
||||
|
||||
// Get default company billing address in Purchase Invoice, Order and Receipt
|
||||
if (this.frm.doc.company && frappe.meta.get_docfield(this.frm.doctype, "billing_address")) {
|
||||
frappe.call({
|
||||
'method': 'frappe.contacts.doctype.address.address.get_default_address',
|
||||
'args': {
|
||||
'doctype': 'Company',
|
||||
'name': this.frm.doc.company
|
||||
},
|
||||
'callback': function(r) {
|
||||
me.frm.set_value('billing_address', r.message);
|
||||
method: "erpnext.setup.doctype.company.company.get_default_company_address",
|
||||
args: {name: this.frm.doc.company, existing_address: this.frm.doc.billing_address || ""},
|
||||
debounce: 2000,
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
me.frm.set_value("billing_address", r.message);
|
||||
} else {
|
||||
me.frm.set_value("company_address", "");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
set_party_account(set_pricing);
|
||||
|
Loading…
x
Reference in New Issue
Block a user