@@ -372,7 +372,11 @@ class ProductFamilySolver | |||
public function getQuantityInherited(ProductFamilyInterface $productFamily): ?float | |||
{ | |||
return $productFamily->getQuantity(); | |||
if($productFamily->getQuantity()){ | |||
return $productFamily->getQuantity(); | |||
}else{ | |||
return 1; | |||
} | |||
} | |||
public function getUnitInherited(ProductFamilyInterface $productFamily) |
@@ -130,8 +130,10 @@ class ProductSolver | |||
{ | |||
if ($product->getQuantity()) { | |||
return $product->getQuantity(); | |||
} else { | |||
} else if($product->getProductFamily()->getQuantity()){ | |||
return $product->getProductFamily()->getQuantity(); | |||
}else{ | |||
return 1; | |||
} | |||
} | |||