X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=f03911c32c153bea5f2358c65a2381b231784181;hb=b3bde077a6df1550915b1433b2cabb4cf74ab681;hp=c8d7d6bb29e2b780176f34fdf8b8c0b1d74ed7a5;hpb=1043d7f814fccf5864e677b1e38577d0a150026c;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index c8d7d6bb2..f03911c32 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -351,6 +351,14 @@ sub format_dates { $dateformat = $myconfig{"dateformat"} unless ($dateformat); foreach my $idx (@indices) { + if ($form->{TEMPLATE_ARRAYS} && (ref($form->{TEMPLATE_ARRAYS}->{$idx}) eq "ARRAY")) { + for (my $i = 0; $i < scalar(@{$form->{TEMPLATE_ARRAYS}->{$idx}}); $i++) { + $form->{TEMPLATE_ARRAYS}->{$idx}->[$i] = + $locale->reformat_date(\%myconfig, $form->{TEMPLATE_ARRAYS}->{$idx}->[$i], + $dateformat, $longformat); + } + } + next unless (defined($form->{$idx})); if (!ref($form->{$idx})) { @@ -364,13 +372,6 @@ sub format_dates { $dateformat, $longformat); } } - if (ref($form->{TEMPLATE_ARRAYS}->{$idx}) eq "ARRAY") { - for (my $i = 0; $i < scalar(@{$form->{TEMPLATE_ARRAYS}->{$idx}}); $i++) { - $form->{TEMPLATE_ARRAYS}->{$idx}->[$i] = - $locale->reformat_date(\%myconfig, $form->{TEMPLATE_ARRAYS}->{$idx}->[$i], - $dateformat, $longformat); - } - } } $lxdebug->leave_sub(); @@ -385,6 +386,12 @@ sub reformat_numbers { if (!$numberformat || ($numberformat eq $myconfig{"numberformat"})); foreach my $idx (@indices) { + if ($form->{TEMPLATE_ARRAYS} && (ref($form->{TEMPLATE_ARRAYS}->{$idx}) eq "ARRAY")) { + for (my $i = 0; $i < scalar(@{$form->{TEMPLATE_ARRAYS}->{$idx}}); $i++) { + $form->{TEMPLATE_ARRAYS}->{$idx}->[$i] = $form->parse_amount(\%myconfig, $form->{TEMPLATE_ARRAYS}->{$idx}->[$i]); + } + } + next unless (defined($form->{$idx})); if (!ref($form->{$idx})) { @@ -402,6 +409,12 @@ sub reformat_numbers { $myconfig{"numberformat"} = $numberformat; foreach my $idx (@indices) { + if ($form->{TEMPLATE_ARRAYS} && (ref($form->{TEMPLATE_ARRAYS}->{$idx}) eq "ARRAY")) { + for (my $i = 0; $i < scalar(@{$form->{TEMPLATE_ARRAYS}->{$idx}}); $i++) { + $form->{TEMPLATE_ARRAYS}->{$idx}->[$i] = $form->format_amount(\%myconfig, $form->{TEMPLATE_ARRAYS}->{$idx}->[$i], $places); + } + } + next unless (defined($form->{$idx})); if (!ref($form->{$idx})) {