|
|
@@ -28,7 +28,10 @@ class ProductPriceUtils |
|
|
|
|
|
|
|
public function getPriceWithTax(ProductPropertyInterface $product) |
|
|
|
{ |
|
|
|
|
|
|
|
return $this->applyTax( |
|
|
|
$this->getPrice($product), |
|
|
|
$product->getTaxRateInherited()->getValue() |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceWithTaxAndReduction(ProductPropertyInterface $product) |
|
|
@@ -38,12 +41,19 @@ class ProductPriceUtils |
|
|
|
|
|
|
|
public function getPriceByRefUnit(ProductPropertyInterface $product) |
|
|
|
{ |
|
|
|
|
|
|
|
if ($product->getBehaviorPriceInherited() == 'by-piece') { |
|
|
|
return ($this->getPrice($product) * $product->getUnitInherited()->getCoefficient()) / $product->getQuantityInherited(); |
|
|
|
} elseif ($product->getBehaviorPriceInherited() == 'by-reference-unit') { |
|
|
|
return $product->getPriceByRefUnitInherited(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceByRefUnitWithTax(ProductPropertyInterface $product) |
|
|
|
{ |
|
|
|
|
|
|
|
return $this->applyTax( |
|
|
|
$this->getPriceByRefUnit($product), |
|
|
|
$product->getTaxRateInherited()->getValue() |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceByRefUnitWithTaxAndReduction(ProductPropertyInterface $product) |