Skip to content
Snippets Groups Projects
Commit f2392372 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add hidden option MAIN_DISABLEPROFIDRULES to allow a module to disables rules check on prof id

parent 96f5108a
No related branches found
No related tags found
No related merge requests found
...@@ -2128,17 +2128,17 @@ class Societe extends CommonObject ...@@ -2128,17 +2128,17 @@ class Societe extends CommonObject
*/ */
function get_input_id_prof($idprof,$htmlname,$preselected) function get_input_id_prof($idprof,$htmlname,$preselected)
{ {
global $langs; global $conf,$langs;
$formlength=24; $formlength=24;
if ($this->pays_code == 'FR') if ($this->pays_code == 'FR' && empty($conf->global->MAIN_DISABLEPROFIDRULES))
{ {
if ($idprof==1) $formlength=9; if ($idprof==1) $formlength=9;
if ($idprof==2) $formlength=14; if ($idprof==2) $formlength=14;
if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier
if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id
} }
if ($this->pays_code == 'ES') if ($this->pays_code == 'ES' && empty($conf->global->MAIN_DISABLEPROFIDRULES))
{ {
if ($idprof==1) $formlength=9; //CIF/NIF/NIE 9 digits if ($idprof==1) $formlength=9; //CIF/NIF/NIE 9 digits
if ($idprof==2) $formlength=12; //NASS 12 digits without / if ($idprof==2) $formlength=12; //NASS 12 digits without /
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment