From 78ca88d227a0c559e7911e5b0cd5920c67e33a8c Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 23 Mar 2022 13:55:05 +0530 Subject: [PATCH] fix: Check if onload property exists in the form object --- 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 5543dfe784..43ee5b31c7 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1070,7 +1070,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } if(flt(this.frm.doc.conversion_rate)>0.0) { - if(this.frm.doc.__onload.ignore_price_list) { + if(this.frm.doc.__onload && this.frm.doc.__onload.ignore_price_list) { this.calculate_taxes_and_totals(); } else if (!this.in_apply_price_list){ this.apply_price_list();