29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
34$langs->loadLangs(array(
"admin",
"companies",
"other"));
36$action =
GETPOST(
'action',
'aZ09');
37$value =
GETPOST(
'value',
'alpha');
38$modulepart =
GETPOST(
'modulepart',
'aZ09');
52include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
54if ($action ==
'setcodeclient') {
55 $result =
dolibarr_set_const($db,
"SOCIETE_CODECLIENT_ADDON", $value,
'chaine', 0,
'', $conf->entity);
61if ($action ==
'setcodecompta') {
62 $result =
dolibarr_set_const($db,
"SOCIETE_CODECOMPTA_ADDON", $value,
'chaine', 0,
'', $conf->entity);
68if ($action ==
'updateoptions') {
69 if (
GETPOST(
'COMPANY_USE_SEARCH_TO_SELECT')) {
70 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
71 $res =
dolibarr_set_const($db,
"COMPANY_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity);
82 if (
GETPOST(
'CONTACT_USE_SEARCH_TO_SELECT')) {
83 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
84 $res =
dolibarr_set_const($db,
"CONTACT_USE_SEARCH_TO_SELECT", $contactsearch,
'chaine', 0,
'', $conf->entity);
95 if (
GETPOST(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
96 $customertypedefault =
GETPOST(
'defaultcustomertype',
'int');
97 $res =
dolibarr_set_const($db,
"THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault,
'chaine', 0,
'', $conf->entity);
110if ($action ==
'set') {
111 $label =
GETPOST(
'label',
'alpha');
112 $scandir =
GETPOST(
'scan_dir',
'alpha');
115 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
116 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
117 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
118 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
121 $resql = $db->query($sql);
128if ($action ==
'del') {
130 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
131 $sql .=
" WHERE nom='".$db->escape($value).
"' AND type='".$db->escape($type).
"' AND entity=".((int) $conf->entity);
132 $resql = $db->query($sql);
139if ($action ==
'setdoc') {
140 $label =
GETPOST(
'label',
'alpha');
141 $scandir =
GETPOST(
'scan_dir',
'alpha');
149 $sql_del =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
150 $sql_del .=
" WHERE nom = '".$db->escape(
GETPOST(
'value',
'alpha')).
"'";
151 $sql_del .=
" AND type = '".$db->escape($type).
"'";
152 $sql_del .=
" AND entity = ".((int) $conf->entity);
154 $result1 = $db->query($sql_del);
156 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
157 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
158 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
159 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
162 $result2 = $db->query($sql);
163 if ($result1 && $result2) {
171if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
172 $setaccountancycodecustomerinvoicemandatory =
GETPOST(
'value',
'int');
173 $res =
dolibarr_set_const($db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'', $conf->entity);
185if ($action ==
"setvatintraunique") {
186 $setvatintraunique =
GETPOST(
'value',
'int');
187 $res =
dolibarr_set_const($db,
"SOCIETE_VAT_INTRA_UNIQUE", $setvatintraunique,
'yesno', 0,
'', $conf->entity);
199if ($action ==
"setaddrefinlist") {
200 $setaddrefinlist =
GETPOST(
'value',
'int');
201 $res =
dolibarr_set_const($db,
"SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist,
'yesno', 0,
'', $conf->entity);
213if ($action ==
"setvatinlist") {
214 $setvatinlist =
GETPOST(
'value',
'int');
215 $res =
dolibarr_set_const($db,
"SOCIETE_SHOW_VAT_IN_LIST", $setvatinlist,
'yesno', 0,
'', $conf->entity);
227if ($action ==
"setaddadressinlist") {
228 $val =
GETPOST(
'value',
'int');
229 $res =
dolibarr_set_const($db,
"COMPANY_SHOW_ADDRESS_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
241if ($action ==
"setaddemailphonetownincontactlist") {
242 $val =
GETPOST(
'value',
'int');
243 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
255if ($action ==
"setaskforshippingmet") {
256 $setaskforshippingmet =
GETPOST(
'value',
'int');
257 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'', $conf->entity);
269if ($action ==
"setdisableprospectcustomer") {
270 $setdisableprospectcustomer =
GETPOST(
'value',
'int');
271 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'', $conf->entity);
283if ($action ==
'setprofid') {
284 $status =
GETPOST(
'status',
'alpha');
286 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
294if ($action ==
'setprofidmandatory') {
295 $status =
GETPOST(
'status',
'alpha');
297 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
305if ($action ==
'setprofidinvoicemandatory') {
306 $status =
GETPOST(
'status',
'alpha');
308 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
316if ($action ==
'sethideinactivethirdparty') {
317 $status =
GETPOST(
'status',
'alpha');
319 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'', $conf->entity);
324if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
325 $setonsearchandlistgooncustomerorsuppliercard =
GETPOST(
'value',
'int');
326 $res =
dolibarr_set_const($db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'', $conf->entity);
344$form =
new Form($db);
346$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
347llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
349$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
350print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
355print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
357$dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
358foreach ($conf->modules_parts[
'models'] as $mo) {
359 $dirsociete[] = $mo.
'core/modules/societe/';
366print
'<div class="div-table-responsive-no-min">';
367print
'<table class="noborder centpercent">'.
"\n";
368print
'<tr class="liste_titre">'.
"\n";
369print
' <td>'.$langs->trans(
"Name").
'</td>';
370print
' <td>'.$langs->trans(
"Description").
'</td>';
371print
' <td>'.$langs->trans(
"Example").
'</td>';
372print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
373print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
376$arrayofmodules = array();
378foreach ($dirsociete as $dirroot) {
381 $handle = @opendir($dir);
382 if (is_resource($handle)) {
384 while (($file = readdir($handle)) !==
false) {
385 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
386 $file = substr($file, 0,
dol_strlen($file) - 4);
394 $modCodeTiers =
new $file();
397 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
400 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
404 $arrayofmodules[$file] = $modCodeTiers;
413foreach ($arrayofmodules as $file => $modCodeTiers) {
414 print
'<tr class="oddeven">'.
"\n";
415 print
'<td width="140">'.$modCodeTiers->name.
'</td>'.
"\n";
416 print
'<td>'.$modCodeTiers->info($langs).
'</td>'.
"\n";
417 print
'<td class="nowrap">'.$modCodeTiers->getExample($langs).
'</td>'.
"\n";
419 if ($conf->global->SOCIETE_CODECLIENT_ADDON ==
"$file") {
420 print
'<td class="center">'.
"\n";
421 print
img_picto($langs->trans(
"Activated"),
'switch_on');
424 $disabled = (isModEnabled(
'multicompany') && (is_object($mc) && !empty($mc->sharings[
'referent']) && $mc->sharings[
'referent'] != $conf->entity) ?
true : false);
425 print
'<td class="center">';
427 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeclient&token='.newToken().
'&value='.urlencode($file).
'">';
429 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
436 print
'<td class="center">';
437 $s = $modCodeTiers->getToolTip($langs,
null, -1);
438 print $form->textwithpicto(
'', $s, 1);
453print
'<div class="div-table-responsive-no-min">';
454print
'<table class="noborder centpercent">';
455print
'<tr class="liste_titre">';
456print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
457print
'<td>'.$langs->trans(
"Description").
'</td>';
458print
'<td>'.$langs->trans(
"Example").
'</td>';
459print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
460print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
463$arrayofmodules = array();
465foreach ($dirsociete as $dirroot) {
468 $handle = @opendir($dir);
469 if (is_resource($handle)) {
470 while (($file = readdir($handle)) !==
false) {
471 if (substr($file, 0, 15) ==
'mod_codecompta_' && substr($file, -3) ==
'php') {
472 $file = substr($file, 0,
dol_strlen($file) - 4);
480 $modCodeCompta =
new $file();
482 $arrayofmodules[$file] = $modCodeCompta;
492foreach ($arrayofmodules as $file => $modCodeCompta) {
493 print
'<tr class="oddeven">';
494 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
495 print $modCodeCompta->info($langs);
497 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
499 if ($conf->global->SOCIETE_CODECOMPTA_ADDON ==
"$file") {
500 print
'<td class="center">';
501 print
img_picto($langs->trans(
"Activated"),
'switch_on');
504 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.newToken().
'&value='.urlencode($file).
'">';
505 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
508 print
'<td class="center">';
509 $s = $modCodeCompta->getToolTip($langs,
null, -1);
510 print $form->textwithpicto(
'', $s, 1);
527$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
528$sql .=
" WHERE type = 'company'";
529$sql .=
" AND entity = ".$conf->entity;
530$resql = $db->query($sql);
533 $num_rows = $db->num_rows($resql);
534 while ($i < $num_rows) {
535 $array = $db->fetch_array($resql);
536 array_push($def, $array[0]);
543print
'<div class="div-table-responsive-no-min">';
544print
'<table class="noborder centpercent">';
545print
'<tr class="liste_titre">';
546print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
547print
'<td>'.$langs->trans(
"Description").
'</td>';
548print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
549print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
550print
'<td class="center" width="60">'.$langs->trans(
"Preview").
'</td>';
553foreach ($dirsociete as $dirroot) {
556 $handle = @opendir($dir);
557 if (is_resource($handle)) {
558 while (($file = readdir($handle)) !==
false) {
559 if (preg_match(
'/\.modules\.php$/i', $file)) {
560 $name = substr($file, 4,
dol_strlen($file) - 16);
561 $classname = substr($file, 0,
dol_strlen($file) - 12);
569 $module =
new $classname($db);
571 $modulequalified = 1;
572 if (!empty($module->version)) {
573 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
574 $modulequalified = 0;
575 } elseif ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
576 $modulequalified = 0;
580 if ($modulequalified) {
581 print
'<tr class="oddeven"><td width="100">';
584 if (method_exists($module,
'info')) {
585 print $module->info($langs);
587 print $module->description;
592 if (in_array($name, $def)) {
593 print
"<td class=\"center\">\n";
596 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).
'">';
597 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
607 print
'<td class="center">'.
"\n";
611 print
'<td class="center">'.
"\n";
612 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>';
618 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
619 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
620 if ($module->type ==
'pdf') {
621 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
623 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
624 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((!empty($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
626 print
'<td class="center nowrap">';
627 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
631 print
'<td class="center nowrap">';
632 if ($module->type ==
'pdf') {
633 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
635 $linkspec =
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
655print
'<div class="div-table-responsive-no-min">';
656print
'<table class="noborder centpercent">';
657print
'<tr class="liste_titre">';
658print
'<td>'.$langs->trans(
"Name").
'</td>';
659print
'<td>'.$langs->trans(
"Description").
'</td>';
660print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
661print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'</td>';
662print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
665$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
666$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1', $mysoc->country_code);
667$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
668$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2', $mysoc->country_code);
669$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
670$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3', $mysoc->country_code);
671$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
672$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4', $mysoc->country_code);
673$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
674$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5', $mysoc->country_code);
675$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
676$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6', $mysoc->country_code);
677$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
678$profid[
'EMAIL'][1] = $langs->trans(
'Email');
679if (isModEnabled(
'accounting')) {
680 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
681 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
682 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
683 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
686$nbofloop = count($profid);
687foreach ($profid as $key => $val) {
688 if ($profid[$key][1] !=
'-') {
689 print
'<tr class="oddeven">';
690 print
'<td>'.$profid[$key][0].
"</td><td>\n";
691 print $profid[$key][1];
694 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
695 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
696 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
698 $verif = (empty($conf->global->$idprof_unique) ? false :
true);
699 $mandatory = (empty($conf->global->$idprof_mandatory) ? false :
true);
700 $invoice_mandatory = (empty($conf->global->$idprof_invoice_mandatory) ? false :
true);
703 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=0">';
704 print
img_picto($langs->trans(
"Activated"),
'switch_on');
707 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=1">';
708 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
713 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=0">';
714 print
img_picto($langs->trans(
"Activated"),
'switch_on');
717 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=1">';
718 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
722 if ($invoice_mandatory) {
723 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=0">';
724 print
img_picto($langs->trans(
"Activated"),
'switch_on');
727 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=1">';
728 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=setvatintraunique&token='.newToken().
'&value=0">';
743 print
img_picto($langs->trans(
"Activated"),
'switch_on');
746 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatintraunique&token='.newToken().
'&value=1">';
747 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
750print
'<td colspan="2"></td>';
761$form =
new Form($db);
763print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
764print
'<input type="hidden" name="token" value="'.newToken().
'">';
765print
'<input type="hidden" name="page_y" value="">';
766print
'<input type="hidden" name="action" value="updateoptions">';
768print
'<div class="div-table-responsive-no-min">';
769print
'<table class="noborder centpercent">';
770print
'<tr class="liste_titre">';
771print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
772print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
773print
'<td width="80"> </td></tr>'.
"\n";
777print
'<tr class="oddeven">';
778print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
779if (!$conf->use_javascript_ajax) {
780 print
'<td class="nowrap right" colspan="2">';
781 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
784 print
'<td width="60" class="right">';
785 $arrval = array(
'0'=>$langs->trans(
"No"),
786 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
787 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
788 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
790 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
791 print
'</td><td class="right">';
792 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
798print
'<tr class="oddeven">';
799print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
800if (!$conf->use_javascript_ajax) {
801 print
'<td class="nowrap right" colspan="2">';
802 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
805 print
'<td width="60" class="right">';
806 $arrval = array(
'0'=>$langs->trans(
"No"),
807 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
808 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
809 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
811 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
812 print
'</td><td class="right">';
813 print
'<input type="submit" class="button small eposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
820print
'<tr class="oddeven">';
821print
'<td width="80%">'.$langs->trans(
"AddRefInList").
'</td>';
822print
'<td> </td>';
823print
'<td class="center">';
825 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.newToken().
'&value=0">';
826 print
img_picto($langs->trans(
"Activated"),
'switch_on');
828 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.newToken().
'&value=1">';
829 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
834print
'<tr class="oddeven">';
835print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
836print
'<td> </td>';
837print
'<td class="center">';
839 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.newToken().
'&value=0">';
840 print
img_picto($langs->trans(
"Activated"),
'switch_on');
842 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.newToken().
'&value=1">';
843 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
848print
'<tr class="oddeven">';
849print
'<td width="80%">'.$langs->trans(
"AddAdressInList").
'</td>';
850print
'<td> </td>';
851print
'<td class="center">';
853 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.newToken().
'&value=0">';
854 print
img_picto($langs->trans(
"Activated"),
'switch_on');
856 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.newToken().
'&value=1">';
857 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
862print
'<tr class="oddeven">';
863print
'<td width="80%">'.$langs->trans(
"AddEmailPhoneTownInContactList").
'</td>';
864print
'<td> </td>';
865print
'<td class="center">';
867 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.newToken().
'&value=0">';
868 print
img_picto($langs->trans(
"Activated"),
'switch_on');
870 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.newToken().
'&value=1">';
871 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
876if (isModEnabled(
"expedition")) {
878 print
'<tr class="oddeven">';
879 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
880 print
'<td> </td>';
881 print
'<td class="center">';
883 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.newToken().
'&value=0">';
884 print
img_picto($langs->trans(
"Activated"),
'switch_on');
886 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.newToken().
'&value=1">';
887 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
895print
'<tr class="oddeven">';
896print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
897print
'<td> </td>';
898print
'<td class="center">';
900 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.newToken().
'&value=0">';
901 print
img_picto($langs->trans(
"Activated"),
'switch_on');
903 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.newToken().
'&value=1">';
904 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
911 print
'<tr class="oddeven">';
912 print
'<td>'.$langs->trans(
"DefaultCustomerType").
'</td>';
914 print $formcompany->selectProspectCustomerType(
getDolGlobalString(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
916 print
'<td class="center">';
917 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 informations.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
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.
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.