From: Sven Schöling Date: Mon, 16 Dec 2013 16:25:49 +0000 (+0100) Subject: Mahnungen: Beim Drucken Datums- und Zahlenformate von anderen Sprachen beachten X-Git-Tag: release-3.1.0beta1~22^2~89 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=381f15f561199cb035f1bb9d7721362a0fc4c0b7;p=kivitendo-erp.git Mahnungen: Beim Drucken Datums- und Zahlenformate von anderen Sprachen beachten --- diff --git a/SL/DN.pm b/SL/DN.pm index b64e48ce6..3b7dc18bb 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -751,6 +751,16 @@ sub print_dunning { $dunning_id =~ s|[^\d]||g; + my ($language_tc, $output_numberformat, $output_dateformat, $output_longdates); + if ($form->{"language_id"}) { + ($language_tc, $output_numberformat, $output_dateformat, $output_longdates) = + AM->get_language_details($myconfig, $form, $form->{language_id}); + } else { + $output_dateformat = $myconfig->{dateformat}; + $output_numberformat = $myconfig->{numberformat}; + $output_longdates = 1; + } + my $query = qq|SELECT da.fee, da.interest, @@ -837,6 +847,17 @@ sub print_dunning { $form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2); $form->{total_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2); + $::form->format_dates($output_dateformat, $output_longdates, + qw(dn_dunning_date dn_dunning_duedate dn_transdate dn_duedate + dunning_date dunning_duedate transdate duedate) + ); + $::form->reformat_numbers($output_numberformat, 2, qw( + dn_amount dn_netamount dn_paid dn_open_amount dn_fee dn_interest dn_linetotal + amount netamount paid open_amount fee interest linetotal + total_interest total_open_interest total_amount total_open_amount + )); + $::form->reformat_numbers($output_numberformat, undef, qw(interest_rate)); + $self->set_customer_cvars($myconfig, $form); $self->set_template_options($myconfig, $form); @@ -851,6 +872,8 @@ sub print_dunning { push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename", 'name' => "dunning_${dunning_id}.pdf" }; + $::lxdebug->dump(0, "form", $::form); + $form->parse_template($myconfig); $dbh->disconnect() unless $provided_dbh;