bambora / checkout-magento-v2.x

Bambora Online - Magento 2
https://www.bambora.com/sv/se/betalningslosningar/
3 stars 13 forks source link

Corrected wrong tax calculation on shipping #14

Closed Corefix closed 7 years ago

Corefix commented 7 years ago

The calculation of the tax percent was based on the total shipping amount (including the tax), but this should be based on what percentage it is of the shipping price excluding tax. Otherwise this will throw an error. In the epay window.

For example:

if the shipping price including tax is 100 DKK, and the tax is 25% that means the price excluding tax is 80 DKK. So with previous calculation it would be 20/100100 that would be 20% With updated calculation it would be 20/80100 which is 25% and the correct amount.

AllanWLie commented 7 years ago

Hi @Corefix

Thank you for your pull request.

We are currently working on a new release that among other things includes a rework of the invoice lines to handle this bug in Magento 2 (https://github.com/magento/magento2/issues/8964). So we have discarded your request since it is no longer suited for the current version of the code.

Thank you.

-Allan