Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / SL / DB / Unit.pm
index f5f1bc1..508aa74 100644 (file)
@@ -57,7 +57,7 @@ sub convert_to {
   my $my_base_factor    = $self->base_factor       || 1;
   my $other_base_factor = $other_unit->base_factor || 1;
 
-  return $qty * $my_base_factor / $other_base_factor;
+  return ($qty // 0) * $my_base_factor / $other_base_factor;
 }
 
 sub is_time_based {