X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=f03911c32c153bea5f2358c65a2381b231784181;hb=b3bde077a6df1550915b1433b2cabb4cf74ab681;hp=6ace578f27459f85b8a5e221629b186c8ee6e966;hpb=e09347c89ca119213c4d8ba43083653cda793399;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 6ace578f2..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})) { @@ -378,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})) { @@ -395,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})) {