瀏覽代碼

Processus de commande

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

+ 13
- 3
ShopBundle/Services/Price/ProductPriceUtils.php 查看文件

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

Loading…
取消
儲存