X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDN.pm;h=6486455910186427fca79d71dd24032731d43ef2;hb=78c8b931b0081dc5c082615c6dac24b7d8f6ff7f;hp=67a7d9ec5f00f50d5ff334a4909deadba79759fe;hpb=dde9d68d7704edcaa4334356cec15ef7ce4f380f;p=kivitendo-erp.git diff --git a/SL/DN.pm b/SL/DN.pm index 67a7d9ec5..648645591 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -714,12 +714,13 @@ sub print_dunning { my $first = 1; while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { if ($first) { - map({ $form->{"dn_$_"} = []; } keys(%{$ref})); + $form->{TEMPLATE_ARRAYS} = {}; + map({ $form->{TEMPLATE_ARRAYS}->{"dn_$_"} = []; } keys(%{$ref})); $first = 0; } map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2) } qw(amount netamount paid open_amount fee interest linetotal); map { $form->{$_} = $ref->{$_} } keys %$ref; - map { push @{ $form->{"dn_$_"} }, $ref->{$_}} keys %$ref; + map { push @{ $form->{TEMPLATE_ARRAYS}->{"dn_$_"} }, $ref->{$_} } keys %$ref; } $sth->finish(); @@ -825,7 +826,7 @@ sub print_invoice_for_fees { c.name, c.department_1, c.department_2, c.street, c.zipcode, c.city, c.country, c.contact, c.customernumber, c.phone, c.fax, c.email, - c.taxnumber, c.sic_code, c.greeting + c.taxnumber, c.greeting FROM ar LEFT JOIN customer c ON (ar.customer_id = c.id) @@ -837,7 +838,7 @@ sub print_invoice_for_fees { $ref = selectfirst_hashref_query($form, $dbh, $query, $form->{login}); map { $form->{"employee_${_}"} = $ref->{$_} } keys %{ $ref }; - $query = qq|SELECT * FROM acc_trans WHERE trans_id = ? ORDER BY oid ASC|; + $query = qq|SELECT * FROM acc_trans WHERE trans_id = ? ORDER BY acc_trans_id ASC|; $sth = prepare_execute_query($form, $dbh, $query, $ar_id); my ($row, $fee, $interest) = (0, 0, 0);