[fix] [minor] time zone fix
diff --git a/setup/doctype/global_defaults/global_defaults.js b/setup/doctype/global_defaults/global_defaults.js
index 15350b7..8856acb 100644
--- a/setup/doctype/global_defaults/global_defaults.js
+++ b/setup/doctype/global_defaults/global_defaults.js
@@ -4,7 +4,7 @@
$.extend(cur_frm.cscript, {
onload: function(doc) {
var me = this;
- this.time_zone = doc.time_zone;
+ this.timezone = doc.time_zone;
wn.call({
method:"webnotes.country_info.get_country_timezone_info",
@@ -12,7 +12,7 @@
erpnext.country_info = data.message.country_info;
erpnext.all_timezones = data.message.all_timezones;
me.set_timezone_options();
- cur_frm.set_value("time_zone", me.time_zone);
+ cur_frm.set_value("time_zone", me.timezone);
}
});
},
@@ -36,10 +36,11 @@
},
set_timezone_options: function(filtered_options) {
+ var me = this;
if(!filtered_options) filtered_options = [];
var remaining_timezones = $.map(erpnext.all_timezones, function(v)
{ return filtered_options.indexOf(v)===-1 ? v : null; });
-
+
this.frm.set_df_property("time_zone", "options",
(filtered_options.concat([""]).concat(remaining_timezones)).join("\n"));
}