Merge pull request #39907 from frappe/mergify/bp/version-15-hotfix/pr-39857

fix: fetch company terms (backport #39857)
This commit is contained in:
Raffael Meyer 2024-02-17 01:11:09 +01:00 committed by GitHub
commit 0b7a95351a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,23 +14,8 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
super.setup(doc);
}
company() {
super.company();
erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype);
let me = this;
if (this.frm.doc.company) {
frappe.call({
method:
"erpnext.accounts.party.get_party_account",
args: {
party_type: 'Customer',
party: this.frm.doc.customer,
company: this.frm.doc.company
},
callback: (response) => {
if (response) me.frm.set_value("debit_to", response.message);
},
});
}
}
onload() {
var me = this;