From 60b26ad8b262752e7d491b3fe21b398c0928bfaf Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 15 Jan 2024 20:22:30 +0530 Subject: [PATCH] fix: possible typerror in utils.js and remove unwanted debugging statements --- .../report/budget_variance_report/budget_variance_report.js | 4 ---- erpnext/public/js/utils.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js index 9c356bf28ead..d6a4755d6ae3 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js @@ -84,10 +84,6 @@ function get_filters() { options: budget_against_options, default: "Cost Center", reqd: 1, - get_data: function() { - console.log(this.options); - return ["Emacs", "Rocks"]; - }, on_change: function() { frappe.query_report.set_filter_value("budget_against_filter", []); frappe.query_report.refresh(); diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 598167b33700..de46271e4740 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -21,7 +21,7 @@ $.extend(erpnext, { }, toggle_naming_series: function() { - if(cur_frm.fields_dict.naming_series) { + if(cur_frm && cur_frm.fields_dict.naming_series) { cur_frm.toggle_display("naming_series", cur_frm.doc.__islocal?true:false); } },