Rounding on sale and invoice

Dear comunity

I have an issue on rounding related to sales and invoicing

When a sale is done and later invoice. on both stages some times appear totals like 126.36, for a no formal rule, is common that companies do the sale or invoice on a rounded number like 126.40, if the sale or invoice has a total of 126.32, then the amount must be rounded to 126.30, the question is: Is there any way to do it on tryton or must I do as a custom behavior

I will be glad on any suggest

Best regards

Well such rounding will break the accounting. The total of an invoice must be the exact total of the lines and taxes otherwise the accounting move will not be balanced.
If you want nice numbers, you must use proper unit price that works well.

@ced you are right, but for any reason, on our accounting rules, work on the inverse way. Something like that:

  • A product price is USD 200.00, that include taxes.
  • It means once the product is on a sale and invoiced, the taxes must be calculated and taken off [ 169.4915254237 + 30.50847457627117 => 169.49 + 30.51 ]

These is the right way on calculated prices, where prices list must be rounded and taxes included, but on tryton are somethig like

A product price is USD 169.49 then with taxes calculation, the price list is 199.99 no USD 200.00 , since the diference is no so big, I could make the rounded, but I wnt to do on the right tryton way

Bests

You must increase the precision of the unit price in order to not have rounding issue with the possible tax rates.
Also you can use the price list module to create a price list which compute with tax included. The sale order will reverse compute the proper unit price (but it needs to have correct digits).