* Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2011 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/admin/company.php * \ingroup company * \brief Setup page to configure company/foundation */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php"); 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"); if (!$user->admin) accessforbidden(); /* * Actions */ if ( ($action == 'update' && empty($_POST["cancel"])) || ($action == 'updateedit') ) { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); $new_country_id=$_POST["country_id"]; $new_country_code=getCountry($new_country_id,2); $new_country_label=getCountry($new_country_id,0); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $new_country_id.':'.$new_country_code.':'.$new_country_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_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_CP",$_POST["cp"],'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_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["barcode"],'chaine',0,'',$conf->entity); if ($_FILES["logo"]["tmp_name"]) { if (preg_match('/([^\\/:]+)$/i',$_FILES["logo"]["name"],$reg)) { $original_file=$reg[1]; $isimage=image_format_supported($original_file); if ($isimage >= 0) { dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->mycompany->dir_output.'/logos/'.$original_file); if (! is_dir($conf->mycompany->dir_output.'/logos/')) { dol_mkdir($conf->mycompany->dir_output.'/logos/'); } $result=dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->mycompany->dir_output.'/logos/'.$original_file,1,0,$_FILES['logo']['error']); if ($result > 0) { dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity); // Create thumbs of logo (Note that PDF use original file and not thumbs) if ($isimage > 0) { // Create small thumbs for company (Ratio is near 16/9) // Used on logon for example $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); if (preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg)) { $imgThumbSmall = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall,'chaine',0,'',$conf->entity); } else dol_syslog($imgThumbSmall); // Create mini thumbs for company (Ratio is near 16/9) // Used on menu or for setup page for example $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); if (preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg)) { $imgThumbMini = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini,'chaine',0,'',$conf->entity); } else dol_syslog($imgThumbMini); } else dol_syslog($langs->trans("ErrorImageFormatNotSupported"),LOG_WARNING); } else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) { $langs->load("errors"); $tmparray=explode(':',$result); $message .= '
'.$langs->trans('ErrorFileIsInfectedWithAVirus',$tmparray[1]).'
'; } else { $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; } } else { $message .= '
'.$langs->trans("ErrorOnlyPngJpgSupported").'
'; } } } dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"],'chaine',0,'',$conf->entity); 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); dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START",$_POST["fiscalmonthstart"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"],'chaine',0,'',$conf->entity); // Local taxes 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 ($action != 'updateedit' && ! $message) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } } if ($action == 'addthumb') { if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"])) { $isimage=image_format_supported($_GET["file"]); // Create thumbs of logo if ($isimage > 0) { // Create small thumbs for company (Ratio is near 16/9) // Used on logon for example $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small',$quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg)) { $imgThumbSmall = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall,'chaine',0,'',$conf->entity); } else dol_syslog($imgThumbSmall); // Create mini thumbs for company (Ratio is near 16/9) // Used on menu or for setup page for example $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini',$quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg)) { $imgThumbMini = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini,'chaine',0,'',$conf->entity); } else dol_syslog($imgThumbMini); Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { $message .= '
'.$langs->trans("ErrorImageFormatNotSupported").'
'; dol_syslog($langs->transnoentities("ErrorImageFormatNotSupported"),LOG_WARNING); } } else { $message .= '
'.$langs->trans("ErrorFileDoesNotExists",$_GET["file"]).'
'; dol_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING); } } if ($action == 'removelogo') { require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); $logofile=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; dol_delete_file($logofile); dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO",$conf->entity); $mysoc->logo=''; $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; dol_delete_file($logosmallfile); dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity); $mysoc->logo_small=''; $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini; dol_delete_file($logominifile); dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity); $mysoc->logo_mini=''; } /* * View */ $wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; llxHeader('',$langs->trans("Setup"),$wikihelp); $form=new Form($db); $formother=new FormOther($db); $formcompany=new FormCompany($db); $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; // We define country_id, country_code and country if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS)) { $tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS); $country_id=$tmp[0]; if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label" { $country_code=$tmp[1]; $country=$tmp[2]; } else { $tmparray=getCountry($country_id,'all'); $country_code=$tmparray['code']; $country=$tmparray['label']; } } else { $country_id=0; $country_code=''; $country=''; } print_fiche_titre($langs->trans("CompanyFoundation"),'','setup'); print $langs->trans("CompanyFundationDesc")."
\n"; print "
\n"; if ($action == 'edit' || $action == 'updateedit') { /** * Edition des parametres */ print "\n".''."\n"; print '
'; print ''; print ''; $var=true; print ''; print ''."\n"; $var=!$var; print ''."\n"; $var=!$var; print ''."\n"; $var=!$var; print ''."\n"; $var=!$var; print ''."\n"; // Country $var=!$var; print ''."\n"; $var=!$var; print ''."\n"; $var=!$var; print ''."\n"; $var=!$var; print ''; print ''."\n"; $var=!$var; print ''; print ''."\n"; $var=!$var; print ''; print ''."\n"; // Web $var=!$var; print ''; print ''."\n"; // Barcode if ($conf->barcode->enabled) { $var=!$var; print ''; print ''; } // Logo $var=!$var; print ''; // Note $var=!$var; print ''; print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; print '
'.$langs->trans("CompanyAddress").''; print '
'.$langs->trans("CompanyZip").''; print '
'.$langs->trans("CompanyTown").''; print '
'.$langs->trans("Country").''; $pays_selected=$country_id; //if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation print $form->select_country($pays_selected,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print '
'.$langs->trans("State").''; $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$country_code,'departement_id'); print '
'.$langs->trans("CompanyCurrency").''; $form->select_currency($conf->currency,"currency"); print '
'.$langs->trans("Tel").''; print '
'.$langs->trans("Fax").''; print '
'.$langs->trans("Mail").''; print '
'.$langs->trans("Web").''; print '
'.$langs->trans("Gencod").''; print '
'.$langs->trans("Logo").' (png,jpg)'; print '
'; print ''; print ''; if ($mysoc->logo_mini) { print ''.img_delete($langs->trans("Delete")).''; if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { print '   '; print ''; } } else { print ''; } print '
'; print '
'.$langs->trans("Note").''; print '
'; print '
'; // Identifiants de la societe (propre au pays) print ''; print ''; $var=true; $langs->load("companies"); // Capital $var=!$var; print ''; // Forme juridique $var=!$var; print ''; // ProfID1 if ($langs->transcountry("ProfId1",$country_code) != '-') { $var=!$var; print ''; } // ProfId2 if ($langs->transcountry("ProfId2",$country_code) != '-') { $var=!$var; print ''; } // ProfId3 if ($langs->transcountry("ProfId3",$country_code) != '-') { $var=!$var; print ''; } // ProfId4 if ($langs->transcountry("ProfId4",$country_code) != '-') { $var=!$var; print ''; } // ProfId5 if ($langs->transcountry("ProfId5",$country_code) != '-') { $var=!$var; print ''; } // ProfId6 if ($langs->transcountry("ProfId6",$country_code) != '-') { $var=!$var; print ''; } // TVA Intra $var=!$var; print ''; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("Capital").''; print '
'.$langs->trans("JuridicalStatus").''; if ($country_code) { $formcompany->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$country_code); } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId1",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId2",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId3",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId4",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId5",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->transcountry("ProfId6",$country_code).''; if ($country_code) { print ''; } else { print $countrynotdefined; } print '
'.$langs->trans("VATIntra").''; print ''; print '
'; /* * Debut d'annee fiscale */ print '
'; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ''; print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'.$langs->trans("FiscalMonthStart").''; print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',1) . '
"; /* * Options fiscale */ print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
"; /* * Local Taxes */ if ($country_code=='ES') { // Local Tax 1 print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->transcountry("LocalTax1Management",$country_code).''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax1IsUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$country_code)."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$country_code)."
"; print "
"; // Local Tax 2 print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->transcountry("LocalTax2Management",$country_code).''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax2IsUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$country_code)."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$country_code)."
"; print "
"; } print '
'; print ''; print '     '; print ''; print '
'; print '
'; print '
'; } else { /* * Show parameters */ dol_htmloutput_mesg($message); // Actions buttons //print '
'; //print ''.$langs->trans("Modify").''; //print '

