compta / resultat issue

Hello,

I don’t like to put this in “Bugs”, because from my point of view it’s more like a feature (with which I don’t really agree) than a bug.

I’m a french Vice-CEO of a (small) compagny, we are glad to use Dolibarr but we have few problems with its reports :

On my point of view, there is three kind of compagny comptability case in France :
a) Those who are laible to VAT
b) Those who are not
c) Those who are laible for some activities and not for others (these guys has some tricks to solve it by using (a) + 0% VAT rate)

In the report, there is 2 others cases to manage :

  1. comptamode = “CREANCES-DETTES”
  2. comptamode = “RECETTES-DEPENSES”

First a comment, why 1) is shown with 2 columns instead of one like 2) ?

Second the point would be more to differentiate a) from b) while 1) and 2) has only differences in the SQL requests.

Here is the mistake for me : a compagny when computing its result always think exclusively HT (a) or exclusively TTC (b), because VAT is a treasury issue (a) (because of the mouvements it implies), or need to be took in account totally (b).

Finally, in the current version VAT differential (out-in) is added to the result in both HT and TTC cases. This implies that the HT one is wrongly computed. For me considering VAT or not should lead you to the same result :

(INCOME_HT + IN_VAT) - (OUTCOME_HT + OUT_VAT) = RESULT_HT + (IN_VAT - OUT_VAT)
=> (INCOME_HT + IN_VAT) - (OUTCOME_HT + OUT_VAT) - (IN_VAT - OUT_VAT) = RESULT_HT
=> This is the TTC formula you expose in the code :
=> INCOME_TTC - OUTCOME_TTC - (IN_VAT - OUT_VAT) = RESULT_TTC

But in the column HT you do :

=> INCOME_HT - OUTCOME_HT - (IN_VAT - OUT_VAT) = RESULT_HT

Why (- (IN_VAT - OUT_VAT) ) sit in the HT formula ?

Anyway I think that for someone using dolibarr in the case (a) there is no interrest to see anything with TTC in the result section. And in contrario, there is no interrest for someone using dolibarr in the case (b) to see anything in HT in the result section (and anywhere else I guess).

I made for me the correction for the clienfourn.php case, I can do it for the other if this interrest you.

Which version of Dolibarr do you use ?
I test on 3.1 and see into column TTC
INCOME_TTC - OUTCOME_TTC - (IN_VAT - OUT_VAT) = RESULT_TTC
into column HT
INCOME_HT - OUTCOME_HT = RESULT_HT
and
RESULT_HT = RESULT_TTC
So result lead to same

This is strange, I’m using 3.1.0…

And the code I see doesn’t lead to what you say…

Can you tel me what is url of page ?

eldy sorry for OT, need to contact you, how can I perform? Private Message, mail, skype??

compta/resultat/clientfourn.php

line 527 of it we see the amount of VAT perceived from clients deduced from the total_ttc and total_ht.
line 564, we see the VAT paid to fournisseurs added to the total_ttc and the total_ht.