|
|
@@ -127,9 +127,9 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
); |
|
|
|
} else if ($orderReductionCart->getUnit() == 'amount') { |
|
|
|
if ($orderReductionCart->getBehaviorTaxRate() == 'tax-excluded') { |
|
|
|
$price = $orderReductionCart->getValue(); |
|
|
|
$amount = $orderReductionCart->getValue(); |
|
|
|
} else if ($orderReductionCart->getBehaviorTaxRate() == 'tax-included') { |
|
|
|
$price = $orderReductionCart->getValue() / $this->getTaxRateAverage($order); |
|
|
|
$amount = $this->round($orderReductionCart->getValue() / $this->getTaxRateAverage($order)); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@@ -151,7 +151,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
} |
|
|
|
elseif ($orderReductionCart->getUnit() == 'amount') { |
|
|
|
if ($orderReductionCart->getBehaviorTaxRate() == 'tax-excluded') { |
|
|
|
$amount = $orderReductionCart->getValue() * $this->getTaxRateAverage($order); |
|
|
|
$amount = $this->round($orderReductionCart->getValue() * $this->getTaxRateAverage($order)); |
|
|
|
} |
|
|
|
elseif ($orderReductionCart->getBehaviorTaxRate() == 'tax-included') { |
|
|
|
$amount = $orderReductionCart->getValue() ; |
|
|
@@ -170,7 +170,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
$amount = $orderReductionCredit->getValue(); |
|
|
|
} |
|
|
|
else if ($orderReductionCredit->getBehaviorTaxRate() == 'tax-included') { |
|
|
|
$amount = $orderReductionCredit->getValue() / $this->getTaxRateAverage($order); |
|
|
|
$amount = $this->round($orderReductionCredit->getValue() / $this->getTaxRateAverage($order)); |
|
|
|
} |
|
|
|
|
|
|
|
return $amount; |
|
|
@@ -180,7 +180,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
{ |
|
|
|
$amountWithTax = 0; |
|
|
|
if ($orderReductionCredit->getBehaviorTaxRate() == 'tax-excluded') { |
|
|
|
$amountWithTax = $orderReductionCredit->getValue() * $this->getTaxRateAverage($order); |
|
|
|
$amountWithTax = $this->round($orderReductionCredit->getValue() * $this->getTaxRateAverage($order)); |
|
|
|
} |
|
|
|
elseif ($orderReductionCredit->getBehaviorTaxRate() == 'tax-included') { |
|
|
|
$amountWithTax = $orderReductionCredit->getValue(); |