diff --git a/ChangeLog b/ChangeLog index e7d2e862f15..3b22da3209c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4eea7aa785a..20565a1162b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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 { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f1a7b616654..1646c7f271e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1382,7 +1382,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (manage into Configuration->Dictionnary->llx_c_actioncomm) +AGENDA_USE_EVENT_TYPE=Use events types (managed into Configuration->Dictionnary->llx_c_actioncomm) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) #####