Fix check of vat only for european countries

This commit is contained in:
Laurent Destailleur 2018-02-12 15:54:24 +01:00
parent 30ba1c1702
commit b2835fc803
4 changed files with 9 additions and 9 deletions

View File

@ -3434,7 +3434,7 @@ abstract class CommonObject
/**
* Return if a country is inside the EEC (European Economic Community)
* @deprecated
* @deprecated Use function isInEEC function instead
*
* @return boolean true = country inside EEC, false = country outside EEC
*/

View File

@ -573,7 +573,7 @@ function getFormeJuridiqueLabel($code)
}
/**
* Return if a country is inside the EEC (European Economic Community)
* Return if a country of an object is inside the EEC (European Economic Community)
* TODO Add a field into country dictionary.
*
* @param Object $object Object

View File

@ -74,8 +74,8 @@ Town=City
Web=Web
Poste= Position
DefaultLang=Language by default
VATIsUsed=VAT is used
VATIsNotUsed=VAT is not used
VATIsUsed=Sale tax is used
VATIsNotUsed=Sale tax is not used
CopyAddressFromSoc=Fill address with third party address
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
PaymentBankAccount=Payment bank account
@ -238,7 +238,7 @@ ProfId3TN=Prof Id 3 (Douane code)
ProfId4TN=Prof Id 4 (BAN)
ProfId5TN=-
ProfId6TN=-
ProfId1US=Prof Id
ProfId1US=Prof Id (FEIN)
ProfId2US=-
ProfId3US=-
ProfId4US=-
@ -254,8 +254,8 @@ ProfId1DZ=RC
ProfId2DZ=Art.
ProfId3DZ=NIF
ProfId4DZ=NIS
VATIntra=VAT number
VATIntraShort=VAT number
VATIntra=Sales tax ID
VATIntraShort=Tax ID
VATIntraSyntaxIsValid=Syntax is valid
ProspectCustomer=Prospect / Customer
Prospect=Prospect

View File

@ -1222,7 +1222,7 @@ else
print '<td class="nowrap">';
$s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">';
if (empty($conf->global->MAIN_DISABLEVATCHECK))
if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object))
{
$s.=' ';
@ -1833,7 +1833,7 @@ else
print '<td colspan="3">';
$s ='<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">';
if (empty($conf->global->MAIN_DISABLEVATCHECK))
if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object))
{
$s.=' &nbsp; ';