'; print ''; print ''; $var=true; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; // Web $var=!$var; print ''; // Barcode if ($conf->barcode->enabled) { $var=!$var; print ''; } // Logo $var=!$var; print ''; $var=!$var; print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM; else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).''; print '
'.$langs->trans("CompanyAddress").'' . nl2br($conf->global->MAIN_INFO_SOCIETE_ADRESSE) . '
'.$langs->trans("CompanyZip").'' . $conf->global->MAIN_INFO_SOCIETE_CP . '
'.$langs->trans("CompanyTown").'' . $conf->global->MAIN_INFO_SOCIETE_VILLE . '
'.$langs->trans("CompanyCountry").''; if ($country_code) { $img=picto_from_langcode($country_code); print $img?$img.' ':''; print getCountry($country_code,1); } else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; print '
'.$langs->trans("State").''; if ($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT); else print ' '; print '
'.$langs->trans("CompanyCurrency").''; print currency_name($conf->currency,1); print ' ('.getCurrencySymbol($conf->currency).')'; print '
'.$langs->trans("Tel").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '
'.$langs->trans("Gencod").'' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '
'.$langs->trans("Logo").''; print '
'; print $mysoc->logo; print ''; // On propose la generation de la vignette si elle n'existe pas if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo)) { print 'logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; } else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { print ''; } else { print ''; } print '
'; print '
'.$langs->trans("Note").'' . nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) . '
'; print '
'; // Identifiants de la societe (propre au pays) print '
'; print ''; print ''; print ''; $var=true; // Capital $var=!$var; print ''; // Forme juridique $var=!$var; print ''; // ProfId1 if ($langs->transcountry("ProfId1",$country_code) != '-') { $var=!$var; print ''; } // ProfId2 if ($langs->transcountry("ProfId2",$country_code) != '-') { $var=!$var; print ''; } // ProfId3 if ($langs->transcountry("ProfId3",$country_code) != '-') { $var=!$var; print ''; } // ProfId4 if ($langs->transcountry("ProfId4",$country_code) != '-') { $var=!$var; print ''; } // ProfId5 if ($langs->transcountry("ProfId5",$country_code) != '-') { $var=!$var; print ''; } // ProfId6 if ($langs->transcountry("ProfId6",$country_code) != '-') { $var=!$var; print ''; } // TVA $var=!$var; print ''; print ''; print ''; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("Capital").''; print $conf->global->MAIN_INFO_CAPITAL . '
'.$langs->trans("JuridicalStatus").''; print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1); print '
'.$langs->transcountry("ProfId1",$country_code).''; if ($langs->transcountry("ProfId1",$country_code) != '-') { print $conf->global->MAIN_INFO_SIREN; if ($conf->global->MAIN_INFO_SIREN && $country_code == 'FR') print '   '.$langs->trans("Check").''; } print '
'.$langs->transcountry("ProfId2",$country_code).''; if ($langs->transcountry("ProfId2",$country_code) != '-') { print $conf->global->MAIN_INFO_SIRET; } print '
'.$langs->transcountry("ProfId3",$country_code).''; if ($langs->transcountry("ProfId3",$country_code) != '-') { print $conf->global->MAIN_INFO_APE; } print '
'.$langs->transcountry("ProfId4",$country_code).''; if ($langs->transcountry("ProfId4",$country_code) != '-') { print $conf->global->MAIN_INFO_RCS; } print '
'.$langs->transcountry("ProfId5",$country_code).''; if ($langs->transcountry("ProfId5",$country_code) != '-') { print $conf->global->MAIN_INFO_TRAINER; } print '
'.$langs->transcountry("ProfId6",$country_code).''; if ($langs->transcountry("ProfId6",$country_code) != '-') { print $conf->global->MAIN_INFO_PROFID6; } print '
'.$langs->trans("VATIntra").''; if ($conf->global->MAIN_INFO_TVAINTRA) { $s=''; $s.=$conf->global->MAIN_INFO_TVAINTRA; $s.=''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { $s.='   '; if ($conf->use_javascript_ajax) { print "\n"; print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { $s.='id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } print $s; } else { print ' '; } print '
'; print '
'; /* * Debut d'annee fiscale */ print '
'; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ''; print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'.$langs->trans("FiscalMonthStart").''; $monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1; print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '
"; /* * Options fiscale */ print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
"; /* * Local Taxes */ if ($country_code=='ES') { // Local Tax 1 print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->transcountry("LocalTax1Management",$country_code).''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax1IsUsedDesc",$country_code)."
".$langs->trans("Example",$country_code).': '.$langs->transcountry("LocalTax1IsUsedExample",$country_code)."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$country_code)."
".$langs->trans("Example",$country_code).': '.$langs->transcountry("LocalTax1IsNotUsedExample",$country_code)."
"; print "
"; // Local Tax 2 print '
'; print ''; print ''; print ''; print ''; print "\n"; $var=true; $var=!$var; print ""; print '\n"; $var=!$var; print ""; print '\n"; print "
'.$langs->transcountry("LocalTax2Management",$country_code).''.$langs->trans("Description").' 
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax2IsUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$country_code)."
"; print "
'; print ""; print ""; print "\n"; print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$country_code)."
"; print "
"; } // Actions buttons print '
'; print ''.$langs->trans("Modify").''; print '
'; print '
'; } llxFooter(); $db->close(); ?>