Merge pull request #801 from simnandez/3.3
Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
This commit is contained in:
commit
5736cf0144
@ -4,6 +4,14 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
|
||||||
|
|
||||||
|
-Fix: Ducth (nl_NL) translation
|
||||||
|
-Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
|
||||||
|
-Generalize fix: file with a specific mask not found, again
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||||
|
|
||||||
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
||||||
|
|||||||
@ -2689,7 +2689,18 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
// Some test to guess with no need to make database access
|
// Some test to guess with no need to make database access
|
||||||
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
|
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
|
||||||
{
|
{
|
||||||
if ($local == 1 && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
if ($local == 1)
|
||||||
|
{
|
||||||
|
if ($thirdparty_seller->id==$mysoc->id)
|
||||||
|
{
|
||||||
|
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (! $thirdparty_seller->localtax1_assuj) return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
|
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user