Browse Source

PriceUtils : correctif

develop
Guillaume 3 years ago
parent
commit
5c095a4fae
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ShopBundle/Services/Price/OrderProductPriceUtils.php

+ 1
- 1
ShopBundle/Services/Price/OrderProductPriceUtils.php View File



public function getMarginPercent(OrderProductInterface $orderProduct) public function getMarginPercent(OrderProductInterface $orderProduct)
{ {
if ($this->getBuyingPrice($orderProduct)) {
if ($this->getBuyingPrice($orderProduct) && $this->getPriceWithReduction($orderProduct)) {
return $this->round(($this->getMargin($orderProduct) / $this->getPriceWithReduction($orderProduct)) * 100); return $this->round(($this->getMargin($orderProduct) / $this->getPriceWithReduction($orderProduct)) * 100);
} else { } else {
return 0; return 0;

Loading…
Cancel
Save