Wrong calculation of total price in invoice

Hi everybody
I wonder if it’s a bug, because i see the same behavior in version 3.6, 3.7 and 3.7.1:
By entering a predefined product with a defined price incl. vat, dolibarr sets only the amount of the vat in the total field.

I.e. the price of a product is 100 incl. 8% vat.
By entering this product in an invoice, dolibarr sets the unit price to 92.59 and the total price is set to 7.41 (the vat amount).
After clicking the modifiy button by this position, without changing the amounts and save again, the correct amount of 92.59 appears in the total field.

Any ideas?

Hi Higgs,

I do the test with a 10% VAT (i don’t have 8% VAT) and i don’t see this bug. Do you have screenshot or something like this ? Do you see something into your dolibarr.log ?

I’m running Dolibarr 3.7.1 (part of upgrade from an olllldddd one)

Regards

Philippe

Hi Philippe
Thank you for your reply and your suggestion to check the logfiles.
Today i made a fresh installation of Dolibarr 3.7.1 and the system works correct.

In my other instances (version 3.6.2 and 3.7.1) the problem is still present.
I will check now, what i did differently in my configurations.

I post the news as soon as possible.

Regards
Rolf

I have a same problem. Just upgraded from 3.2.4 to 3.6.3.

Am attaching screen shot. It seems the problem is with the calculation of the VAT and TOTAL part (highlighted in screen shot).

Unit price (inclusive of 18% VAT) of example is €1 therefore TOTAL should be €1000 and VAT should be €152.54.

Interestingly, the same does not happen when same quantity of same unit is done in POINT OF SALE.

I reattach screen shot cause original was difficult to read

Thanks to all

I solved the issue … solution was available here:
http://wiki.dolibarr.org/index.php/VAT_calculation_and_rounding_rules

Thank you

Another small update …

Although I had included “MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1” in OTHER SETUP the rounding up was still not 100% correct. The total still varied by a few cents although it was not as bad as without said entry.

After trying several things, I tried changing “MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=2” and the TOTAL is now correct! I am unsure what I did exactly but it seems to be doing the trick.

Would appreciate if you solved your problem relevant to subject.

Thanks