From 381f15f561199cb035f1bb9d7721362a0fc4c0b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 16 Dec 2013 17:25:49 +0100 Subject: [PATCH] Mahnungen: Beim Drucken Datums- und Zahlenformate von anderen Sprachen beachten --- SL/DN.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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; -- 2.20.1