You can see that recuperableonly is there. For some reason it has a type of int(11) although it’s supposed to be a boolean value.
But that’s not the issue.
Now let’s move on to table llx_product_price:
you can see that the VAT data is there (tva_tx, localtax1_tx, localtax2_tx) however recuperableonly is missing.
now consider the function calcul_price_total defined in htdocs/lib/price.lib.php
in the parameter list, you can see the definition of the $info_bits param
Actually one of the bits of info_bits stores the NPR value.
which is then used in the calcul_price_total function:
however, throughout the code, info_bits is never passed as a param but is instead defaulted to 0. The reason why these functions ( the ones that process data depending on info_bits ) are called without the info_bits param is because NPR is not stored anywhere in the DB (as shown above)
conclusion, the NPR variable is useless as of now.
Hello,
I see that this TVA NPR change has been implemented in the new version of dolibarr. However, there is a problem with the implementation.
This is how the 8.5 tva npr works:
TVA NPR = 8,5e
HT = 100e
TVA = 0e
TTC = 100e
The calculation needs to appear on the bill without being applied on the final price.
Also When creating a new product with a tva_npr value, an error occurs ( this is due to the fact that the “*” character is being sent through the SQL request.