From 6887d2fcd2a7ee651dac6270e71831e8a8e0e5ce Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 8 Jan 2014 13:16:06 +0100 Subject: [PATCH] =?utf8?q?DN.pm:=20SL::TransNumber=20anstelle=20von=20Form?= =?utf8?q?->update=5Fdefaults=20f=C3=BCr=20Nummernkreise=20nutzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DN.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.20.1