MAIN _ROUNDOFTOTAL _NOT_ TOTALOFROUND not working as expected

Dear All,

Facing an issue with functionality of MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1. I am from India and I am using Dolibarr version 16.0.1. I observed that the total tax is not correct. With the use of parameter MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1, I expect the tax to be calculated from the total amount (excl. tax) and then do the round off. But in my system, it is calculating on line item level and doing the round off also in the line item level which is resulting in incorrect total invoice amount. Attached the case screenshot for your reference. Would highly appreciate a solution for this issue.

Screenshot:

image

I have 5 line items with total amount (excl. tax) as 31002.50. I use CGST and SGST in tax 2 and 3 at 9% rate. Which if I calculate on the total comes as 2790.225 which when rounded to 0.5 should give me 2790. But here in my example is resulting value is 2791 which after totalling gives an error amount of Rs.2 in my invoice.
Attached below the parameters which are in place:

Attached below the limits details for your reference:

Also would appreciate if we can have the rounding function at total amount (incl. tax) level and not in any other levels. As you can see in the above example, we had the total amount (excl. tax) as 31002.5 and tax amount as 2791 + 2791 which resulted in total amount (incl. tax) as 36584.50
It would much appreciable if the rounding is done at total amount (incl. tax) level and resulted value of 36584 or 36585 as per the decimal value.
Thanks in advance for your support.

@eldy or other experts, can you please assist on the above reported issue.

Thanks

Hi,
i had a similiar Problem, could you try and increase the rounding Values as follows

Thanks @Plows for your response. Checked and still facing the issue. The final total is not adding up correct.

Hi Ash1,
i tried an online Test System (17.0.0)

with these values

but how did you get 4772,50 on line 3? :wink:

Yes, that is because I am using a rounding value of 0.5.
Without rounding, there is no issue. Issue comes only if I set the round off value to 0.5. As here in India, value after decimal is not much relevant. Hence rounding to get a round off number is suggested.

Hi Ash1,
i suppose we need to adjust the rounding problem within formular and not where the calculation is done.

But that would cause issue during payment. The payment will be round off numbers but in the invoice it will be in decimal values. Also with this, the fucntionality of Roundoff in Limits is not used at all.

Dear Experts,

Please suggest solution on the subject issue.

Thanks,
Ash

Dear Experts,

Your assistance here is much appreciated.

Thanks,
Ash

@eldy @ksar , can you please assist in the subject issue. Can we have the tax calculation at header level insted of line item level and rounding only on final total and not on each level. Any such changes can be made in dolibarr??? Can you please assist. I don’t have technical skills. So your help will be very much appreciated.

Thanks,
Ash

Hi Ash1, have you found the solution for round off total amount in the invoice, I am also facing the same issue, I want to display the total amount including tax to Round amount and not on decimal amount.