From 62c3389bd620f4d31eb8ee4df6fbf3dec03e3ae6 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 5 Sep 2024 16:20:56 +0530 Subject: [PATCH] fix: Cannot read properties of null (reading 'doc') --- erpnext/public/js/controllers/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index c93afc7aceea..18bfbd0fa088 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1520,8 +1520,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe item_grid.set_column_disp(fname, me.frm.doc.currency != company_currency); }); - var show = (cint(cur_frm.doc.discount_amount)) || - ((cur_frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); + var show = (cint(this.frm.doc.discount_amount)) || + ((this.frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); $.each(["net_rate", "net_amount"], function(i, fname) { if(frappe.meta.get_docfield(item_grid.doctype, fname))