From b2835fc80380793127f2de74e7a44d9a3640226a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Feb 2018 15:54:24 +0100 Subject: [PATCH 1/4] Fix check of vat only for european countries --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- htdocs/langs/en_US/companies.lang | 10 +++++----- htdocs/societe/card.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3dd6d7b03a6..ecabc30b681 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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 */ diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 4f1726a45c6..b44be44e222 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -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 diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 353b8ca0c47..8b9e205e4a7 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -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 diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 0d8f256e15e..67abb030b09 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1222,7 +1222,7 @@ else print ''; $s = ''; - if (empty($conf->global->MAIN_DISABLEVATCHECK)) + if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { $s.=' '; @@ -1833,7 +1833,7 @@ else print ''; $s =''; - if (empty($conf->global->MAIN_DISABLEVATCHECK)) + if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { $s.='   '; From 1c9f543fd54ffb1cb6fdae5cf4c90b336b95cce9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Feb 2018 15:55:37 +0100 Subject: [PATCH 2/4] Translation --- htdocs/langs/en_US/companies.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 8b9e205e4a7..defecf8ed67 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -74,8 +74,8 @@ Town=City Web=Web Poste= Position DefaultLang=Language by default -VATIsUsed=Sale tax is used -VATIsNotUsed=Sale tax is not used +VATIsUsed=Sales tax is used +VATIsNotUsed=Sales 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 From a4f48fcfb6a10281cf041df7364cfee88361bce2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Feb 2018 16:09:22 +0100 Subject: [PATCH 3/4] Fix feature must be hidden (not stable) --- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/modules/modWebsite.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index b44be44e222..3f7c45dda52 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -206,7 +206,7 @@ function societe_prepare_head(Societe $object) $h++; } - if (! empty($conf->website->enabled) && (!empty($user->rights->societe->lire) )) + if (! empty($conf->website->enabled) && (! empty($conf->global->WEBSITE_USE_WEBSITE_ACCOUNTS)) && (!empty($user->rights->societe->lire))) { $head[$h][0] = DOL_URL_ROOT.'/societe/website.php?id='.$object->id; $head[$h][1] = $langs->trans("WebSiteAccounts"); diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 47d44d66164..d62576c5063 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -80,7 +80,7 @@ class modWebsite extends DolibarrModules // New pages on tabs // ----------------- - //$this->tabs[] = array('data'=>'thirdparty:+website:WebSites:website:($conf->societe->enabled && $user->rights->societe->lire):/societe/website.php?mainmenu=home&id=__ID__'); // To add a new tab identified by code tabname1 + //$this->tabs[] = array(); // To add a new tab identified by code tabname1 // Boxes //------ From 00a8be22a288435b16aa86e704fe7c12cce8b895 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Feb 2018 22:11:43 +0100 Subject: [PATCH 4/4] Fix field too small --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 257d3344ba5..fb9b9672015 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -716,7 +716,7 @@ else // Ref if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; print $product_static->getNomUrl(1); print "\n"; if (! $i) $totalarray['nbfield']++; @@ -724,7 +724,7 @@ else // Ref supplier if (! empty($arrayfields['pfp.ref_fourn']['checked'])) { - print ''; + print ''; print $product_static->getNomUrl(1); print "\n"; if (! $i) $totalarray['nbfield']++;