From c51485fb8fa147453ce1dcfade187995cf4f5c2c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 28 Nov 2024 14:41:26 +0530 Subject: [PATCH] fix: typeerror on transaction.js --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 8f4d5bda84..a1db2b553d 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1149,7 +1149,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe apply_discount_on_item(doc, cdt, cdn, field) { var item = frappe.get_doc(cdt, cdn); - if(!item.price_list_rate) { + if(item && !item.price_list_rate) { item[field] = 0.0; } else { this.price_list_rate(doc, cdt, cdn); -- GitLab