Bläddra i källkod

Processus de commande

feature/export_comptable
Fab 4 år sedan
förälder
incheckning
4d31e094bf
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. +2
    -3
      ShopBundle/Services/Price/OrderShopPriceUtils.php
  2. +3
    -0
      ShopBundle/Services/Price/PriceUtilsTrait.php

+ 2
- 3
ShopBundle/Services/Price/OrderShopPriceUtils.php Visa fil

@@ -95,8 +95,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface

if($orderReductionCart->getAppliedTo() === ReductionCart::APPLIED_TO_ORDER_PRODUCTS) {
if ($orderReductionCart->getUnit() == 'percent') {

$price = $this->applyReductionPercent(
$price = $this->amountReductionByPercentValue(
$this->getTotalOrderProducts($order),
$orderReductionCart->getValue()
);
@@ -117,7 +116,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface
if($orderReductionCart->getAppliedTo() === ReductionCart::APPLIED_TO_ORDER_PRODUCTS) {
if ($orderReductionCart->getUnit() == 'percent') {

$price = $this->applyReductionPercent(
$price = $this->amountReductionByPercentValue(
$this->getTotalOrderProductsWithTax($order),
$orderReductionCart->getValue()
);

+ 3
- 0
ShopBundle/Services/Price/PriceUtilsTrait.php Visa fil

@@ -37,6 +37,9 @@ trait PriceUtilsTrait
{
return round((($price * 100)) / 100, 2);
}
public function amountReductionByPercentValue($price, $percent){
return round((($price * $percent)) / 100, 2);
}

public function applyReductionCatalog($entity, $price, $priceWithTax, $reductionCatalog = null, $withTax = true): ?float
{

Laddar…
Avbryt
Spara