2
0
forked from Wavyzz/dolibarr

New: Ajout du RCS/RM dans la configuration gnral car info rglementaire requise sur les factures.

This commit is contained in:
Laurent Destailleur
2005-08-21 19:01:52 +00:00
parent 1180eff5e7
commit 3410c20160
5 changed files with 58 additions and 16 deletions

View File

@@ -41,13 +41,14 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"]);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"]);
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]);
if ($_POST['action'] != 'updateedit')
@@ -93,7 +94,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("CompanyInfo").'</td></tr>';
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyName").'</td><td>';
@@ -113,10 +114,6 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
$form->select_currency($conf->global->MAIN_MONNAIE,"currency");
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
print '<input name="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
print '</table>';
print '<br>';
@@ -144,6 +141,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
}
}
// Capital
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
print '<input name="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
// Forme juridique
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
@@ -205,6 +207,22 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
}
print '</td></tr>';
// ProfId4
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
{
if ($langs->transcountry("ProfId4",$code_pays) != '-')
{
print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
}
}
else
{
print $countrynotdefined;
}
print '</td></tr>';
// TVA Intra
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("TVAIntra").'</td><td>';
@@ -218,9 +236,9 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
}
else
{
/*
* Affichage des param<61>tres
*/
/*
* Affichage des param<61>tres
*/
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
@@ -242,10 +260,6 @@ else
print $form->currency_name($conf->global->MAIN_MONNAIE,1);
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
print '</table>';
print '<br>';
@@ -272,12 +286,18 @@ else
}
}
// Capital
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
// Forme juridique
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
print $form->forme_juridique_name($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1);
print '</td></tr>';
// ProfId1
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
if ($langs->transcountry("ProfId1",$code_pays) != '-')
@@ -286,6 +306,7 @@ else
}
print '</td></tr>';
// ProfId2
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
if ($langs->transcountry("ProfId2",$code_pays) != '-')
@@ -294,6 +315,7 @@ else
}
print '</td></tr>';
// ProfId3
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
if ($langs->transcountry("ProfId3",$code_pays) != '-')
@@ -302,6 +324,16 @@ else
}
print '</td></tr>';
// ProfId4
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
if ($langs->transcountry("ProfId4",$code_pays) != '-')
{
print $conf->global->MAIN_INFO_RCS;
}
print '</td></tr>';
// TVA Intracommunautaire
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("TVAIntra").'</td><td>' . $conf->global->MAIN_INFO_TVAINTRA . '</td></tr>';