From 997240254d5e63c257cf635c6a34fd6166c88813 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 8 Jan 2014 13:05:06 +0100 Subject: [PATCH] =?utf8?q?IS.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/IS.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index b00e809b5..9470f1a9a 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -50,6 +50,7 @@ use SL::IO; use SL::TransNumber; use SL::DB::Default; use SL::DB::Tax; +use SL::TransNumber; use Data::Dumper; use strict; @@ -582,9 +583,8 @@ sub post_invoice { do_query($form, $dbh, $query, $form->{"id"}, $form->{"id"}, $form->{currency}); if (!$form->{invnumber}) { - $form->{invnumber} = - $form->update_defaults($myconfig, $form->{type} eq "credit_note" ? - "cnnumber" : "invnumber", $dbh); + my $trans_number = SL::TransNumber->new(type => $form->{type}, dbh => $dbh, number => $form->{invnumber}, id => $form->{id}); + $form->{invnumber} = $trans_number->create_unique; } } } -- 2.20.1