-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix : update line order with TTC price leads to bad unit price #30885
Fix : update line order with TTC price leads to bad unit price #30885
Conversation
@lemathou i don't have this problem ! you have external modules ? |
I have modules, I will try with a fresh install, but I see that the order::lineupdate is the only case (of line update) where the pu_ttc is put into the suprice, instead of the the pu_ht, as it is in the invoices and propales. |
When I update an order product line and I put 10€ in the TTC unit price, with qty=1, it stores 10€ in the HT unit price, 12€ in the TTC unit price, and 10€ in the total... this is not consistent |
@lemathou yes the problem exists in v19 ! but not in develop branch... |
@hregis OK I switched to v19. But, I don't understand ...
@hregis I am not sure to understand your answear correctly, but I see that : in the v.19 we have :
and this is not working even if price_base_type is TTC otherwise, in the develop, we have :
and this is working So, doing |
@hregis OK Thanks, I simplified the PR as it is in the develop, as you did ! |
FIX
When updating an order line with a TTC price, the pu_ht is stored as TTC and the TTC has double TTC, and so, when creating and invoice, the prices are also different
So, I disabled the bad variable affectation.