Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #130 from heidelpay/change/MAGE2-269/adjust_basket…
Browse files Browse the repository at this point in the history
…_calculation

(MAGE2-269) [change] adjust total calculation of basket.
  • Loading branch information
Ryouzanpaku authored Feb 14, 2020
2 parents fe114bc + da3a1c8 commit 32022d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Helper/BasketHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ public function convertQuoteToBasket(Quote $quote)
$basketRequest = new Request();
$basketReferenceId = $basketTotals->getBasketReferenceId();
$basket = $basketRequest->getBasket();

$amountGrandTotal = $basketTotals->normalizeValue($quote->getGrandTotal());
$amountTotalNet = $basketTotals->getSubtotalWithDiscountAndShipping();

$basket->setCurrencyCode($basketTotals->getCurrencyCode())
->setAmountTotalNet($basketTotals->normalizeValue($quote->getGrandTotal()))
->setAmountTotalNet($amountTotalNet)
->setAmountTotalVat($amountGrandTotal - $amountTotalNet)
->setBasketReferenceId($basketReferenceId);

/** @var Item $item */
Expand Down

0 comments on commit 32022d9

Please sign in to comment.