fix: Use extend_cscript function to properly extend class methods to cscript

This commit is contained in:
Suraj Shetty
2021-05-21 17:03:09 +05:30
parent 94a52c0e17
commit 81d49e9c71
23 changed files with 42 additions and 35 deletions

View File

@@ -166,7 +166,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
"account_list": frappe.flags.round_off_applicable_accounts
},
callback(r) {
frappe.flags.round_off_applicable_accounts.push(...r.message);
if (r.message) {
frappe.flags.round_off_applicable_accounts.push(...r.message);
}
}
});
}

View File

@@ -5,7 +5,7 @@ frappe.provide('erpnext.accounts.dimensions');
erpnext.TransactionController = class TransactionController extends erpnext.taxes_and_totals {
setup() {
this._super();
super.setup();
frappe.flags.hide_serial_batch_dialog = true;
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);