[Bug #958] LocalTax2 for Spain fails on Suppliers

This commit is contained in:
simnandez 2013-06-25 11:12:21 +02:00
parent b5391a0d39
commit ca190be382
2 changed files with 13 additions and 1 deletions

View File

@ -92,6 +92,7 @@ For users:
- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated.
- New: [ task #823 ] Shipping_validate email notification.
- New: [ task #900 ] Review code of ficheinter.class.php
- Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers
For translators:
- Update language files.

View File

@ -2811,7 +2811,18 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
}
}
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
if ($local == 2)
{
if ($thirdparty_seller->id==$mysoc->id)
{
if (! $thirdparty_buyer->localtax2_assuj) return 0;
}
else
{
if (! $thirdparty_seller->localtax2_assuj) return 0;
}
}
}
else
{