|
|
|
|
|
|
|
|
return $orderProduct->getQuantityOrder() * $this->getPrice($orderProduct); |
|
|
return $orderProduct->getQuantityOrder() * $this->getPrice($orderProduct); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getTotalBuyingPrice(OrderProductInterface $orderProduct) |
|
|
|
|
|
{ |
|
|
|
|
|
return $orderProduct->getQuantityOrder() * $this->getBuyingPrice($orderProduct); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function getMargin(OrderProductInterface $orderProduct) |
|
|
public function getMargin(OrderProductInterface $orderProduct) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getTotalBuyingPriceWithTax(OrderProductInterface $orderProduct) |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->applyTax( |
|
|
|
|
|
$this->getTotalBuyingPrice($orderProduct), |
|
|
|
|
|
$orderProduct->getTaxRateInherited()->getValue() |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//inclus toujours les réductions catalogues |
|
|
//inclus toujours les réductions catalogues |
|
|
public function getTotalTaxes(OrderProductInterface $orderProduct){ |
|
|
public function getTotalTaxes(OrderProductInterface $orderProduct){ |
|
|
return $this->getTotalWithTaxAndReduction($orderProduct) - $this->getTotalWithReduction($orderProduct); |
|
|
return $this->getTotalWithTaxAndReduction($orderProduct) - $this->getTotalWithReduction($orderProduct); |