瀏覽代碼

Processus de commande

feature/export_comptable
Fab 4 年之前
父節點
當前提交
a70a14b3f4
共有 1 個文件被更改,包括 16 次插入5 次删除
  1. +16
    -5
      ShopBundle/Services/Price/OrderProductPriceUtils.php

+ 16
- 5
ShopBundle/Services/Price/OrderProductPriceUtils.php 查看文件

@@ -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)

Loading…
取消
儲存