diff --git a/application/views/sales/form.php b/application/views/sales/form.php index 306d5202d..48b6ae5ab 100755 --- a/application/views/sales/form.php +++ b/application/views/sales/form.php @@ -159,20 +159,24 @@ $(document).ready(function() "lang->line("common_monthsshort_december"); ?>"], today: "lang->line("common_today"); ?>", config->item('timeformat'); - $m = $t[strlen($t)-1]; - if( $m == 'a') - { + if( strpos($this->config->item('timeformat'), 'a') !== false ) + { ?> - meridiem: ["am", "pm"], + meridiem: ["am", "pm"], config->item('timeformat'), 'A') !== false ) + { ?> - meridiem: ["AM", "PM"], + meridiem: ["AM", "PM"], + meridiem: [], + weekStart: lang->line("common_weekstart"); ?>, }; @@ -181,20 +185,20 @@ $(document).ready(function() format: "config->item("dateformat")) . ' ' . dateformat_bootstrap($this->config->item("timeformat"));?>", startDate: "config->item('dateformat') . ' ' . $this->config->item('timeformat'), mktime(0, 0, 0, 1, 1, 2010));?>", config->item('timeformat'); - $m = $t[strlen($t)-1]; - if( $m == 'a' || $m == 'A' ) - { + $t = $this->config->item('timeformat'); + $m = $t[strlen($t)-1]; + if( strpos($this->config->item('timeformat'), 'a') !== false || strpos($this->config->item('timeformat'), 'A') !== false ) + { ?> - showMeridian: true, + showMeridian: true, - showMeridian: false, + showMeridian: false, minuteStep: 1, autoclose: true, diff --git a/application/views/sales/manage.php b/application/views/sales/manage.php index 5872c5bb1..8c8c5e134 100755 --- a/application/views/sales/manage.php +++ b/application/views/sales/manage.php @@ -102,20 +102,24 @@ $(document).ready(function() "lang->line("common_monthsshort_december"); ?>"], today: "lang->line("common_today"); ?>", config->item('timeformat'); - $m = $t[strlen($t)-1]; - if( $m == 'a') - { + if( strpos($this->config->item('timeformat'), 'a') !== false ) + { ?> - meridiem: ["am", "pm"], + meridiem: ["am", "pm"], config->item('timeformat'), 'A') !== false ) + { ?> - meridiem: ["AM", "PM"], + meridiem: ["AM", "PM"], + meridiem: [], + weekStart: lang->line("common_weekstart"); ?> }; @@ -125,20 +129,20 @@ $(document).ready(function() format: "config->item("dateformat")) . ' ' . dateformat_bootstrap($this->config->item("timeformat"));?>", startDate: "config->item('dateformat') . ' ' . $this->config->item('timeformat'), mktime(0, 0, 0, 1, 1, 2010));?>", config->item('timeformat'); - $m = $t[strlen($t)-1]; - if( $m == 'a' || $m == 'A' ) - { + $t = $this->config->item('timeformat'); + $m = $t[strlen($t)-1]; + if( strpos($this->config->item('timeformat'), 'a') !== false || strpos($this->config->item('timeformat'), 'A') !== false ) + { ?> - showMeridian: true, + showMeridian: true, - showMeridian: false, + showMeridian: false, autoclose: true, todayBtn: true,