-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to apply rules #10
Comments
Obviously, the CartTaxFreeTotal is calculated wrong. If I use the standard Isotope checkout everything works correctly. Using KlarnaCheckout it throws the bad_value error. It seems to be depending on the shipping (taxes or not) and depending on the rules (whole cart or individual items). Once the For me following workaround seems to work (KlarnaCheckout.php): OrderLine.php -> addTotalDiscountAmountForItem() |
The issue seems to be due to the standard tax (13%) being included in the product. For foreign customers, a different tax is added (e.g. 20%). Klarna complains because the total amount correctly has the 20% tax calculated and the product itself still has 13%. E.g. the formula Klarna checks (https://developers.klarna.com/documentation/klarna-payments/in-depth-knowledge/tax-handling/) is not correct anymore. Another problem occurs if in the Isotope config the "Preisanzeige" is changed from "Brutto" to "Festgelegt". Then the calculation is also wrong. |
Whenever a rule is applied, an error is thrown:
KCO error: BAD_VALUE: Bad value: order_tax_amount (must be greater than or equal to 0)
Independent of if the rule is applied to subtotal or to each product.
This seems to be due to the cart_total being smaller than the cart_taxFreeTotal which leads to a negative value for order_tax_amount which is not allowed near
isotope-klarna-checkout/src/Module/KlarnaCheckout.php
Line 244 in c1c8109
and in the other classes where order_tax_amount is manipulated.
The text was updated successfully, but these errors were encountered: