31require
'../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
45$langs->loadLangs(array(
"admin",
"accountancy",
"companies",
"other"));
47$action =
GETPOST(
'action',
'aZ09');
48$value =
GETPOST(
'value',
'alpha');
49$modulepart =
GETPOST(
'modulepart',
'aZ09');
65include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
67if ($action ==
'setcodeclient') {
68 $result =
dolibarr_set_const($db,
"SOCIETE_CODECLIENT_ADDON", $value,
'chaine', 0,
'', $conf->entity);
74if ($action ==
'setcodecompta') {
75 $result =
dolibarr_set_const($db,
"SOCIETE_CODECOMPTA_ADDON", $value,
'chaine', 0,
'', $conf->entity);
81if ($action ==
'updateoptions') {
82 if (GETPOSTISSET(
'COMPANY_USE_SEARCH_TO_SELECT')) {
83 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
84 $res =
dolibarr_set_const($db,
"COMPANY_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity);
95 if (GETPOSTISSET(
'CONTACT_USE_SEARCH_TO_SELECT')) {
96 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
97 $res =
dolibarr_set_const($db,
"CONTACT_USE_SEARCH_TO_SELECT", $contactsearch,
'chaine', 0,
'', $conf->entity);
108 if (GETPOSTISSET(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
109 $customertypedefault =
GETPOSTINT(
'defaultcustomertype');
110 $res =
dolibarr_set_const($db,
"THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault,
'chaine', 0,
'', $conf->entity);
122 $rolessearch =
GETPOST(
'activate_CONTACTS_DEFAULT_ROLES',
'array:aZ09');
123 $res =
dolibarr_set_const($db,
"CONTACTS_DEFAULT_ROLES", implode(
',', $rolessearch),
'chaine', 0,
'', $conf->entity);
136if ($action ==
'set') {
137 $label =
GETPOST(
'label',
'alpha');
138 $scandir =
GETPOST(
'scan_dir',
'alpha');
149if ($action ==
'del') {
155if ($action ==
'setdoc') {
156 $label =
GETPOST(
'label',
'alpha');
157 $scandir =
GETPOST(
'scan_dir',
'alpha');
178if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
179 $setaccountancycodecustomerinvoicemandatory =
GETPOSTINT(
'value');
180 $res =
dolibarr_set_const($db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'', $conf->entity);
192if ($action ==
"setaddrefinlist") {
194 $res =
dolibarr_set_const($db,
"SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist,
'yesno', 0,
'', $conf->entity);
206if ($action ==
"setvatinlist") {
208 $res =
dolibarr_set_const($db,
"SOCIETE_SHOW_VAT_IN_LIST", $setvatinlist,
'yesno', 0,
'', $conf->entity);
220if ($action ==
"setaddadressinlist") {
222 $res =
dolibarr_set_const($db,
"COMPANY_SHOW_ADDRESS_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
234if ($action ==
"setaddemailphonetownincontactlist") {
236 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
248if ($action ==
"setaskforshippingmet") {
250 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'', $conf->entity);
262if ($action ==
"setdisableprospectcustomer") {
263 $setdisableprospectcustomer =
GETPOSTINT(
'value');
264 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'', $conf->entity);
276if ($action ==
'setprofid') {
277 $status =
GETPOST(
'status',
'alpha');
279 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
287if ($action ==
'setprofidmandatory') {
288 $status =
GETPOST(
'status',
'alpha');
290 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
298if ($action ==
'setprofidinvoicemandatory' || $action ==
'setprofidinvoicemandatoryeeconly') {
299 $status =
GETPOST(
'status',
'alpha');
300 if ($status ==
'1' && $action ==
'setprofidinvoicemandatoryeeconly') {
303 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
311if ($action ==
'sethideinactivethirdparty') {
312 $status =
GETPOST(
'status',
'alpha');
314 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'', $conf->entity);
319if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
320 $setonsearchandlistgooncustomerorsuppliercard =
GETPOSTINT(
'value');
321 $res =
dolibarr_set_const($db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'', $conf->entity);
339$form =
new Form($db);
341$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
342llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
344$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
346print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
351print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
353$dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
354foreach ($conf->modules_parts[
'models'] as $mo) {
355 $dirsociete[] = $mo.
'core/modules/societe/';
362print
'<div class="div-table-responsive-no-min">';
363print
'<table class="noborder centpercent">'.
"\n";
364print
'<tr class="liste_titre">'.
"\n";
365print
' <td>'.$langs->trans(
"Name").
'</td>';
366print
' <td>'.$langs->trans(
"Description").
'</td>';
367print
' <td>'.$langs->trans(
"Example").
'</td>';
368print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
369print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
372$arrayofmodules = array();
374foreach ($dirsociete as $dirroot) {
377 $handle = @opendir($dir);
378 if (is_resource($handle)) {
380 while (($file = readdir($handle)) !==
false) {
381 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
382 $file = substr($file, 0,
dol_strlen($file) - 4);
391 $modCodeTiers =
new $file($db);
392 '@phan-var-force ModeleThirdPartyCode $modCodeTiers';
395 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
398 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
402 $arrayofmodules[$file] = $modCodeTiers;
412foreach ($arrayofmodules as $file => $modCodeTiers) {
413 print
'<tr class="oddeven">'.
"\n";
414 print
'<td width="140">'.$modCodeTiers->name.
'</td>'.
"\n";
415 print
'<td>'.$modCodeTiers->info($langs).
'</td>'.
"\n";
416 print
'<td class="nowrap">'.$modCodeTiers->getExample($langs).
'</td>'.
"\n";
419 print
'<td class="center">'.
"\n";
420 print
img_picto($langs->trans(
"Activated"),
'switch_on');
423 $disabled = (
isModEnabled(
'multicompany') && ((is_object($mc) && !empty($mc->sharings[
'referent'])) && ($mc->sharings[
'referent'] != $conf->entity)));
424 print
'<td class="center">';
426 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeclient&token='.
newToken().
'&value='.urlencode($file).
'">';
428 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
435 print
'<td class="center">';
436 $s = $modCodeTiers->getToolTip($langs,
null, -1);
437 print $form->textwithpicto(
'', $s, 1);
452print
'<div class="div-table-responsive-no-min">';
453print
'<table class="noborder centpercent">';
454print
'<tr class="liste_titre">';
455print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
456print
'<td>'.$langs->trans(
"Description").
'</td>';
457print
'<td>'.$langs->trans(
"Example").
'</td>';
458print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
459print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
462$arrayofmodules = array();
464foreach ($dirsociete as $dirroot) {
467 $handle = @opendir($dir);
468 if (is_resource($handle)) {
469 while (($file = readdir($handle)) !==
false) {
470 if (substr($file, 0, 15) ==
'mod_codecompta_' && substr($file, -3) ==
'php') {
471 $file = substr($file, 0,
dol_strlen($file) - 4);
479 $modCodeCompta =
new $file();
480 '@phan-var-force ModeleAccountancyCode $modCodeTiers';
482 $arrayofmodules[$file] = $modCodeCompta;
490'@phan-var-force array<string,ModeleAccountancyCode> $arrayofmodules';
493foreach ($arrayofmodules as $file => $modCodeCompta) {
494 print
'<tr class="oddeven">';
495 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
496 print $modCodeCompta->info($langs);
498 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
501 print
'<td class="center">';
502 print
img_picto($langs->trans(
"Activated"),
'switch_on');
505 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.
newToken().
'&value='.urlencode($file).
'">';
506 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
509 print
'<td class="center">';
510 $s = $modCodeCompta->getToolTip($langs,
null, -1);
511 print $form->textwithpicto(
'', $s, 1);
529$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
530$sql .=
" WHERE type = 'company'";
531$sql .=
" AND entity = ".$conf->entity;
532$resql = $db->query($sql);
535 $num_rows = $db->num_rows($resql);
536 while ($i < $num_rows) {
537 $array = $db->fetch_array($resql);
538 if (is_array($array)) {
539 array_push($def, $array[0]);
547print
'<div class="div-table-responsive-no-min">';
548print
'<table class="noborder centpercent">';
549print
'<tr class="liste_titre">';
550print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
551print
'<td>'.$langs->trans(
"Description").
'</td>';
552print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
553print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
554print
'<td class="center" width="60">'.$langs->trans(
"Preview").
'</td>';
557foreach ($dirsociete as $dirroot) {
560 $handle = @opendir($dir);
561 if (is_resource($handle)) {
562 while (($file = readdir($handle)) !==
false) {
563 if (preg_match(
'/\.modules\.php$/i', $file)) {
564 $name = substr($file, 4,
dol_strlen($file) - 16);
565 $classname = substr($file, 0,
dol_strlen($file) - 12);
573 $module =
new $classname($db);
574 '@phan-var-force ModeleThirdPartyDoc $module';
576 $modulequalified = 1;
577 if (!empty($module->version)) {
578 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
579 $modulequalified = 0;
580 } elseif ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
581 $modulequalified = 0;
585 if ($modulequalified) {
586 print
'<tr class="oddeven"><td width="100">';
589 if (method_exists($module,
'info')) {
590 print $module->info($langs);
592 print $module->description;
597 if (in_array($name, $def)) {
598 print
'<td class="center">'.
"\n";
599 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'&token='.
newToken().
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">';
600 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
605 print
'<td class="center">'.
"\n";
606 print
img_picto(
dol_escape_htmltag($langs->trans(
"ErrorModuleRequirePHPVersion", implode(
'.', $module->phpmin))),
'switch_off',
'class="opacitymedium"');
609 print
'<td class="center">'.
"\n";
610 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&value='.urlencode($name).
'&token='.
newToken().
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
616 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
617 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
618 if ($module->type ==
'pdf') {
619 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
621 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
622 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
624 print
'<td class="center nowrap">';
625 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
629 print
'<td class="center nowrap">';
630 if ($module->type ==
'pdf') {
631 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.
newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
633 $linkspec =
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
653print
'<div class="div-table-responsive-no-min">';
654print
'<table class="noborder centpercent">';
655print
'<tr class="liste_titre">';
656print
'<td>'.$langs->trans(
"Name").
'</td>';
657print
'<td>'.$langs->trans(
"Description").
'</td>';
658print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
659print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'</td>';
660print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
663$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array());
664$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
665$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1',
$mysoc->country_code);
666$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
667$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2',
$mysoc->country_code);
668$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
669$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3',
$mysoc->country_code);
670$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
671$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4',
$mysoc->country_code);
672$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
673$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5',
$mysoc->country_code);
674$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
675$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6',
$mysoc->country_code);
676$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
677$profid[
'EMAIL'][1] = $langs->trans(
'Email');
679 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
680 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
681 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
682 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
683 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
684 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
687$nbofloop = count($profid);
688foreach ($profid as $key => $val) {
689 if ($profid[$key][1] !=
'-') {
690 print
'<tr class="oddeven">';
691 print
'<td>'.$profid[$key][0].
"</td><td>\n";
692 print $profid[$key][1];
695 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
696 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
697 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
699 $verif = !empty($conf->global->$idprof_unique);
700 $mandatory = !empty($conf->global->$idprof_mandatory);
701 $invoice_mandatory = !empty($conf->global->$idprof_invoice_mandatory);
704 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
705 print
img_picto($langs->trans(
"Activated"),
'switch_on');
708 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
709 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
714 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
715 print
img_picto($langs->trans(
"Activated"),
'switch_on');
718 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
719 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
723 if ($invoice_mandatory) {
724 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
725 print
img_picto($langs->trans(
"Activated"),
'switch_on');
728 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
729 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
738print
'<tr class="oddeven">';
739print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
742 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
743 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
746 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
747 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
751 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
752 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
755 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
756 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
759print
'<td class="center">';
761 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=0">';
762 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
764 print $langs->trans(
"SaleEEC").
'<br>';
765 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
766 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
768 print $langs->trans(
"AnySale");
770 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
771 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
773 print $langs->trans(
"SaleEEC").
'<br>';
774 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
775 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
777 print $langs->trans(
"AnySale");
779 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
780 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
782 print $langs->trans(
"SaleEEC").
'<br>';
783 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
784 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
786 print $langs->trans(
"AnySale");
799$form =
new Form($db);
801print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
802print
'<input type="hidden" name="token" value="'.newToken().
'">';
803print
'<input type="hidden" name="page_y" value="">';
804print
'<input type="hidden" name="action" value="updateoptions">';
806print
'<div class="div-table-responsive-no-min">';
807print
'<table class="noborder centpercent">';
808print
'<tr class="liste_titre">';
809print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
810print
'<td class="right" width="60"></td>'.
"\n";
811print
'<td width="80"> </td></tr>'.
"\n";
815print
'<tr class="oddeven">';
816print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
817if (!$conf->use_javascript_ajax) {
818 print
'<td class="nowrap right" colspan="2">';
819 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
822 print
'<td width="60" class="right">';
823 $arrval = array(
'0' => $langs->trans(
"No"),
824 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
825 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
826 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
828 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
829 print
'</td><td class="right">';
830 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
836print
'<tr class="oddeven">';
837print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
838if (!$conf->use_javascript_ajax) {
839 print
'<td class="nowrap right" colspan="2">';
840 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
843 print
'<td width="60" class="right">';
844 $arrval = array(
'0' => $langs->trans(
"No"),
845 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
846 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
847 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
849 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
850 print
'</td><td class="right">';
851 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
858print
'<tr class="oddeven">';
859print
'<td width="80%">'.$langs->trans(
"AddRefInList").
'</td>';
860print
'<td> </td>';
861print
'<td class="center">';
863 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
864 print
img_picto($langs->trans(
"Activated"),
'switch_on');
866 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
867 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
872print
'<tr class="oddeven">';
873print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
874print
'<td> </td>';
875print
'<td class="center">';
877 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
878 print
img_picto($langs->trans(
"Activated"),
'switch_on');
880 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
881 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
886print
'<tr class="oddeven">';
887print
'<td width="80%">'.$langs->trans(
"AddAdressInList").
'</td>';
888print
'<td> </td>';
889print
'<td class="center">';
891 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
892 print
img_picto($langs->trans(
"Activated"),
'switch_on');
894 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
895 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
900print
'<tr class="oddeven">';
901print
'<td width="80%">'.$langs->trans(
"AddEmailPhoneTownInContactList").
'</td>';
902print
'<td> </td>';
903print
'<td class="center">';
905 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
906 print
img_picto($langs->trans(
"Activated"),
'switch_on');
908 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
909 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
916 print
'<tr class="oddeven">';
917 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
918 print
'<td> </td>';
919 print
'<td class="center">';
921 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
922 print
img_picto($langs->trans(
"Activated"),
'switch_on');
924 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
925 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
933print
'<tr class="oddeven">';
934print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
935print
'<td> </td>';
936print
'<td class="center">';
938 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
939 print
img_picto($langs->trans(
"Activated"),
'switch_on');
941 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
942 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
949 print
'<tr class="oddeven">';
950 print
'<td>'.$langs->trans(
"DefaultCustomerType", $langs->transnoentitiesnoconv(
"MenuNewThirdParty"), $langs->transnoentitiesnoconv(
"MenuNewCustomer")).
'</td>';
952 print $formcompany->selectProspectCustomerType(
getDolGlobalInt(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
954 print
'<td class="center">';
955 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
961 print
'<tr class="oddeven">';
962 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
963 if (!$conf->use_javascript_ajax) {
964 print
'<td class="nowrap right" colspan="2">';
965 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
968 print
'<td width="60" class="right">';
970 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
972 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
973 print
'</td><td class="right">';
974 print
'<input type="submit" class="button small eposition" name="CONTACTS_DEFAULT_ROLES" value="'.$langs->trans(
"Modify").
'">';
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
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).
delDocumentModel($name, $type)
Delete document model used by doc generator.
versionphparray()
Return version PHP.
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays), to know if a version (a,b,c) is lower than (x,...
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.
societe_admin_prepare_head()
Return array head with list of tabs to view object information.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
GETPOSTISARRAY($paramname, $method=0)
Return true if the parameter $paramname is submit from a POST OR GET as an array.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.