use SL::DB::Manager::AuthUser;
use SL::DB::Helper::Util;
-use constant CONFIG_VARS => qw(copies countrycode dateformat default_media default_printer_id email favorites fax hide_cvar_search_options mandatory_departments menustyle name
+use constant CONFIG_VARS => qw(copies countrycode dateformat timeformat default_media default_printer_id email favorites fax hide_cvar_search_options mandatory_departments menustyle name
numberformat show_form_details signature stylesheet taxincluded_checked tel template_format vclimit);
__PACKAGE__->meta->add_relationship(
sub format_date_object_to_time {
my ($self, $datetime, %params) = @_;
- return $datetime->strftime('%H:%M');
+ my $format = $::myconfig{timeformat} || 'hh:mm';
+ $format =~ s/hh/\%H/;
+ $format =~ s/mm/\%M/;
+ $format =~ s/ss/\%S/;
+
+ return $datetime->strftime($format);
}
sub format_date_object {
my $locale = $main::locale;
_build_cfg_options('dateformat', qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd));
+ _build_cfg_options('timeformat', qw(hh:mm hh:mm:ss));
_build_cfg_options('numberformat', ('1,000.00', '1000.00', '1.000,00', '1000,00'));
my @formats = ();
'This user will have access to the following clients' => 'Dieser Benutzer wird Zugriff auf die folgenden Mandanten haben',
'This vendor number is already in use.' => 'Diese Lieferantennummer wird bereits verwendet.',
'Three Options:' => 'Drei Optionen:',
+ 'Time Format' => 'Uhrzeitformat',
'Time Tracking' => 'Zeiterfassung',
'Time period for the analysis:' => 'Analysezeitraum:',
'Timestamp' => 'Uhrzeit',
<td><input name="fax" size="14" value="[% HTML.escape(myconfig_fax) %]"></td>
</tr>
- <tr>
- <th align="right"q>[% 'taxincluded checked' | $T8 %]</th>
+ <tr>
+ <th align="right">[% 'taxincluded checked' | $T8 %]</th>
<td>
[% L.yes_no_tag('taxincluded_checked', myconfig_taxincluded_checked) %]
</td>
[% L.select_tag('dateformat', DATEFORMATS, value_key = 'value', title_key = 'name') %]
</td>
</tr>
+ <tr>
+ <th align="right">[% 'Time Format' | $T8 %]</th>
+ <td>
+ [% L.select_tag('timeformat', TIMEFORMATS, value_key = 'value', title_key = 'name') %]
+ </td>
+ </tr>
<tr>
<th align="right">[% 'Output Number Format' | $T8 %]</th>
<td>