2
0
forked from Wavyzz/dolibarr

FIX to allow IRPF not null even if main VAT is null.

From https://www.javierrguez.com/problema-facturas-irpf-sin-iva-dolibarr/
This commit is contained in:
Laurent Destailleur
2018-05-03 13:39:44 +02:00
parent 3340598cf8
commit 08cf034e2f

View File

@@ -4261,7 +4261,8 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
if ($local == 2)
{
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
//if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
if (! $mysoc->localtax2_assuj) return 0; // If main vat is 0, IRPF may be different than 0.
if ($thirdparty_seller->id == $mysoc->id)
{
if (! $thirdparty_buyer->localtax2_assuj) return 0;