Verknüpfte Belege: Unterstützung für Pflichtenhefte
[kivitendo-erp.git] / SL / DB / Helper / TransNumberGenerator.pm
index e4af04d..9684677 100644 (file)
@@ -75,7 +75,7 @@ sub get_next_trans_number {
   my $range_table    = $business ? $business : SL::DB::Default->get;
   my $start_number   = $range_table->$number_range_column;
   $start_number      = $range_table->articlenumber if ($number_range_column eq 'assemblynumber') && (length($start_number) < 1);
-  my $sequence       = SL::PrefixedNumber->new(number => $start_number);
+  my $sequence       = SL::PrefixedNumber->new(number => $start_number // 0);
 
   if (!$fill_holes_in_range) {
     my @numbers = map { $_->$number_column } @{ $self->_get_manager_class->get_all(%conditions) };
@@ -139,8 +139,7 @@ prefix, if present, will be kept intact.
 Now the number itself is increased as often as neccessary to create a
 unique one by comparing the generated numbers with the existing ones
 retrieved in the first step. In this step gaps in the assigned numbers
-are filled for some tables (e.g. invoices) but not for others
-(e.g. sales orders).
+are filled for all currently supported tables.
 
 After creating the unique record number this function can update
 C<$self> and the C<defaults> table if requested. This is controlled