Skip to content
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

Error executing API call (422: Unprocessable Entity): Order line 7 is invalid. The 'vatRate' field should have a maximum precision of 2. Field: lines.7.vatRate #17

Open
d3mo17dot opened this issue Jun 14, 2023 · 0 comments

Comments

@d3mo17dot
Copy link

This error happens in some cases with setting "VAT calculation of additional services: Calculate VAT proportionately" (The percentage of products in cart with the same VAT rate is used for calculating.).
When an order contains products with different VAT rates, there is a big chance the VAT rate for shipping costs will be calculated to a value with higher precision than 2.

Can it be a solution for you to change line https://github.com/mollie/mollie-oxid/blob/master/Application/Model/Request/Base.php#L412 to
'vatRate' => (float)$this->formatPrice($oOrder->oxorder__oxdelvat->value), ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant