recalc after MAIN_ROUNDOFTOTAL_NOT_TOTAL.OFROUND 1

Dolibarr defaults round taxes on each product and adds taxes. In Quebec (Canada), it is necessary that the sum of the products is done and that the computation of the taxes is then made.

So, I set constant MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND to 1.

https://wiki.dolibarr.org/index.php/VAT_calculation_and_rounding_rules

I have 13 invoices to redo. Do their is a way to do recalculate?

Else, I would have to redo all invoices :woohoo:

Once, done we can add that solution in the wiki.

Even in canada it becomes very rare now to have the rounding done on the final sum. Reason is that rounding in final sum generate not accurate accounting.
What is expected is to have a sale tax that is defined per rate, and in both method, you will get it.
Are you sure you really need this ? (The MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND is not documented because rounding at final computation was used a long time ago when invoice were done using calc / sheet. Since invoicing is done with specialized software, rounding per line is more used, above all by large companies).

I will validate with an accountant.

But it seem that when the constant MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND is set, that work well for the first tax (TPS/TVH) but not to the second tax (TVQ).