X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDN.pm;h=39ea64b0ecaccb4c9608f9643dff21573ebc49ff;hb=7ed4b336b89b861479a1fc2670b9456334b0d1be;hp=b4ad666d0bbee34182a971ca255e3ca1f4a87e5d;hpb=6887d2fcd2a7ee651dac6270e71831e8a8e0e5ce;p=kivitendo-erp.git diff --git a/SL/DN.pm b/SL/DN.pm index b4ad666d0..39ea64b0e 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -248,19 +248,21 @@ sub create_invoice_for_fees { do_query($form, $dbh, $query, @values); $query = - qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey) - VALUES (?, ?, ?, current_date, current_date, 0)|; + qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey, tax_id, chart_link) + VALUES (?, ?, ?, current_date, current_date, 0, + (SELECT id FROM tax WHERE (taxkey = 0) AND (rate = 0)), + (SELECT link FROM chart WHERE id = ?))|; $sth = prepare_query($form, $dbh, $query); - @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining); + @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining, conv_i($form->{AR_amount_fee})); do_statement($form, $sth, $query, @values); if ($interest_remaining) { - @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining); + @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining, conv_i($form->{AR_amount_interest})); do_statement($form, $sth, $query, @values); } - @values = ($ar_id, conv_i($form->{AR}), -1 * $amount); + @values = ($ar_id, conv_i($form->{AR}), -1 * $amount, conv_i($form->{AR})); do_statement($form, $sth, $query, @values); $sth->finish(); @@ -377,9 +379,7 @@ sub send_email { $mail->{subject} = $template->parse_block($ref->{email_subject}); $mail->{message} = $template->parse_block($ref->{email_body}); - if ($myconfig->{signature}) { - $mail->{message} .= "\n-- \n$myconfig->{signature}"; - } + $mail->{message} .= $form->create_email_signature(); $mail->{message} =~ s/\r\n/\n/g; @@ -873,7 +873,7 @@ sub print_dunning { push @{ $form->{DUNNING_PDFS} }, $filename; push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename", - 'name' => "dunning_${dunning_id}.pdf" }; + 'name' => $form->get_formname_translation('dunning') . "_${dunning_id}.pdf" }; $form->parse_template($myconfig);