You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When modifying an order or an invoice for a customer by changing price TTC, the amount is copied to the HT filed and the price TTC is being recalculated by adding the VAT to the original amount.
Dolibarr Version
18.0.5 19.0.1
Environment PHP
PHP 8.1.27
Environment Database
MySQL 8.0.36
Steps to reproduce the behavior and expected behavior
Is valid for both orders and invoices (assuming VAT 20% for the example)
Create a new order
Add a new item to the invoice (10 HT, 12 TTC)
Edit the product line
Change the price TTC (12 TTC) to price TTC (7.2 TTC)
New price HT should change from 10 HT to 6 HT
The same holds true if editing a new order/invoice or editing a previously validated order/invoice.
Hovewer when adding a new product line, you can enter either price HT or price TTC and the other price is being correctly calculated. It seems to affect only modifications once the product line is added.
Actual results is
New price HT is being changed to 7.2 HT (from the price TTC 7.2) and price TTC to 8.64
Attached files
No response
The text was updated successfully, but these errors were encountered:
dom-madrid
changed the title
Items Price TTC not saved properly on orders and invoices
Items Price HT/TTC not saved properly on orders and invoices when price TTC modified (post creation)
Apr 22, 2024
I have the same issue, just to be more precise it only happens for services, not for products or free products/services:
if you edit a service in the TTC column, when you save the price will be the one you entered+VAT, instead of modifying the HT price.
Bug
When modifying an order or an invoice for a customer by changing price TTC, the amount is copied to the HT filed and the price TTC is being recalculated by adding the VAT to the original amount.
Dolibarr Version
18.0.5 19.0.1
Environment PHP
PHP 8.1.27
Environment Database
MySQL 8.0.36
Steps to reproduce the behavior and expected behavior
Is valid for both orders and invoices (assuming VAT 20% for the example)
Create a new order
Add a new item to the invoice (10 HT, 12 TTC)
Edit the product line
Change the price TTC (12 TTC) to price TTC (7.2 TTC)
New price HT should change from 10 HT to 6 HT
The same holds true if editing a new order/invoice or editing a previously validated order/invoice.
Hovewer when adding a new product line, you can enter either price HT or price TTC and the other price is being correctly calculated. It seems to affect only modifications once the product line is added.
Actual results is
New price HT is being changed to 7.2 HT (from the price TTC 7.2) and price TTC to 8.64
Attached files
No response
The text was updated successfully, but these errors were encountered: