34require
'../main.inc.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
51require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
53$action =
GETPOST(
'action',
'aZ09');
54$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'admincompany';
58$langs->loadLangs(array(
'admin',
'companies',
'bills'));
67$maxwidthsmall = $tmparraysize[
'maxwidthsmall'];
68$maxheightsmall = $tmparraysize[
'maxheightsmall'];
69$maxwidthmini = $tmparraysize[
'maxwidthmini'];
70$maxheightmini = $tmparraysize[
'maxheightmini'];
71$quality = $tmparraysize[
'quality'];
74$hookmanager->initHooks(array(
'admincompany',
'globaladmin'));
84$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
89if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
90|| ($action ==
'updateedit')) {
92 if (!empty($tmparray[
'id'])) {
93 if ($tmparray[
'code'] ==
'FR' && $tmparray[
'id'] !=
$mysoc->country_id) {
95 $res =
dolibarr_set_const($db,
"MAIN_PROFID1_IN_ADDRESS", 1,
'chaine', 0,
'', $conf->entity);
98 $mysoc->country_id = $tmparray[
'id'];
99 $mysoc->country_code = $tmparray[
'code'];
100 $mysoc->country_label = $tmparray[
'label'];
103 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_COUNTRY", $s,
'chaine', 0,
'', $conf->entity);
105 activateModulesRequiredByCountry(
$mysoc->country_code);
109 if (!empty($tmparray[
'id'])) {
110 $mysoc->state_id = $tmparray[
'id'];
111 $mysoc->state_code = $tmparray[
'code'];
112 $mysoc->state_label = $tmparray[
'label'];
115 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_STATE", $s,
'chaine', 0,
'', $conf->entity);
123 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ADDRESS",
GETPOST(
"MAIN_INFO_SOCIETE_ADDRESS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
124 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_TOWN",
GETPOST(
"MAIN_INFO_SOCIETE_TOWN",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
125 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ZIP",
GETPOST(
"MAIN_INFO_SOCIETE_ZIP",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
126 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_REGION",
GETPOST(
"region_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
129 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MOBILE",
GETPOST(
"phone_mobile",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
136 $dirforimage = $conf->mycompany->dir_output.
'/logos/';
138 $arrayofimages = array(
'logo',
'logo_squarred');
140 foreach ($arrayofimages as $varforimage) {
142 $langs->load(
"errors");
143 $mesg = $langs->trans(
"ErrorBadImageFormat");
144 if (!function_exists(
"imagecreate")) {
145 $mesg .=
' - '.$langs->trans(
"ErrorPHPDoesNotSupport",
"GD");
148 $supportedextensions = preg_replace(
'/\\\./',
'', $supportedextensions);
149 $mesg .=
' - '.$langs->trans(
"ErrorSupportedFormatAre", implode(
', ', explode(
'|', $supportedextensions)));
158 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
159 $original_file = $reg[1];
163 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
164 if (!is_dir($dirforimage)) {
167 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage][
'error']);
169 if (is_numeric($result) && $result > 0) {
170 $constant =
"MAIN_INFO_SOCIETE_LOGO";
171 if ($varforimage ==
'logo_squarred') {
172 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
184 $imgThumbSmall =
vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall,
'_small', $quality);
186 $imgThumbSmall = $reg[1];
187 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
193 $imgThumbMini =
vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini,
'_mini', $quality);
195 $imgThumbMini = $reg[1];
196 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
201 dol_syslog(
"ErrorImageFormatNotSupported", LOG_WARNING);
203 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
205 $langs->load(
"errors");
206 $tmparray = explode(
':', $result);
207 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
208 } elseif (preg_match(
'/^ErrorFileSizeTooLarge/', $result)) {
217 $langs->load(
"errors");
224 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MANAGERS",
GETPOST(
"MAIN_INFO_SOCIETE_MANAGERS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
227 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_FORME_JURIDIQUE",
GETPOST(
"forme_juridique_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
232 dolibarr_set_const($db,
"MAIN_INFO_PROFID5",
GETPOST(
"MAIN_INFO_PROFID5",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
233 dolibarr_set_const($db,
"MAIN_INFO_PROFID6",
GETPOST(
"MAIN_INFO_PROFID6",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
234 dolibarr_set_const($db,
"MAIN_INFO_PROFID7",
GETPOST(
"MAIN_INFO_PROFID7",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
235 dolibarr_set_const($db,
"MAIN_INFO_PROFID8",
GETPOST(
"MAIN_INFO_PROFID8",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
236 dolibarr_set_const($db,
"MAIN_INFO_PROFID9",
GETPOST(
"MAIN_INFO_PROFID9",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
237 dolibarr_set_const($db,
"MAIN_INFO_PROFID10",
GETPOST(
"MAIN_INFO_PROFID10",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
240 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_OBJECT",
GETPOST(
"socialobject",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
245 $usevat =
GETPOST(
"optiontva",
'aZ09');
246 $uselocaltax1 =
GETPOST(
"optionlocaltax1",
'aZ09');
247 $uselocaltax2 =
GETPOST(
"optionlocaltax2",
'aZ09');
248 if ($uselocaltax1 ==
'localtax1on' && !$usevat) {
249 setEventMessages($langs->trans(
"IfYouUseASecondTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
252 if ($uselocaltax2 ==
'localtax2on' && !$usevat) {
253 setEventMessages($langs->trans(
"IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
257 dolibarr_set_const($db,
"FACTURE_TVAOPTION", $usevat,
'chaine', 0,
'', $conf->entity);
258 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX1_OPTION", $uselocaltax1,
'chaine', 0,
'', $conf->entity);
259 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX2_OPTION", $uselocaltax2,
'chaine', 0,
'', $conf->entity);
261 if (
GETPOST(
"optionlocaltax1") ==
"localtax1on") {
262 if (!GETPOSTISSET(
'lt1')) {
263 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX1", 0,
'chaine', 0,
'', $conf->entity);
269 if (
GETPOST(
"optionlocaltax2") ==
"localtax2on") {
270 if (!GETPOSTISSET(
'lt2')) {
271 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX2", 0,
'chaine', 0,
'', $conf->entity);
279 if (
$mysoc->country_code ==
'GR') {
282 dolibarr_set_const($db,
"AADE_WEBSERVICE_USER",
GETPOST(
"AADE_WEBSERVICE_USER",
'alpha'),
'chaine', 0,
'', $conf->entity);
298 if ($action !=
'updateedit' && !$error) {
299 header(
"Location: ".$_SERVER[
"PHP_SELF"].($page_y ?
'?page_y='.$page_y :
''));
304if ($action ==
'addthumb' || $action ==
'addthumbsquarred') {
305 if (file_exists($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"))) {
310 $constant =
"MAIN_INFO_SOCIETE_LOGO";
311 if ($action ==
'addthumbsquarred') {
312 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
321 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthsmall, $maxheightsmall,
'_small', $quality);
323 $imgThumbSmall = $reg[1];
324 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
330 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthmini, $maxheightmini,
'_mini', $quality);
332 $imgThumbMini = $reg[1];
333 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
338 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
342 $langs->load(
"errors");
344 dol_syslog($langs->transnoentities(
"ErrorBadImageFormat"), LOG_INFO);
348 $langs->load(
"errors");
350 dol_syslog($langs->transnoentities(
"ErrorFileDoesNotExists",
GETPOST(
"file")), LOG_WARNING);
355if ($action ==
'removelogo' || $action ==
'removelogo_squarred') {
356 $constant =
"MAIN_INFO_SOCIETE_LOGO";
357 if ($action ==
'removelogo_squarred') {
358 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
361 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
363 $logofilename =
$mysoc->logo;
364 $logofilenamebis =
$mysoc->logo_squarred;
365 if ($action ==
'removelogo_squarred') {
366 $logofilename =
$mysoc->logo_squarred;
367 $logofilenamebis =
$mysoc->logo;
370 $logofile = $conf->mycompany->dir_output.
'/logos/'.$logofilename;
371 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
375 if ($action ==
'removelogo_squarred') {
376 $mysoc->logo_squarred =
'';
381 $logofilename =
$mysoc->logo_small;
382 $logofilenamebis =
$mysoc->logo_squarred_small;
383 if ($action ==
'removelogo_squarred') {
384 $logofilename =
$mysoc->logo_squarred_small;
385 $logofilenamebis =
$mysoc->logo_small;
388 $logosmallfile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
389 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
393 if ($action ==
'removelogo_squarred') {
394 $mysoc->logo_squarred_small =
'';
399 $logofilename =
$mysoc->logo_mini;
400 $logofilenamebis =
$mysoc->logo_squarred_mini;
401 if ($action ==
'removelogo_squarred') {
402 $logofilename =
$mysoc->logo_squarred_mini;
403 $logofilenamebis =
$mysoc->logo_mini;
406 $logominifile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
407 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
411 if ($action ==
'removelogo_squarred') {
412 $mysoc->logo_squarred_mini =
'';
423$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
424llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-company');
426$form =
new Form($db);
431$countrynotdefined =
'<span class="error">'.$langs->trans(
"ErrorSetACountryFirst").
' <a href="" onclick="window.scrollTo({top: 0, behavior: \'smooth\'}); return false;">('.$langs->trans(
"SeeAbove").
')</a></span>';
433print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
439print
'<span class="opacitymedium">'.$langs->trans(
"CompanyFundationDesc", $langs->transnoentities(
"Save")).
"</span><br>\n";
445if (!empty($conf->use_javascript_ajax)) {
446 print
"\n".
'<script type="text/javascript">';
447 print
'$(document).ready(function () {
448 $("#selectcountry_id").change(function() {
449 console.log("selectcountry_id change");
450 document.form_index.action.value="updateedit";
451 document.form_index.submit();
454 print
'</script>'.
"\n";
457print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
458print
'<input type="hidden" name="token" value="'.newToken().
'">';
459print
'<input type="hidden" name="action" value="update">';
460print
'<input type="hidden" name="page_y" value="">';
462print
'<table class="noborder centpercent editmode">';
463print
'<tr class="liste_titre"><th class="wordbreak" colspan="2">'.$langs->trans(
"CompanyInfo").
'</th></tr>'.
"\n";
466print
'<tr class="oddeven"><td class="fieldrequired titlefieldcreate wordbreak"><label for="name">'.$langs->trans(
"CompanyName").
'</label></td><td>';
467print
'<input name="name" id="name" maxlength="'.$mysoc->fields[
'nom'][
'length'].
'" class="minwidth250" value="'.
dolPrintHTMLForAttribute((GETPOSTISSET(
'name') ?
GETPOST(
'name',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM'))).
'"'.(
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM') ?
'' :
' autofocus="autofocus"').
'></td></tr>'.
"\n";
470print
'<tr class="oddeven"><td class="fieldrequired"><label for="currency">'.$langs->trans(
"CompanyCurrency").
'</label></td><td>';
471print
img_picto(
'',
'multicurrency',
'class="pictofixedwidth"');
473print
'</td></tr>'.
"\n";
476print
'<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans(
"Country").
'</label></td><td>';
477print
img_picto(
'',
'globe-americas',
'class="pictofixedwidth"');
478print $form->select_country((
string)
$mysoc->country_id,
'country_id',
'', 0);
479print
info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
480print
'</td></tr>'.
"\n";
483print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans(
"CompanyAddress").
'</label></td><td>';
484print
'<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.
'">'.(GETPOSTISSET(
'MAIN_INFO_SOCIETE_ADDRESS') ?
GETPOST(
'MAIN_INFO_SOCIETE_ADDRESS',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_ADDRESS')).
'</textarea></td></tr>'.
"\n";
487print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans(
"CompanyZip").
'</label></td><td>';
488print
'<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_ZIP') ?
GETPOST(
'MAIN_INFO_SOCIETE_ZIP',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_ZIP'))).
'"></td></tr>'.
"\n";
490print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans(
"CompanyTown").
'</label></td><td>';
491print
'<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_TOWN') ?
GETPOST(
'MAIN_INFO_SOCIETE_TOWN',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_TOWN'))).
'"></td></tr>'.
"\n";
494print
'<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans(
"State").
'</label></td><td>';
500print
img_picto(
'',
'state',
'class="pictofixedwidth"');
501print $formcompany->select_state($state_id,
$mysoc->country_code,
'state_id',
'maxwidth200onsmartphone minwidth300');
502print
'</td></tr>'.
"\n";
505print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"Phone").
'</label></td><td>';
506print
img_picto(
'',
'object_phoning',
'', 0, 0, 0,
'',
'pictofixedwidth');
507print
'<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'phone') ?
GETPOST(
'phone',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_TEL'))).
'"></td></tr>';
508print
'</td></tr>'.
"\n";
511print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"PhoneMobile").
'</label></td><td>';
512print
img_picto(
'',
'object_phoning_mobile',
'', 0, 0, 0,
'',
'pictofixedwidth');
513print
'<input class="maxwidth150 widthcentpercentminusx" name="phone_mobile" id="phone_mobile" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'phone_mobile') ?
GETPOST(
'phone_mobile',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MOBILE'))).
'"></td></tr>';
514print
'</td></tr>'.
"\n";
517print
'<tr class="oddeven"><td><label for="fax">'.$langs->trans(
"Fax").
'</label></td><td>';
518print
img_picto(
'',
'object_phoning_fax',
'', 0, 0, 0,
'',
'pictofixedwidth');
519print
'<input class="maxwidth150" name="fax" id="fax" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'fax') ?
GETPOST(
'fax',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_FAX'))).
'"></td></tr>';
520print
'</td></tr>'.
"\n";
523print
'<tr class="oddeven"><td><label for="email">'.$langs->trans(
"EMail").
'</label></td><td>';
524print
img_picto(
'',
'object_email',
'', 0, 0, 0,
'',
'pictofixedwidth');
525print
'<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'mail') ?
GETPOST(
'mail',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MAIL'))).
'"></td></tr>';
526print
'</td></tr>'.
"\n";
529print
'<tr class="oddeven"><td><label for="web">'.$langs->trans(
"Web").
'</label></td><td>';
530print
img_picto(
'',
'globe',
'', 0, 0, 0,
'',
'pictofixedwidth');
531print
'<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="'.dol_escape_htmltag((GETPOSTISSET(
'web') ?
GETPOST(
'web',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_WEB'))).
'"></td></tr>';
532print
'</td></tr>'.
"\n";
536 print
'<tr class="oddeven"><td>';
537 print
'<label for="barcode">'.$langs->trans(
"Gencod").
'</label></td><td>';
538 print
'<span class="fa fa-barcode pictofixedwidth"></span>';
539 print
'<input name="barcode" id="barcode" class="minwidth150 widthcentpercentminusx maxwidth300" value="'.dolPrintHTMLForAttribute(GETPOSTISSET(
'barcode') ?
GETPOST(
'barcode',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_GENCOD')).
'"></td></tr>';
545$maxmin = $maxfilesizearray[
'maxmin'];
546$tooltiplogo = $langs->trans(
'AvailableFormats').
' : png, jpg, jpeg';
547$tooltiplogo .= ($maxmin > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxmin.
' '.$langs->trans(
'Kb') :
'';
550print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"Logo"), $tooltiplogo).
'</label></td><td>';
552$modulepart =
'mycompany';
553$dirformainimage = $conf->mycompany->dir_output;
554$subdirformainimage =
'logos/';
555$fileformainimage =
$mysoc->logo;
557print $formfile->showImageToEdit(
'logo', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
562print
'<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans(
"LogoSquarred"), $tooltiplogo).
'</label></td><td>';
564$modulepart =
'mycompany';
565$dirformainimage = $conf->mycompany->dir_output;
566$subdirformainimage =
'logos/';
567$fileformainimage =
$mysoc->logo_squarred;
569print $formfile->showImageToEdit(
'logo_squarred', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
574print
'<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans(
"Note").
'</label></td><td>';
575print
'<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.
'">'.(GETPOSTISSET(
'note') ?
GETPOST(
'note',
'restricthtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOTE')).
'</textarea></td></tr>';
580print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
586print
'<div class="div-table-responsive-no-min">';
587print
'<table class="noborder centpercent editmode">';
588print
'<tr class="liste_titre"><td class="wordbreak" colspan="2">'.$langs->trans(
"CompanyIds").
'</td></tr>';
590$langs->load(
"companies");
593print
'<tr class="oddeven"><td class="titlefieldcreate smallheight"><label for="director">'.$langs->trans(
"ManagingDirectors").
'</label></td><td>';
594print
'<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_MANAGERS') ?
GETPOST(
'MAIN_INFO_SOCIETE_MANAGERS',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MANAGERS'))).
'"></td></tr>';
597print
'<tr class="oddeven"><td class="smallheight">';
598print $form->textwithpicto($langs->trans(
"GDPRContact"), $langs->trans(
"GDPRContactDesc"));
600print
'<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
"MAIN_INFO_GDPR") ?
GETPOST(
"MAIN_INFO_GDPR",
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_GDPR'))).
'"></td></tr>';
603print
'<tr class="oddeven"><td><label for="capital">'.$langs->trans(
"Capital").
'</label></td><td>';
604print
'<input name="capital" id="capital" class="maxwidth100" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'capital') ?
GETPOST(
'capital',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_CAPITAL'))).
'"></td></tr>';
607print
'<tr class="oddeven"><td><label for="socialobject">'.$langs->trans(
"CompanyObject").
'</label></td><td>';
608print
'<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="'.ROWS_3.
'">'.
getDolGlobalString(
'MAIN_INFO_SOCIETE_OBJECT').
'</textarea></td></tr>';
612print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
613print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_TVAINTRA')).
'">';
617print
'<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans(
"JuridicalStatus").
'</label></td><td>';
618if (
$mysoc->country_code) {
619 print $formcompany->select_juridicalstatus(
getDolGlobalInt(
'MAIN_INFO_SOCIETE_FORME_JURIDIQUE'),
$mysoc->country_code,
'',
'forme_juridique_code');
621 print $countrynotdefined;
626if ($langs->transcountry(
"ProfId1",
$mysoc->country_code) !=
'-') {
627 print
'<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry(
"ProfId1",
$mysoc->country_code).
'</label></td><td>';
628 if (!empty(
$mysoc->country_code)) {
629 print
'<input name="siren" id="profid1" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIREN')).
'">';
631 print $countrynotdefined;
637if ($langs->transcountry(
"ProfId2",
$mysoc->country_code) !=
'-') {
638 print
'<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry(
"ProfId2",
$mysoc->country_code).
'</label></td><td>';
639 if (!empty(
$mysoc->country_code)) {
640 print
'<input name="siret" id="profid2" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIRET')).
'">';
642 print $countrynotdefined;
648if ($langs->transcountry(
"ProfId3",
$mysoc->country_code) !=
'-') {
649 print
'<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry(
"ProfId3",
$mysoc->country_code).
'</label></td><td>';
650 if (!empty(
$mysoc->country_code)) {
651 print
'<input name="ape" id="profid3" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_APE')).
'">';
653 print $countrynotdefined;
659if ($langs->transcountry(
"ProfId4",
$mysoc->country_code) !=
'-') {
660 print
'<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry(
"ProfId4",
$mysoc->country_code).
'</label></td><td>';
661 if (!empty(
$mysoc->country_code)) {
662 print
'<input name="rcs" id="profid4" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_RCS')).
'">';
664 print $countrynotdefined;
670if ($langs->transcountry(
"ProfId5",
$mysoc->country_code) !=
'-') {
671 print
'<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry(
"ProfId5",
$mysoc->country_code).
'</label></td><td>';
672 if (!empty(
$mysoc->country_code)) {
673 print
'<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID5')).
'">';
675 print $countrynotdefined;
681if ($langs->transcountry(
"ProfId6",
$mysoc->country_code) !=
'-') {
682 print
'<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry(
"ProfId6",
$mysoc->country_code).
'</label></td><td>';
683 if (!empty(
$mysoc->country_code)) {
684 print
'<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID6')).
'">';
686 print $countrynotdefined;
692if ($langs->transcountry(
"ProfId7",
$mysoc->country_code) !=
'-') {
693 print
'<tr class="oddeven"><td><label for="profid7">'.$langs->transcountry(
"ProfId7",
$mysoc->country_code).
'</label></td><td>';
694 if (!empty(
$mysoc->country_code)) {
695 print
'<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID7')).
'">';
697 print $countrynotdefined;
703if ($langs->transcountry(
"ProfId8",
$mysoc->country_code) !=
'-') {
704 print
'<tr class="oddeven"><td><label for="profid8">'.$langs->transcountry(
"ProfId8",
$mysoc->country_code).
'</label></td><td>';
705 if (!empty(
$mysoc->country_code)) {
706 print
'<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID8')).
'">';
708 print $countrynotdefined;
714if ($langs->transcountry(
"ProfId9",
$mysoc->country_code) !=
'-') {
715 print
'<tr class="oddeven"><td><label for="profid9">'.$langs->transcountry(
"ProfId9",
$mysoc->country_code).
'</label></td><td>';
716 if (!empty(
$mysoc->country_code)) {
717 print
'<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID9')).
'">';
719 print $countrynotdefined;
725if ($langs->transcountry(
"ProfId10",
$mysoc->country_code) !=
'-') {
726 print
'<tr class="oddeven"><td><label for="profid10">'.$langs->transcountry(
"ProfId10",
$mysoc->country_code).
'</label></td><td>';
727 if (!empty(
$mysoc->country_code)) {
728 print
'<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID10')).
'">';
730 print $countrynotdefined;
741print
'<table class="noborder centpercent editmode">';
742print
'<tr class="liste_titre">';
743print
'<td class="titlefieldcreate">'.$langs->trans(
"FiscalYearInformation").
'</td><td></td>';
746print
'<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans(
"FiscalMonthStart").
'</label></td><td>';
747print $formother->select_month(
getDolGlobalString(
'SOCIETE_FISCAL_MONTH_START'),
'SOCIETE_FISCAL_MONTH_START', 0, 1,
'maxwidth100').
'</td></tr>';
751print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
757print
load_fiche_titre($langs->trans(
"TypeOfSaleTaxes"),
'',
'object_payment');
759print
'<table class="noborder centpercent editmode">';
760print
'<tr class="liste_titre">';
761print
'<td class="titlefieldcreate">'.$langs->trans(
"VATManagement").
'</td><td></td>';
762print
'<td class="right"> </td>';
766print
'<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
"" :
" checked").
"> ".$langs->trans(
"VATIsUsed").
"</label></td>";
767print
'<td colspan="2">';
768$tooltiphelp = $langs->trans(
"VATIsUsedDesc");
769if (
$mysoc->country_code ==
'FR') {
770 $tooltiphelp .=
'<br><br><i>'.$langs->trans(
"Example").
': '.$langs->trans(
"VATIsUsedExampleFR").
"</i>";
772print
'<label for="use_vat">'.$form->textwithpicto($langs->trans(
"VATIsUsedStandard"), $tooltiphelp).
"</label>";
776print
'<tr class="oddeven"><td width="140"><label><input type="radio" name="optiontva" id="no_vat" value="0"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
" checked" :
"").
"> ".$langs->trans(
"VATIsNotUsed").
"</label></td>";
777print
'<td colspan="2">';
779if (
$mysoc->country_code ==
'FR') {
780 $tooltiphelp =
"<i>".$langs->trans(
"Example").
': '.$langs->trans(
"VATIsNotUsedExampleFR").
"</i>\n";
782print
'<label for="no_vat">'.$form->textwithpicto($langs->trans(
"VATIsNotUsedDesc"), $tooltiphelp).
"</label>";
789print
'<table class="noborder centpercent editmode">';
790print
'<tr class="liste_titre">';
791print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax1Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
792print
'<td class="right"> </td>';
795if (
$mysoc->useLocalTax(1)) {
797 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="lt1" value="localtax1on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1on") ?
" checked" :
"").
'> <label for="lt1">'.$langs->transcountry(
"LocalTax1IsUsed",
$mysoc->country_code).
"</label></td>";
798 print
'<td colspan="2">';
799 print
'<div class="nobordernopadding">';
800 $tooltiphelp = $langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code);
801 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
802 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code), $tooltiphelp);
804 print
'<br><label for="lt1">'.$langs->trans(
"LTRate").
'</label>: ';
805 $formcompany->select_localtax(1,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX1'),
"lt1");
808 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
810 print
'<br><label for="clt1">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
811 print $form->selectarray(
"clt1", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC1'));
813 print
"</td></tr>\n";
815 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1off") ?
" checked" :
"").
'> <label for="nolt1">'.$langs->transcountry(
"LocalTax1IsNotUsed",
$mysoc->country_code).
"</label></td>";
816 print
'<td colspan="2">';
817 $tooltiphelp = $langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code);
818 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
819 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp);
820 print
"</td></tr>\n";
822 if (empty(
$mysoc->country_code)) {
823 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
825 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax1Management")).
'</span></td></tr>';
833print
'<table class="noborder centpercent editmode">';
834print
'<tr class="liste_titre">';
835print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax2Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
836print
'<td class="right"> </td>';
839if (
$mysoc->useLocalTax(2)) {
841 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="lt2" value="localtax2on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2on") ?
" checked" :
"").
'> <label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsed",
$mysoc->country_code).
"</label></td>";
842 print
'<td colspan="2">';
843 print
'<div class="nobordernopadding">';
844 print
'<label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code).
"</label>";
845 $tooltiphelp = $langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code);
846 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
848 print
'<br><label for="lt2">'.$langs->trans(
"LTRate").
'</label>: ';
849 $formcompany->select_localtax(2,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX2'),
"lt2");
852 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
854 print
'<br><label for="clt2">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
855 print $form->selectarray(
"clt2", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC2'));
857 print
"</td></tr>\n";
859 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2off") ?
" checked" :
"").
'> <label for="nolt2">'.$langs->transcountry(
"LocalTax2IsNotUsed",
$mysoc->country_code).
"</label></td>";
860 print
'<td colspan="2">';
862 $tooltiphelp = $langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code);
863 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
864 print
"<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry(
"LocalTax2IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp).
"</label>";
866 print
"</td></tr>\n";
868 if (empty(
$mysoc->country_code)) {
869 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
871 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax2Management")).
'</span></td></tr>';
880print
'<table class="noborder centpercent editmode">';
881print
'<tr class="liste_titre">';
882print
'<td>'.$form->textwithpicto($langs->trans(
"RevenueStamp"), $langs->trans(
"RevenueStampDesc")).
'</td><td></td>';
883print
'<td class="right"> </td>';
885if (
$mysoc->useRevenueStamp()) {
887 print
'<tr class="oddeven"><td>';
888 print $langs->trans(
"UseRevenueStamp");
890 print
'<td colspan="2">';
891 print $langs->trans(
"UseRevenueStampExample", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"));
892 print
"</td></tr>\n";
894 if (empty(
$mysoc->country_code)) {
895 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
897 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"), $langs->transnoentitiesnoconv(
"RevenueStamp")).
'</span></td></tr>';
904if (
$mysoc->country_code ==
'GR') {
906 print
'<table class="noborder centpercent editmode">';
907 print
'<tr class="liste_titre">';
908 print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
913 print
'<tr class="oddeven"><td>';
914 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_USER").
'</span></td><td>';
915 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="'.getDolGlobalString(
'MYDATA_AADE_USER').
'"';
916 print
'</td><td></td></tr>';
918 print
'<tr class="oddeven"><td>';
919 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_KEY").
'</span></td><td>';
920 print
'<input class="minwidth300" type="password" name="MYDATA_AADE_KEY" value="'.getDolGlobalString(
'MYDATA_AADE_KEY').
'"';
921 print
'</td><td></td></tr>';
923 print
'<tr class="oddeven"><td>';
924 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_USER").
'</span></td><td>';
925 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="'.getDolGlobalString(
'AADE_WEBSERVICE_USER').
'"';
926 print
'</td><td></td></tr>';
928 print
'<tr class="oddeven"><td>';
929 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_KEY").
'</span></td><td>';
930 print
'<input class="minwidth300" type="password" name="AADE_WEBSERVICE_KEY" value="'.getDolGlobalString(
'AADE_WEBSERVICE_KEY').
'"';
931 print
'</td><td></td></tr>';
938print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
if(! $sortfield) if(! $sortorder) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
company_admin_prepare_head()
Return array head with list of tabs to view object information.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage third parties objects (customers, suppliers, prospects...)
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
getState($id, $withcode='0', $dbtouse=null, $withregion=0, $outputlangs=null, $entconv=1)
Return state translated from an id.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $keyforsourcefile='addedfile', $upload_dir='', $mode=0)
Check validity of a file upload from an GUI page, and move it to its final destination.
getDolGlobalFloat($key, $default=0)
Return a Dolibarr global constant float value.
isOnlyOneLocalTax($local)
Return true if LocalTax (1 or 2) is unique.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dolPrintHTMLForAttribute($s, $escapeonlyhtmltags=0, $allowothertags=array())
Return a string ready to be output into an HTML attribute (alt, title, data-html, ....
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
vignette($file, $maxWidth=160, $maxHeight=120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0)
Create a thumbnail from an image file (Supported extensions are gif, jpg, png and bmp).
getListOfPossibleImageExt($acceptsvg=0)
Return if a filename is file name of a supported image format.
if(!defined( 'IMAGETYPE_WEBP')) getDefaultImageSizes()
Return default values for image sizes.
image_format_supported($file, $acceptsvg=0)
Return if a filename is file name of a supported image format.
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.