Open albirs opened 1 year ago
This should be pushed to the master branch. It took me hours to figure out. I had a follow-up error in ShippingOption.php while calculating the tax_amount. isotope-klarna-checkout/src/Dto/ShippingOption.php
Changed to
$this->tax_amount = (int) round($includes->calculateAmountIncludedInPrice($this->price));
Can you open the PR? :-)
it seems like this is the same calculation for different vars ??
https://github.com/richardhj/isotope-klarna-checkout/blob/5dfd3d3346e12d1792546d5fa065b772d59cef91/src/Dto/Surcharge.php#L32-L33
i fixed this with
$this->tax_rate = (int) round(($surcharge->total_price / $surcharge->tax_free_total_price - 1 ) * 10000);
in line 37