|
|
@@ -23,12 +23,15 @@ class OrderProductPriceUtils |
|
|
|
|
|
|
|
public function getPrice(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
|
|
|
|
return $orderProduct->getPrice(); |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceWithTax(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
|
|
|
|
return $this->applyTax( |
|
|
|
$this->getPrice($orderProduct), |
|
|
|
$orderProduct->getTaxRate()->getValue() |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceWithTaxAndReduction(OrderProductInterface $orderProduct) |
|
|
@@ -36,13 +39,18 @@ class OrderProductPriceUtils |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getPriceByRefUnit(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
|
|
|
|
return ($this->getPrice($orderProduct) * $orderProduct->getUnit()->getCoefficient()) / $orderProduct->getQuantityProduct(); |
|
|
|
} |
|
|
|
|
|
|
|
public function getPriceByRefUnitWithTax(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
return $this->applyTax( |
|
|
|
$this->getPriceByRefUnit($orderProduct), |
|
|
|
$orderProduct->getTaxRate()->getValue() |
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@@ -53,7 +61,7 @@ class OrderProductPriceUtils |
|
|
|
|
|
|
|
public function getTotal(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
|
|
|
|
return $orderProduct->getQuantityOrder() * $this->getPrice($orderProduct); |
|
|
|
} |
|
|
|
|
|
|
|
public function getTotalWithReductionCatalog(OrderProductInterface $orderProduct) |
|
|
@@ -73,7 +81,10 @@ class OrderProductPriceUtils |
|
|
|
|
|
|
|
public function getTotalWithTax(OrderProductInterface $orderProduct) |
|
|
|
{ |
|
|
|
|
|
|
|
return $this->applyTax( |
|
|
|
$this->getTotal($orderProduct), |
|
|
|
$orderProduct->getTaxRateInherited()->getValue() |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public function getTotalWithTaxAndReductionCatalog(OrderProductInterface $orderProduct) |