mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
* fix: Correct company adderess not getting copied from Purchase Order to Invoice
* fix: Linting issues
(cherry picked from commit fd467e6d32)
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
This commit is contained in:
@@ -851,16 +851,20 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Get default company billing address in Purchase Invoice, Order and Receipt
|
// 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({
|
frappe.call({
|
||||||
'method': 'frappe.contacts.doctype.address.address.get_default_address',
|
method: "erpnext.setup.doctype.company.company.get_default_company_address",
|
||||||
'args': {
|
args: {name: this.frm.doc.company, existing_address: this.frm.doc.billing_address || ""},
|
||||||
'doctype': 'Company',
|
debounce: 2000,
|
||||||
'name': this.frm.doc.company
|
callback: function(r) {
|
||||||
},
|
if (r.message) {
|
||||||
'callback': function(r) {
|
me.frm.set_value("billing_address", r.message);
|
||||||
me.frm.set_value('billing_address', r.message);
|
} else {
|
||||||
|
me.frm.set_value("company_address", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
set_party_account(set_pricing);
|
set_party_account(set_pricing);
|
||||||
|
|||||||
Reference in New Issue
Block a user