From 82af75d4247c82a5d1d844aa933b70b5d528858f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 14 Dec 2020 12:01:09 +0100 Subject: [PATCH] S:D:Helper:TransNumberGenerator: Warnung vermeiden. Getriggert durch Tests (./t/wh/inventory.t). Tritt aber nur auf, wenn der Nummerkreis noch leer ist. --- SL/DB/Helper/TransNumberGenerator.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1