-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
[13.0][14.0] account_avatax,account_avatax_sale : wrong calculation for sales taxes with small amounts #304
Comments
When creating the Invoice from the SO, I believe the Avatax calculated amounts are not copied in to Invoice, so the tax calculation is done by Odoo and might have small differences. But when the Invoice is to be Posted, Avatax recomputation is triggered, and the tax amount should be set to be the same as the ones returned by the API. So the described behavior is unexpected an incorrect. |
It seems there are 2 bugs here after posting the invoice :
The second one is due to the way compute_all is looking for invoice lines.
As stated,
But here, all lines have the same quantity, price and product... |
Hi @metaminux, the connector has not been tested for the Tax Included setting. Work may be needed to support that. For "the way compute_all is looking for invoice lines", yes, I agree the heuristic used there does not work for these cases, and must be improved. |
Thanks @dreispt for the reply, I already have some work done for the Tax Included part, I'll send a PR quickly, I hope. I also tried to copy the Avatax amounts from the SO when creating the invoice (as you suggested earlier), but amounts are recomputed automatically, so I need to work a bit more... For the "compute_all" part, I'm really struggling here for quite a moment and don't see any clean heuristic to improve the present one... I'll dig further |
Great!
The point for the Avatax Amount field is for their value to be forced as a result, overriding the automatic computation.
I'm not totally happy with it either, and will happily replace it if I come up with something better. |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Module
Describe the bug
When dealing with small amounts, sales taxes are rounded and Avatax is sending different tax calculation for the same original price.
This gives strange but accurate amounts in sale order lines
Then, when creating the invoice, first amounts computed by Odoo are wrong.
Using the Compute tax button or posting the invoice is giving wrong amounts on lines, wrong total amount due and wrong journal entries
Finally, amounts declared to Avalara and amounts in Odoo are different, and documents issued to customers lead to wrong payment.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Confirmed SO
Avalara transaction
Draft Invoice
Posted Invoice
Journal entries
Register payment
The text was updated successfully, but these errors were encountered: