From: Philip Reetz Date: Wed, 8 Aug 2007 14:37:31 +0000 (+0000) Subject: Fehler beim Erstellen von Rechnungen fuer Gebuehren und Zinsen X-Git-Tag: release-2.6.0beta1~525 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b4a36c72d231a71923c181dac77d36f87e37702a;p=kivitendo-erp.git Fehler beim Erstellen von Rechnungen fuer Gebuehren und Zinsen --- diff --git a/SL/DN.pm b/SL/DN.pm index 9c5e7c2e5..061908a5c 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -198,6 +198,7 @@ sub create_invoice_for_fees { } my ($ar_id) = selectrow_query($form, $dbh, qq|SELECT nextval('glid')|); + my $curr = $form->get_default_currency($myconfig); $query = qq|INSERT INTO ar (id, invnumber, transdate, gldate, customer_id, @@ -220,7 +221,7 @@ sub create_invoice_for_fees { ?, -- netamount 0, -- paid -- duedate: - (SELECT duedate FROM dunning WHERE dunning_id = ?), + (SELECT duedate FROM dunning WHERE dunning_id = ? LIMIT 1), 'f', -- invoice ?, -- curr ?, -- notes @@ -233,7 +234,7 @@ sub create_invoice_for_fees { $amount, $amount, $dunning_id, # duedate - (split m/:/, $myconfig->{currency})[0], # currency + $curr, # default currency sprintf($main::locale->text('Automatically created invoice for fee and interest for dunning %s'), $dunning_id), # notes $form->{login}); # employee_id do_query($form, $dbh, $query, @values); @@ -802,7 +803,7 @@ sub print_invoice_for_fees { $query = qq|SELECT - ar.invnumber, ar.transdate, ar.amount, ar.netamount, + ar.invnumber, ar.transdate AS invdate, ar.amount, ar.netamount, ar.duedate, ar.notes, ar.notes AS invoicenotes, c.name, c.department_1, c.department_2, c.street, c.zipcode, c.city, c.country,