X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/51323d9abf9834bee661fc17eb4a192182509c2f..61cdba5d566357f3beabe0e7f3f0cb2d7bdccd73:/SL/DN.pm diff --git a/SL/DN.pm b/SL/DN.pm index 94e5b7708..8eb407b60 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -208,7 +208,7 @@ sub create_invoice_for_fees { $query = qq|INSERT INTO ar (id, invnumber, transdate, gldate, customer_id, taxincluded, amount, netamount, paid, duedate, - invoice, curr, notes, + invoice, currency_id, notes, employee_id) VALUES ( ?, -- id @@ -228,7 +228,7 @@ sub create_invoice_for_fees { -- duedate: (SELECT duedate FROM dunning WHERE dunning_id = ? LIMIT 1), 'f', -- invoice - ?, -- curr + (SELECT id FROM currencies WHERE name = ?), -- curr ?, -- notes -- employee_id: (SELECT id FROM employee WHERE login = ?) @@ -368,6 +368,7 @@ sub send_email { my $template = SL::Template::create(type => 'PlainText', form => $form, myconfig => $myconfig); my $mail = Mailer->new(); + $mail->{charset} = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET; $mail->{from} = $myconfig->{email}; $mail->{to} = $ref->{recipient}; $mail->{subject} = $template->parse_block($ref->{email_subject}); @@ -760,7 +761,7 @@ sub print_dunning { ar.transdate, ar.duedate, ar.customer_id, ar.invnumber, ar.ordnumber, ar.cp_id, ar.amount, ar.netamount, ar.paid, - ar.curr, + (SELECT cu.name FROM currencies cu WHERE cu.id=ar.currency_id) AS curr, ar.amount - ar.paid AS open_amount, ar.amount - ar.paid + da.fee + da.interest AS linetotal