From: Moritz Bunkus Date: Wed, 8 Jan 2014 12:16:06 +0000 (+0100) Subject: DN.pm: SL::TransNumber anstelle von Form->update_defaults für Nummernkreise nutzen X-Git-Tag: release-3.1.0beta1~22^2~22^2~10^2^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6887d2fcd2a7ee651dac6270e71831e8a8e0e5ce;p=kivitendo-erp.git DN.pm: SL::TransNumber anstelle von Form->update_defaults für Nummernkreise nutzen --- diff --git a/SL/DN.pm b/SL/DN.pm index ebfa4f374..b4ad666d0 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -44,6 +44,7 @@ use SL::MoreCommon; use SL::Template; use SL::DB::Printer; use SL::DB::Language; +use SL::TransNumber; use strict; @@ -205,6 +206,7 @@ sub create_invoice_for_fees { my ($ar_id) = selectrow_query($form, $dbh, qq|SELECT nextval('glid')|); my $curr = $form->get_default_currency($myconfig); + my $trans_number = SL::TransNumber->new(type => 'invoice', dbh => $dbh); $query = qq|INSERT INTO ar (id, invnumber, transdate, gldate, customer_id, @@ -235,7 +237,7 @@ sub create_invoice_for_fees { (SELECT id FROM employee WHERE login = ?) )|; @values = ($ar_id, # id - $form->update_defaults($myconfig, 'invnumber', $dbh), # invnumber + $trans_number->create_unique, # invnumber $dunning_id, # customer_id $amount, $amount,