|
|
|
@@ -53,11 +53,16 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["c
|
|
|
|
{
|
|
|
|
{
|
|
|
|
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
|
|
|
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$new_pays_id=$_POST["pays_id"];
|
|
|
|
|
|
|
|
$new_pays_code=getCountry($new_pays_id,2);
|
|
|
|
|
|
|
|
$new_pays_label=getCountry($new_pays_id,0);
|
|
|
|
|
|
|
|
//dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $new_pays_id,'chaine',0,'',$conf->entity);
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $new_pays_id.':'.$new_pays_code.':'.$new_pays_label,'chaine',0,'',$conf->entity);
|
|
|
|
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"],'chaine',0,'',$conf->entity);
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity);
|
|
|
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity);
|
|
|
|
@@ -214,8 +219,9 @@ if ($_GET["action"] == 'removelogo')
|
|
|
|
$mysoc->logo_mini='';
|
|
|
|
$mysoc->logo_mini='';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Affichage page
|
|
|
|
* View
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
|
|
|
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
|
|
|
@@ -226,6 +232,30 @@ $formcompany = new FormCompany($db);
|
|
|
|
|
|
|
|
|
|
|
|
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
|
|
|
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We define pays_id, pays_code and pays_label
|
|
|
|
|
|
|
|
if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS);
|
|
|
|
|
|
|
|
$pays_id=$tmp[0];
|
|
|
|
|
|
|
|
if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label"
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$pays_code=$tmp[1];
|
|
|
|
|
|
|
|
$pays_label=$tmp[2];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$pays_code=getCountry($pays_id,2);
|
|
|
|
|
|
|
|
$pays_label=getCountry($pays_id,0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$pays_id=0;
|
|
|
|
|
|
|
|
$pays_code='';
|
|
|
|
|
|
|
|
$pays_label='';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_fiche_titre($langs->trans("CompanyFoundation"),'','setup');
|
|
|
|
print_fiche_titre($langs->trans("CompanyFoundation"),'','setup');
|
|
|
|
|
|
|
|
|
|
|
|
print $langs->trans("CompanyFundationDesc")."<br>\n";
|
|
|
|
print $langs->trans("CompanyFundationDesc")."<br>\n";
|
|
|
|
@@ -264,14 +294,14 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
|
|
|
|
$form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':''));
|
|
|
|
$pays_selected=$pays_id;
|
|
|
|
|
|
|
|
//if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
|
|
|
|
|
|
|
$form->select_pays($pays_selected,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':''));
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
|
|
|
print '</td></tr>'."\n";
|
|
|
|
print '</td></tr>'."\n";
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
|
|
|
$pays_code='';
|
|
|
|
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS) $pays_code=getCountry($conf->global->MAIN_INFO_SOCIETE_PAYS,2);
|
|
|
|
|
|
|
|
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$pays_code,'departement_id');
|
|
|
|
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$pays_code,'departement_id');
|
|
|
|
print '</td></tr>'."\n";
|
|
|
|
print '</td></tr>'."\n";
|
|
|
|
|
|
|
|
|
|
|
|
@@ -350,22 +380,6 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
|
|
|
|
|
|
|
|
$langs->load("companies");
|
|
|
|
$langs->load("companies");
|
|
|
|
|
|
|
|
|
|
|
|
// Recupere code pays
|
|
|
|
|
|
|
|
$code_pays=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
|
|
|
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sql = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
|
|
|
|
|
|
|
|
$sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
|
|
|
|
|
|
|
$resql=$db->query($sql);
|
|
|
|
|
|
|
|
if ($resql) {
|
|
|
|
|
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
|
|
|
|
|
if ($obj->code) $code_pays=$obj->code;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
dol_print_error($db);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Capital
|
|
|
|
// Capital
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
|
|
|
@@ -374,9 +388,9 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
// Forme juridique
|
|
|
|
// Forme juridique
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$formcompany->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$code_pays);
|
|
|
|
$formcompany->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$pays_code);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -385,11 +399,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
print '</td></tr>';
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
// ProfID1
|
|
|
|
// ProfID1
|
|
|
|
if ($langs->transcountry("ProfId1",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId1",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$pays_code).'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
|
|
|
|
print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -401,11 +415,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId2
|
|
|
|
// ProfId2
|
|
|
|
if ($langs->transcountry("ProfId2",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId2",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$pays_code).'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
|
|
|
|
print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -417,11 +431,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId3
|
|
|
|
// ProfId3
|
|
|
|
if ($langs->transcountry("ProfId3",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId3",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$pays_code).'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
|
|
|
|
print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -433,11 +447,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId4
|
|
|
|
// ProfId4
|
|
|
|
if ($langs->transcountry("ProfId4",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId4",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$pays_code).'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
|
|
|
|
print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -508,32 +522,32 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Local Taxes
|
|
|
|
* Local Taxes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if ($code_pays=='ES')
|
|
|
|
if ($pays_code=='ES')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Local Tax 1
|
|
|
|
// Local Tax 1
|
|
|
|
print '<br>';
|
|
|
|
print '<br>';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax1Management",$code_pays).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax1Management",$pays_code).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print "</tr>\n";
|
|
|
|
print "</tr>\n";
|
|
|
|
$var=true;
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
@@ -542,26 +556,26 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|
|
|
print '<br>';
|
|
|
|
print '<br>';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax2Management",$code_pays).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax2Management",$pays_code).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print "</tr>\n";
|
|
|
|
print "</tr>\n";
|
|
|
|
$var=true;
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
@@ -608,11 +622,11 @@ else
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
if ($pays_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$img=picto_from_langcode(getCountry($conf->global->MAIN_INFO_SOCIETE_PAYS,2));
|
|
|
|
$img=picto_from_langcode($pays_code);
|
|
|
|
print $img?$img.' ':'';
|
|
|
|
print $img?$img.' ':'';
|
|
|
|
print getCountry($conf->global->MAIN_INFO_SOCIETE_PAYS,1);
|
|
|
|
print getCountry($pays_code,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print '</td></tr>';
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
@@ -702,23 +716,6 @@ else
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
$var=true;
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
// Recupere code pays
|
|
|
|
|
|
|
|
$code_pays=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
|
|
|
|
|
|
|
if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sql = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
|
|
|
|
|
|
|
|
$sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
|
|
|
|
|
|
|
$result=$db->query($sql);
|
|
|
|
|
|
|
|
if ($result)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$obj = $db->fetch_object($result);
|
|
|
|
|
|
|
|
if ($obj->code) $code_pays=$obj->code;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
dol_print_error($db);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Capital
|
|
|
|
// Capital
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
|
|
|
@@ -731,24 +728,24 @@ else
|
|
|
|
print '</td></tr>';
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId1
|
|
|
|
// ProfId1
|
|
|
|
if ($langs->transcountry("ProfId1",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId1",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$pays_code).'</td><td>';
|
|
|
|
if ($langs->transcountry("ProfId1",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId1",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print $conf->global->MAIN_INFO_SIREN;
|
|
|
|
print $conf->global->MAIN_INFO_SIREN;
|
|
|
|
if ($conf->global->MAIN_INFO_SIREN && $code_pays == 'FR') print ' <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
|
|
|
|
if ($conf->global->MAIN_INFO_SIREN && $pays_code == 'FR') print ' <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print '</td></tr>';
|
|
|
|
print '</td></tr>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId2
|
|
|
|
// ProfId2
|
|
|
|
if ($langs->transcountry("ProfId2",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId2",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$pays_code).'</td><td>';
|
|
|
|
if ($langs->transcountry("ProfId2",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId2",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print $conf->global->MAIN_INFO_SIRET;
|
|
|
|
print $conf->global->MAIN_INFO_SIRET;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -756,11 +753,11 @@ else
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId3
|
|
|
|
// ProfId3
|
|
|
|
if ($langs->transcountry("ProfId3",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId3",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$pays_code).'</td><td>';
|
|
|
|
if ($langs->transcountry("ProfId3",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId3",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print $conf->global->MAIN_INFO_APE;
|
|
|
|
print $conf->global->MAIN_INFO_APE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -768,11 +765,11 @@ else
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ProfId4
|
|
|
|
// ProfId4
|
|
|
|
if ($langs->transcountry("ProfId4",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId4",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$pays_code).'</td><td>';
|
|
|
|
if ($langs->transcountry("ProfId4",$code_pays) != '-')
|
|
|
|
if ($langs->transcountry("ProfId4",$pays_code) != '-')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
print $conf->global->MAIN_INFO_RCS;
|
|
|
|
print $conf->global->MAIN_INFO_RCS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -871,32 +868,32 @@ else
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Local Taxes
|
|
|
|
* Local Taxes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if ($code_pays=='ES')
|
|
|
|
if ($pays_code=='ES')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Local Tax 1
|
|
|
|
// Local Tax 1
|
|
|
|
print '<br>';
|
|
|
|
print '<br>';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax1Management",$code_pays).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax1Management",$pays_code).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print "</tr>\n";
|
|
|
|
print "</tr>\n";
|
|
|
|
$var=true;
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example",$code_pays).': '.$langs->transcountry("LocalTax1IsUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example",$pays_code).': '.$langs->transcountry("LocalTax1IsUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example",$code_pays).': '.$langs->transcountry("LocalTax1IsNotUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example",$pays_code).': '.$langs->transcountry("LocalTax1IsNotUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
@@ -906,26 +903,26 @@ else
|
|
|
|
print '<br>';
|
|
|
|
print '<br>';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax2Management",$code_pays).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td>'.$langs->transcountry("LocalTax2Management",$pays_code).'</td><td>'.$langs->trans("Description").'</td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print '<td align="right"> </td>';
|
|
|
|
print "</tr>\n";
|
|
|
|
print "</tr>\n";
|
|
|
|
$var=true;
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
$var=!$var;
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$code_pays)."</label></td>";
|
|
|
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$pays_code)."</label></td>";
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print '<td colspan="2">';
|
|
|
|
print "<table>";
|
|
|
|
print "<table>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$code_pays)."</td></tr>";
|
|
|
|
print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$pays_code)."</td></tr>";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$code_pays)."</i></td></tr>\n";
|
|
|
|
print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$pays_code)."</i></td></tr>\n";
|
|
|
|
print "</table>";
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|