From: Bernd Bleßmann Date: Mon, 14 Dec 2020 11:01:09 +0000 (+0100) Subject: S:D:Helper:TransNumberGenerator: Warnung vermeiden. X-Git-Tag: kivitendo-mebil_0.1-0~9^2~558 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=82af75d4247c82a5d1d844aa933b70b5d528858f;p=kivitendo-erp.git S:D:Helper:TransNumberGenerator: Warnung vermeiden. Getriggert durch Tests (./t/wh/inventory.t). Tritt aber nur auf, wenn der Nummerkreis noch leer ist. --- diff --git a/SL/DB/Helper/TransNumberGenerator.pm b/SL/DB/Helper/TransNumberGenerator.pm index a28f11f71..5b45853db 100644 --- a/SL/DB/Helper/TransNumberGenerator.pm +++ b/SL/DB/Helper/TransNumberGenerator.pm @@ -98,7 +98,7 @@ sub get_next_trans_number { my $range_table = ($business ? $business : SL::DB::Default->get)->load(for_update => 1); my $start_number = $range_table->$number_range_column; - $start_number = $range_table->articlenumber if ($number_range_column =~ /^(assemblynumber|assortmentnumber)$/) && (length($start_number) < 1); + $start_number = $range_table->articlenumber if ($number_range_column =~ /^(assemblynumber|assortmentnumber)$/) && (length($start_number)//0 < 1); my $sequence = SL::PrefixedNumber->new(number => $start_number // 0); if (!$fill_holes_in_range) {