fix: Cannot read properties of null (reading 'doc')

This commit is contained in:
Rohit Waghchaure
2024-09-05 16:20:56 +05:30
parent f3b91d4d62
commit 62c3389bd6

View File

@@ -1520,8 +1520,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
item_grid.set_column_disp(fname, me.frm.doc.currency != company_currency); item_grid.set_column_disp(fname, me.frm.doc.currency != company_currency);
}); });
var show = (cint(cur_frm.doc.discount_amount)) || var show = (cint(this.frm.doc.discount_amount)) ||
((cur_frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); ((this.frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length);
$.each(["net_rate", "net_amount"], function(i, fname) { $.each(["net_rate", "net_amount"], function(i, fname) {
if(frappe.meta.get_docfield(item_grid.doctype, fname)) if(frappe.meta.get_docfield(item_grid.doctype, fname))