Skip to content
Snippets Groups Projects
Unverified Commit 9fc1138d authored by Oleksii Korshenko's avatar Oleksii Korshenko Committed by GitHub
Browse files

Merge pull request #1746 from magento-engcom/2.2-develop-prs

Public Pull Requests

magento/magento2#11592 Fix issue #10347 - Wrong order tax amounts displayed when using specific tax configuration (2.2-develop) by @PieterCappelle

Fixed Public Issues

magento/magento2#10347 Wrong order tax amounts displayed when using specific tax configuration
parents 8797e4da d91671c8
Branches
No related merge requests found
......@@ -97,8 +97,12 @@ class OrderSave
} else {
$percentSum = 0;
foreach ($taxRates as $rate) {
$realAmount = $rates['amount'] * $rate['percent'] / $rates['percent'];
$realBaseAmount = $rates['base_amount'] * $rate['percent'] / $rates['percent'];
$percentSum += $rate['percent'];
}
foreach ($taxRates as $rate) {
$realAmount = $rates['amount'] * $rate['percent'] / $percentSum;
$realBaseAmount = $rates['base_amount'] * $rate['percent'] / $percentSum;
$ratesIdQuoteItemId[$rates['id']][] = [
'id' => $taxesArray['item_id'],
'percent' => $rate['percent'],
......@@ -110,7 +114,6 @@ class OrderSave
'real_amount' => $realAmount,
'real_base_amount' => $realBaseAmount,
];
$percentSum += $rate['percent'];
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment