|
|
@@ -85,15 +85,32 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
$totalReductionAmount += $this->getOrderProductsReductionCartAmountWithoutTax($orderShop,$orderReductionCart); |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($orderShop->getOrderReductionCredits() as $orderReductionCredit) { |
|
|
|
$totalReductionAmount += $this->getOrderProductsReductionCreditAmountWithoutTax($orderShop,$orderReductionCredit); |
|
|
|
} |
|
|
|
|
|
|
|
$total -= $totalReductionAmount ; |
|
|
|
|
|
|
|
return $total ; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getTotalWithTaxAndReductions(OrderShopInterface $orderShop) |
|
|
|
public function getTotalOrderProductsWithTaxAndReductions(OrderShopInterface $orderShop) |
|
|
|
{ |
|
|
|
$total = $this->getTotalOrderProductsWithTax($orderShop) ; |
|
|
|
|
|
|
|
$totalReductionAmount = 0 ; |
|
|
|
foreach ($orderShop->getOrderReductionCarts() as $orderReductionCart) { |
|
|
|
$totalReductionAmount += $this->getOrderProductsReductionCartAmountWithTax($orderShop,$orderReductionCart); |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($orderShop->getOrderReductionCredits() as $orderReductionCredit) { |
|
|
|
$totalReductionAmount += $this->getOrderProductsReductionCreditAmountWithTax($orderShop,$orderReductionCredit); |
|
|
|
} |
|
|
|
|
|
|
|
$total -= $totalReductionAmount ; |
|
|
|
|
|
|
|
return $total ; |
|
|
|
} |
|
|
|
|
|
|
|
public function getOrderProductsReductionCartAmountWithoutTax(OrderShopInterface $order, $orderReductionCart) |