@@ -99,6 +99,7 @@ class ProductPriceSolver | |||
$solver = $this->getSolver($product); | |||
if ($solver->getBehaviorPriceInherited($product) == 'by-piece') { | |||
dump($product); | |||
return $solver->getBuyingPriceInherited($product); | |||
} elseif ($solver->getBehaviorPriceInherited($product) == 'by-reference-unit') { | |||
if ($solver->getQuantityInherited($product) > 0) { |
@@ -329,6 +329,11 @@ class ProductFamilySolver | |||
return $productFamily->getBuyingPriceByRefUnit(); | |||
} | |||
public function getBuyingPriceInherited(ProductFamilyInterface $productFamily): ?float | |||
{ | |||
return $productFamily->getBuyingPrice(); | |||
} | |||
public function getPriceByRefUnitInherited(ProductFamilyInterface $productFamily): ?float | |||
{ | |||
return $productFamily->getPriceByRefUnit(); |