31require
'../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
36$langs->loadLangs(array(
"admin",
"companies",
"other"));
38$action =
GETPOST(
'action',
'aZ09');
39$value =
GETPOST(
'value',
'alpha');
40$modulepart =
GETPOST(
'modulepart',
'aZ09');
54include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
56if ($action ==
'setcodeclient') {
57 $result =
dolibarr_set_const($db,
"SOCIETE_CODECLIENT_ADDON", $value,
'chaine', 0,
'', $conf->entity);
63if ($action ==
'setcodecompta') {
64 $result =
dolibarr_set_const($db,
"SOCIETE_CODECOMPTA_ADDON", $value,
'chaine', 0,
'', $conf->entity);
70if ($action ==
'updateoptions') {
71 if (
GETPOST(
'COMPANY_USE_SEARCH_TO_SELECT')) {
72 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
73 $res =
dolibarr_set_const($db,
"COMPANY_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity);
84 if (
GETPOST(
'CONTACT_USE_SEARCH_TO_SELECT')) {
85 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
86 $res =
dolibarr_set_const($db,
"CONTACT_USE_SEARCH_TO_SELECT", $contactsearch,
'chaine', 0,
'', $conf->entity);
97 if (
GETPOST(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
98 $customertypedefault =
GETPOSTINT(
'defaultcustomertype');
99 $res =
dolibarr_set_const($db,
"THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault,
'chaine', 0,
'', $conf->entity);
112if ($action ==
'set') {
113 $label =
GETPOST(
'label',
'alpha');
114 $scandir =
GETPOST(
'scan_dir',
'alpha');
117 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
118 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
119 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
120 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
123 $resql = $db->query($sql);
130if ($action ==
'del') {
132 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
133 $sql .=
" WHERE nom='".$db->escape($value).
"' AND type='".$db->escape($type).
"' AND entity=".((int) $conf->entity);
134 $resql = $db->query($sql);
141if ($action ==
'setdoc') {
142 $label =
GETPOST(
'label',
'alpha');
143 $scandir =
GETPOST(
'scan_dir',
'alpha');
151 $sql_del =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
152 $sql_del .=
" WHERE nom = '".$db->escape(
GETPOST(
'value',
'alpha')).
"'";
153 $sql_del .=
" AND type = '".$db->escape($type).
"'";
154 $sql_del .=
" AND entity = ".((int) $conf->entity);
156 $result1 = $db->query($sql_del);
158 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
159 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
160 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
161 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
164 $result2 = $db->query($sql);
165 if ($result1 && $result2) {
173if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
174 $setaccountancycodecustomerinvoicemandatory =
GETPOSTINT(
'value');
175 $res =
dolibarr_set_const($db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'', $conf->entity);
187if ($action ==
"setvatintraunique") {
189 $res =
dolibarr_set_const($db,
"SOCIETE_VAT_INTRA_UNIQUE", $setvatintraunique,
'yesno', 0,
'', $conf->entity);
201if ($action ==
"setaddrefinlist") {
203 $res =
dolibarr_set_const($db,
"SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist,
'yesno', 0,
'', $conf->entity);
215if ($action ==
"setvatinlist") {
217 $res =
dolibarr_set_const($db,
"SOCIETE_SHOW_VAT_IN_LIST", $setvatinlist,
'yesno', 0,
'', $conf->entity);
229if ($action ==
"setaddadressinlist") {
231 $res =
dolibarr_set_const($db,
"COMPANY_SHOW_ADDRESS_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
243if ($action ==
"setaddemailphonetownincontactlist") {
245 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
257if ($action ==
"setaskforshippingmet") {
259 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'', $conf->entity);
271if ($action ==
"setdisableprospectcustomer") {
272 $setdisableprospectcustomer =
GETPOSTINT(
'value');
273 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'', $conf->entity);
285if ($action ==
'setprofid') {
286 $status =
GETPOST(
'status',
'alpha');
288 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
296if ($action ==
'setprofidmandatory') {
297 $status =
GETPOST(
'status',
'alpha');
299 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
307if ($action ==
'setprofidinvoicemandatory') {
308 $status =
GETPOST(
'status',
'alpha');
310 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
318if ($action ==
'sethideinactivethirdparty') {
319 $status =
GETPOST(
'status',
'alpha');
321 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'', $conf->entity);
326if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
327 $setonsearchandlistgooncustomerorsuppliercard =
GETPOSTINT(
'value');
328 $res =
dolibarr_set_const($db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'', $conf->entity);
346$form =
new Form($db);
348$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
349llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
351$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
352print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
357print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
359$dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
360foreach ($conf->modules_parts[
'models'] as $mo) {
361 $dirsociete[] = $mo.
'core/modules/societe/';
368print
'<div class="div-table-responsive-no-min">';
369print
'<table class="noborder centpercent">'.
"\n";
370print
'<tr class="liste_titre">'.
"\n";
371print
' <td>'.$langs->trans(
"Name").
'</td>';
372print
' <td>'.$langs->trans(
"Description").
'</td>';
373print
' <td>'.$langs->trans(
"Example").
'</td>';
374print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
375print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
378$arrayofmodules = array();
380foreach ($dirsociete as $dirroot) {
383 $handle = @opendir($dir);
384 if (is_resource($handle)) {
386 while (($file = readdir($handle)) !==
false) {
387 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
388 $file = substr($file, 0,
dol_strlen($file) - 4);
397 $modCodeTiers =
new $file($db);
400 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
403 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
407 $arrayofmodules[$file] = $modCodeTiers;
416foreach ($arrayofmodules as $file => $modCodeTiers) {
417 print
'<tr class="oddeven">'.
"\n";
418 print
'<td width="140">'.$modCodeTiers->name.
'</td>'.
"\n";
419 print
'<td>'.$modCodeTiers->info($langs).
'</td>'.
"\n";
420 print
'<td class="nowrap">'.$modCodeTiers->getExample($langs).
'</td>'.
"\n";
422 if ($conf->global->SOCIETE_CODECLIENT_ADDON ==
"$file") {
423 print
'<td class="center">'.
"\n";
424 print
img_picto($langs->trans(
"Activated"),
'switch_on');
427 $disabled = (isModEnabled(
'multicompany') && (is_object($mc) && !empty($mc->sharings[
'referent']) && $mc->sharings[
'referent'] != $conf->entity) ?
true : false);
428 print
'<td class="center">';
430 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeclient&token='.
newToken().
'&value='.urlencode($file).
'">';
432 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
439 print
'<td class="center">';
440 $s = $modCodeTiers->getToolTip($langs,
null, -1);
441 print $form->textwithpicto(
'', $s, 1);
456print
'<div class="div-table-responsive-no-min">';
457print
'<table class="noborder centpercent">';
458print
'<tr class="liste_titre">';
459print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
460print
'<td>'.$langs->trans(
"Description").
'</td>';
461print
'<td>'.$langs->trans(
"Example").
'</td>';
462print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
463print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
466$arrayofmodules = array();
468foreach ($dirsociete as $dirroot) {
471 $handle = @opendir($dir);
472 if (is_resource($handle)) {
473 while (($file = readdir($handle)) !==
false) {
474 if (substr($file, 0, 15) ==
'mod_codecompta_' && substr($file, -3) ==
'php') {
475 $file = substr($file, 0,
dol_strlen($file) - 4);
483 $modCodeCompta =
new $file();
485 $arrayofmodules[$file] = $modCodeCompta;
495foreach ($arrayofmodules as $file => $modCodeCompta) {
496 print
'<tr class="oddeven">';
497 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
498 print $modCodeCompta->info($langs);
500 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
502 if ($conf->global->SOCIETE_CODECOMPTA_ADDON ==
"$file") {
503 print
'<td class="center">';
504 print
img_picto($langs->trans(
"Activated"),
'switch_on');
507 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.
newToken().
'&value='.urlencode($file).
'">';
508 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
511 print
'<td class="center">';
512 $s = $modCodeCompta->getToolTip($langs,
null, -1);
513 print $form->textwithpicto(
'', $s, 1);
530$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
531$sql .=
" WHERE type = 'company'";
532$sql .=
" AND entity = ".$conf->entity;
533$resql = $db->query($sql);
536 $num_rows = $db->num_rows($resql);
537 while ($i < $num_rows) {
538 $array = $db->fetch_array($resql);
539 if (is_array($array)) {
540 array_push($def, $array[0]);
548print
'<div class="div-table-responsive-no-min">';
549print
'<table class="noborder centpercent">';
550print
'<tr class="liste_titre">';
551print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
552print
'<td>'.$langs->trans(
"Description").
'</td>';
553print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
554print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
555print
'<td class="center" width="60">'.$langs->trans(
"Preview").
'</td>';
558foreach ($dirsociete as $dirroot) {
561 $handle = @opendir($dir);
562 if (is_resource($handle)) {
563 while (($file = readdir($handle)) !==
false) {
564 if (preg_match(
'/\.modules\.php$/i', $file)) {
565 $name = substr($file, 4,
dol_strlen($file) - 16);
566 $classname = substr($file, 0,
dol_strlen($file) - 12);
574 $module =
new $classname($db);
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";
601 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).
'">';
602 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
612 print
'<td class="center">'.
"\n";
616 print
'<td class="center">'.
"\n";
617 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>';
623 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
624 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
625 if ($module->type ==
'pdf') {
626 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
628 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
629 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
631 print
'<td class="center nowrap">';
632 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
636 print
'<td class="center nowrap">';
637 if ($module->type ==
'pdf') {
638 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.
newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
640 $linkspec =
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
660print
'<div class="div-table-responsive-no-min">';
661print
'<table class="noborder centpercent">';
662print
'<tr class="liste_titre">';
663print
'<td>'.$langs->trans(
"Name").
'</td>';
664print
'<td>'.$langs->trans(
"Description").
'</td>';
665print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
666print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'</td>';
667print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
670$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array());
671$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
672$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1', $mysoc->country_code);
673$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
674$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2', $mysoc->country_code);
675$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
676$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3', $mysoc->country_code);
677$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
678$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4', $mysoc->country_code);
679$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
680$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5', $mysoc->country_code);
681$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
682$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6', $mysoc->country_code);
683$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
684$profid[
'EMAIL'][1] = $langs->trans(
'Email');
685if (isModEnabled(
'accounting')) {
686 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
687 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
688 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
689 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
690 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
691 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
694$nbofloop = count($profid);
695foreach ($profid as $key => $val) {
696 if ($profid[$key][1] !=
'-') {
697 print
'<tr class="oddeven">';
698 print
'<td>'.$profid[$key][0].
"</td><td>\n";
699 print $profid[$key][1];
702 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
703 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
704 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
706 $verif = (empty($conf->global->$idprof_unique) ? false :
true);
707 $mandatory = (empty($conf->global->$idprof_mandatory) ? false :
true);
708 $invoice_mandatory = (empty($conf->global->$idprof_invoice_mandatory) ? false :
true);
711 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
712 print
img_picto($langs->trans(
"Activated"),
'switch_on');
715 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
716 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
721 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
722 print
img_picto($langs->trans(
"Activated"),
'switch_on');
725 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
726 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
730 if ($invoice_mandatory) {
731 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
732 print
img_picto($langs->trans(
"Activated"),
'switch_on');
735 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
736 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
745print
'<tr class="oddeven">';
746print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
749 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatintraunique&token='.
newToken().
'&value=0">';
750 print
img_picto($langs->trans(
"Activated"),
'switch_on');
753 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatintraunique&token='.
newToken().
'&value=1">';
754 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
757print
'<td colspan="2"></td>';
768$form =
new Form($db);
770print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
771print
'<input type="hidden" name="token" value="'.newToken().
'">';
772print
'<input type="hidden" name="page_y" value="">';
773print
'<input type="hidden" name="action" value="updateoptions">';
775print
'<div class="div-table-responsive-no-min">';
776print
'<table class="noborder centpercent">';
777print
'<tr class="liste_titre">';
778print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
779print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
780print
'<td width="80"> </td></tr>'.
"\n";
784print
'<tr class="oddeven">';
785print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
786if (!$conf->use_javascript_ajax) {
787 print
'<td class="nowrap right" colspan="2">';
788 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
791 print
'<td width="60" class="right">';
792 $arrval = array(
'0' => $langs->trans(
"No"),
793 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
794 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
795 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
797 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
798 print
'</td><td class="right">';
799 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
805print
'<tr class="oddeven">';
806print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
807if (!$conf->use_javascript_ajax) {
808 print
'<td class="nowrap right" colspan="2">';
809 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
812 print
'<td width="60" class="right">';
813 $arrval = array(
'0' => $langs->trans(
"No"),
814 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
815 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
816 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
818 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
819 print
'</td><td class="right">';
820 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
827print
'<tr class="oddeven">';
828print
'<td width="80%">'.$langs->trans(
"AddRefInList").
'</td>';
829print
'<td> </td>';
830print
'<td class="center">';
832 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
833 print
img_picto($langs->trans(
"Activated"),
'switch_on');
835 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
836 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
841print
'<tr class="oddeven">';
842print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
843print
'<td> </td>';
844print
'<td class="center">';
846 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
847 print
img_picto($langs->trans(
"Activated"),
'switch_on');
849 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
850 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
855print
'<tr class="oddeven">';
856print
'<td width="80%">'.$langs->trans(
"AddAdressInList").
'</td>';
857print
'<td> </td>';
858print
'<td class="center">';
860 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
861 print
img_picto($langs->trans(
"Activated"),
'switch_on');
863 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
864 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
869print
'<tr class="oddeven">';
870print
'<td width="80%">'.$langs->trans(
"AddEmailPhoneTownInContactList").
'</td>';
871print
'<td> </td>';
872print
'<td class="center">';
874 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
875 print
img_picto($langs->trans(
"Activated"),
'switch_on');
877 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
878 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
883if (isModEnabled(
"shipping")) {
885 print
'<tr class="oddeven">';
886 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
887 print
'<td> </td>';
888 print
'<td class="center">';
890 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
891 print
img_picto($langs->trans(
"Activated"),
'switch_on');
893 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
894 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
902print
'<tr class="oddeven">';
903print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
904print
'<td> </td>';
905print
'<td class="center">';
907 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
908 print
img_picto($langs->trans(
"Activated"),
'switch_on');
910 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
911 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
918 print
'<tr class="oddeven">';
919 print
'<td>'.$langs->trans(
"DefaultCustomerType").
'</td>';
921 print $formcompany->selectProspectCustomerType(
getDolGlobalString(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
923 print
'<td class="center">';
924 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
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).
versionphparray()
Return version PHP.
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
societe_admin_prepare_head()
Return array head with list of tabs to view object information.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
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'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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.