Sfoglia il codice sorgente

Processus de commande

feature/export_comptable
Fab 4 anni fa
parent
commit
23f729e763
1 ha cambiato i file con 13 aggiunte e 3 eliminazioni
  1. +13
    -3
      ShopBundle/Services/Price/ProductPriceUtils.php

+ 13
- 3
ShopBundle/Services/Price/ProductPriceUtils.php Vedi File

@@ -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…
Annulla
Salva