VAT calculate problem - VAT calculate on final price

Hi everyone,

I have a problem with VAT calculating. Now VAT calculating on each line separately.

But in my country it must be calculated on final price (without VAT) not on each line.

Main problem is that when it make calculating VAT on each line on the end i am getting different final price with VAT.

On the image i will show you the problem.

So the main question is there a option to make VAT calculation on the Final Price and how can i make this?

Best Regards,
Martin

which Dolibarr version and PHP version are you running.

Also, which country are we talking about? and have you set your location in Dolibarr to that country?

Hi, yes sorry I forgot to tell versions

Dolibarr V.20.0.2

PHP V.8.2.29

And yes, in settings I have selected which country is.

It is Macedonia.

do you have many lines on your orders?

Yes, i have many lines, when i have one line there is no problem

Hi,

did you have a look at this Wiki page: VAT setup, calculation and rounding rules - Dolibarr ERP CRM Wiki

You are probably looking for this variable (under Settings/Others): MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND.

This lets you configure, if you round the lines first and add them later or calculate the sum first and round this. VAT is then determinded based on these values.

Hope this helps,

Joachim

Hi, yes that’s what i need, but if i set MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 than i have a problem with adding any line in invoice.

When i click add it only refresh page and line is not added. In Total Price it show price, but not add lines.

@martin54 that is weird. What is the output in your webservers log file when you have this enabled and try to add a line?

Also, please enable debug logging and send us the output of dolibarr.log while you try to add a line

Hi,

With $dolibarr_main_prod=‘1’; it not show any error when i try to add some line.

But what i see now, that is that the problem is occur only when i add line with VAT. If i set VAT to 0% than it add line.

@martin54 please enable debug logging and post the relevant dolibarr.log snippet as well as the relevant log snippet from your webservers log