From: Moritz Bunkus Date: Wed, 8 Jan 2014 12:05:06 +0000 (+0100) Subject: IS.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~6 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=997240254d5e63c257cf635c6a34fd6166c88813;p=kivitendo-erp.git IS.pm: SL::TransNumber anstelle von Form->update_defaults für Nummernkreise nutzen --- 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; } } }