X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7f2cf94759beb6f08ff67bea0b3d1eca671ede3d..8688e71eb56abdd9641f07a47135bb02841607fb:/bin/mozilla/io.pl diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 771e390f9..e331ff7c7 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -37,6 +37,7 @@ use CGI; use CGI::Ajax; use List::Util qw(max first); +use SL::CVar; use SL::Common; use SL::CT; use SL::IC; @@ -1412,7 +1413,7 @@ sub print_form { $form->{language} = "_" . $form->{language}; } - # Format dates. + # Format dates and numbers. format_dates($output_dateformat, $output_longdates, qw(invdate orddate quodate pldate duedate reqdate transdate shippingdate deliverydate validitydate paymentdate @@ -1448,6 +1449,16 @@ sub print_form { grep({ /^qty_\d+$/ } keys(%{$form}))); + my ($cvar_date_fields, $cvar_number_fields) = CVar->get_field_format_list('module' => 'CT', 'prefix' => 'vc_'); + + if (scalar @{ $cvar_date_fields }) { + format_dates($output_dateformat, $output_longdates, @{ $cvar_date_fields }); + } + + while (my ($precision, $field_list) = each %{ $cvar_number_fields }) { + reformat_numbers($output_numberformat, $precision, @{ $field_list }); + } + $form->{IN} = "$form->{formname}$form->{language}${printer_code}.html"; if ($form->{format} eq 'postscript') { $form->{postscript} = 1;