Bläddra i källkod

Ajout de methode dans priceSolver : excludeTax

feature/section_export
Fabien Normand 1 vecka sedan
förälder
incheckning
1854203d28
2 ändrade filer med 12 tillägg och 1 borttagningar
  1. +1
    -1
      Solver/Order/OrderShopSolver.php
  2. +11
    -0
      Solver/Price/PriceSolverTrait.php

+ 1
- 1
Solver/Order/OrderShopSolver.php Visa fil

@@ -232,7 +232,7 @@ class OrderShopSolver
}
return $arrayComplementaryOrderShops;
}
public function countValidComplementaryOrderShops(OrderShopInterface $orderShop): int
{
return count($this->getValidComplementaryOrderShops($orderShop));

+ 11
- 0
Solver/Price/PriceSolverTrait.php Visa fil

@@ -20,6 +20,17 @@ trait PriceSolverTrait
return $price;
}

public function excludeTax($price, $taxRateValue, $round = true)
{
$price = $this->applyPercentNegative($price, $taxRateValue);

if($round) {
return $this->round($price);
}

return $price;
}

public function applyReductionPercent($price, $percentage)
{
return $this->applyPercent($price, -$percentage);

Laddar…
Avbryt
Spara