Prepare code for 6 professional id.

This commit is contained in:
Laurent Destailleur 2012-03-23 00:51:38 +01:00
parent ebaad9ded8
commit 8317ee1ece
5 changed files with 83 additions and 39 deletions

View File

@ -34,6 +34,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
$action=GETPOST('action');
$langs->load("admin");
$langs->load("companies");
@ -44,8 +46,8 @@ if (!$user->admin) accessforbidden();
* Actions
*/
if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["cancel"]))
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
if ( ($action == 'update' && empty($_POST["cancel"]))
|| ($action == 'updateedit') )
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
@ -136,6 +138,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["c
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_TRAINER",$_POST["trainer"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_PROFID6",$_POST["MAIN_INFO_PROFID6"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"],'chaine',0,'',$conf->entity);
@ -147,14 +150,14 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["c
dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION",$_POST["optionlocaltax1"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION",$_POST["optionlocaltax2"],'chaine',0,'',$conf->entity);
if ($_POST['action'] != 'updateedit' && ! $message)
if ($action != 'updateedit' && ! $message)
{
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
}
if ($_GET["action"] == 'addthumb')
if ($action == 'addthumb')
{
if (file_exists($conf->societe->dir_output.'/logos/'.$_GET["file"]))
{
@ -199,7 +202,7 @@ if ($_GET["action"] == 'addthumb')
}
}
if ($_GET["action"] == 'removelogo')
if ($action == 'removelogo')
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
@ -263,8 +266,7 @@ print_fiche_titre($langs->trans("CompanyFoundation"),'','setup');
print $langs->trans("CompanyFundationDesc")."<br>\n";
print "<br>\n";
if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
if ($action == 'edit' || $action == 'updateedit')
{
/**
* Edition des parametres
@ -488,6 +490,22 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
print '</td></tr>';
}
// ProfId6
if ($langs->transcountry("ProfId6",$country_code) != '-')
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$country_code).'</td><td>';
if ($country_code)
{
print '<input name="MAIN_INFO_PROFID6" size="20" value="' . $conf->global->MAIN_INFO_PROFID6 . '">';
}
else
{
print $countrynotdefined;
}
print '</td></tr>';
}
// TVA Intra
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("VATIntra").'</td><td>';
@ -805,6 +823,18 @@ else
print '</td></tr>';
}
// ProfId6
if ($langs->transcountry("ProfId6",$country_code) != '-')
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$country_code).'</td><td>';
if ($langs->transcountry("ProfId6",$country_code) != '-')
{
print $conf->global->MAIN_INFO_PROFID6;
}
print '</td></tr>';
}
// TVA
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATIntra").'</td>';
@ -969,6 +999,7 @@ else
}
$db->close();
llxFooter();
$db->close();
?>

View File

@ -93,11 +93,13 @@ ProfId2Short=Prof. id 2
ProfId3Short=Prof. id 3
ProfId4Short=Prof. id 4
ProfId5Short=Prof. id 5
ProfId6Short=Prof. id 5
ProfId1=Professional ID 1
ProfId2=Professional ID 2
ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT/CUIL)
ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
@ -113,12 +115,12 @@ ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId5BE=-
#ProfId1BR=CNAE
#ProfId2BR=CNPJ
#ProfId3BR=CPF
#ProfId4BR=INSS
#ProfId5BR=IE
#ProfId6BR=IM
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
ProfId4BR=CPF
#ProfId5BR=CNAE
#ProfId6BR=INSS
ProfId1CH=-
ProfId2CH=-
ProfId3CH=Prof Id 1 (Federal number)
@ -148,7 +150,8 @@ ProfId1FR=Prof Id 1 (SIREN)
ProfId2FR=Prof Id 2 (SIRET)
ProfId3FR=Prof Id 3 (NAF, old APE)
ProfId4FR=Prof Id 4 (RCS/RM)
ProfId5FR=Prof Id 5
ProfId5FR=-
ProfId6FR=-
ProfId1GB=Registration Number
ProfId2GB=-
ProfId3GB=SIC

View File

@ -95,16 +95,18 @@ ProfId2Short=Prof. id 2
ProfId3Short=Prof. id 3
ProfId4Short=Prof. id 4
ProfId5Short=Prof. id 5
ProfId1AR=CUIT/CUIL
ProfId2AR=Ingresos brutos
ProfId3AR=-
ProfId4AR=-
ProfId5AR=-
ProfId6Short=Prof. id 6
ProfId1=ID profesional 1
ProfId2=ID profesional 2
ProfId3=ID profesional 3
ProfId4=ID profesional 4
ProfId5=ID profesional 5
ProfId6=ID profesional 6
ProfId1AR=CUIT/CUIL
ProfId2AR=Ingresos brutos
ProfId3AR=-
ProfId4AR=-
ProfId5AR=-
ProfId1AU=ABN
ProfId2AU=-
ProfId3AU=-
@ -115,12 +117,12 @@ ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId5BE=-
#ProfId1BR=CNAE
#ProfId2BR=CNPJ
#ProfId3BR=CPF
#ProfId4BR=INSS
#ProfId5BR=IE
#ProfId6BR=IM
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
ProfId4BR=CPF
#ProfId5BR=CNAE
#ProfId6BR=INSS
ProfId1CH=-
ProfId2CH=-
ProfId3CH=Número federado
@ -151,6 +153,7 @@ ProfId2FR=SIRET
ProfId3FR=NAF (Ex APE)
ProfId4FR=RCS/RM
ProfId5FR=-
ProfId6FR=-
ProfId1GB=Número registro
ProfId2GB=-
ProfId3GB=SIC

View File

@ -95,11 +95,13 @@ ProfId2Short=Id prof. 2
ProfId3Short=Id prof. 3
ProfId4Short=Id prof. 4
ProfId5Short=Id prof. 5
ProfId6Short=Id prof. 6
ProfId1=Id professionnel 1
ProfId2=Id professionnel 2
ProfId3=Id professionnel 3
ProfId4=Id professionnel 4
ProfId5=Id professionnel 5
ProfId6=Id professionnel 6
ProfId1AR=Id prof. 1 (CUIT/CUIL)
ProfId2AR=Id prof. 2 (Revenu brutes)
ProfId3AR=-
@ -115,12 +117,12 @@ ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId5BE=-
#ProfId1BR=CNAE
#ProfId2BR=CNPJ
#ProfId3BR=CPF
#ProfId4BR=INSS
#ProfId5BR=IE
#ProfId6BR=IM
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
ProfId4BR=CPF
#ProfId5BR=CNAE
#ProfId6BR=INSS
ProfId1CH=-
ProfId2CH=-
ProfId3CH=Numéro fédéral
@ -150,7 +152,8 @@ ProfId1FR=Id prof. 1 (SIREN)
ProfId2FR=Id prof. 2 (SIRET)
ProfId3FR=Id prof. 3 (NAF, ex APE)
ProfId4FR=Id prof. 4 (RCS/RM)
ProfId5FR=Id prof. 5
ProfId5FR=-
ProfId6FR=-
ProfId1GB=Registration Number
ProfId2GB=-
ProfId3GB=SIC

View File

@ -84,10 +84,14 @@ ProfId1Short=Prof. id 1
ProfId2Short=Prof. id 2
ProfId3Short=Prof. id 3
ProfId4Short=Prof. id 4
ProfId5Short=Prof. id 5
ProfId6Short=Prof. id 6
ProfId1=ID profesional 1
ProfId2=ID profesional 2
ProfId3=ID profesional 3
ProfId4=ID profesional 4
ProfId5=ID profesional 5
ProfId6=ID profesional 6
ProfId1AU=ABN
ProfId2AU=-
ProfId3AU=-
@ -96,6 +100,12 @@ ProfId1BE=Núm da Ordem
ProfId2BE=-
ProfId3BE=-
ProfId4BE=-
ProfId1BR=CNPJ
ProfId2BR=IE (Inscricao Estadual)
ProfId3BR=IM (Inscricao Municipal)
ProfId4BR=CPF
#ProfId5BR=CNAE
#ProfId6BR=INSS
ProfId1CH=-
ProfId2CH=-
ProfId3CH=Número federado
@ -112,12 +122,6 @@ ProfId1PT=NIPC
ProfId2PT=Núm. Segurança Social
ProfId3PT=Num. Reg. Comercial
ProfId4PT=Conservatória
#ProfId1BR=CNAE
#ProfId2BR=CNPJ
#ProfId3BR=CPF
#ProfId4BR=INSS
#ProfId5BR=IE
#ProfId6BR=IM
ProfId1TN=RC
ProfId2TN=Matrícula Fiscal
ProfId3TN=Código na Alfandega