fix: Check if onload property exists in the form object
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 5543dfe..43ee5b3 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -1070,7 +1070,7 @@
}
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();