소스 검색

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…
취소
저장