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.
'/contact/class/contact.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
37$langs->loadLangs(array(
"admin",
"companies",
"other"));
39$action =
GETPOST(
'action',
'aZ09');
40$value =
GETPOST(
'value',
'alpha');
41$modulepart =
GETPOST(
'modulepart',
'aZ09');
55include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
57if ($action ==
'setcodeclient') {
58 $result =
dolibarr_set_const($db,
"SOCIETE_CODECLIENT_ADDON", $value,
'chaine', 0,
'', $conf->entity);
64if ($action ==
'setcodecompta') {
65 $result =
dolibarr_set_const($db,
"SOCIETE_CODECOMPTA_ADDON", $value,
'chaine', 0,
'', $conf->entity);
71if ($action ==
'updateoptions') {
72 if (GETPOSTISSET(
'COMPANY_USE_SEARCH_TO_SELECT')) {
73 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
74 $res =
dolibarr_set_const($db,
"COMPANY_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity);
85 if (GETPOSTISSET(
'CONTACT_USE_SEARCH_TO_SELECT')) {
86 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
87 $res =
dolibarr_set_const($db,
"CONTACT_USE_SEARCH_TO_SELECT", $contactsearch,
'chaine', 0,
'', $conf->entity);
98 if (GETPOSTISSET(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
99 $customertypedefault =
GETPOSTINT(
'defaultcustomertype');
100 $res =
dolibarr_set_const($db,
"THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault,
'chaine', 0,
'', $conf->entity);
112 $rolessearch =
GETPOST(
'activate_CONTACTS_DEFAULT_ROLES',
'array:aZ09');
113 $res =
dolibarr_set_const($db,
"CONTACTS_DEFAULT_ROLES", implode(
',', $rolessearch),
'chaine', 0,
'', $conf->entity);
126if ($action ==
'set') {
127 $label =
GETPOST(
'label',
'alpha');
128 $scandir =
GETPOST(
'scan_dir',
'alpha');
131 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
132 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
133 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
134 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
137 $resql = $db->query($sql);
144if ($action ==
'del') {
146 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
147 $sql .=
" WHERE nom='".$db->escape($value).
"' AND type='".$db->escape($type).
"' AND entity=".((int) $conf->entity);
148 $resql = $db->query($sql);
155if ($action ==
'setdoc') {
156 $label =
GETPOST(
'label',
'alpha');
157 $scandir =
GETPOST(
'scan_dir',
'alpha');
165 $sql_del =
"DELETE FROM ".MAIN_DB_PREFIX.
"document_model";
166 $sql_del .=
" WHERE nom = '".$db->escape(
GETPOST(
'value',
'alpha')).
"'";
167 $sql_del .=
" AND type = '".$db->escape($type).
"'";
168 $sql_del .=
" AND entity = ".((int) $conf->entity);
170 $result1 = $db->query($sql_del);
172 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity, libelle, description)";
173 $sql .=
" VALUES ('".$db->escape($value).
"', '".$db->escape($type).
"', ".((int) $conf->entity).
", ";
174 $sql .= ($label ?
"'".$db->escape($label).
"'" :
'null').
", ";
175 $sql .= (!empty($scandir) ?
"'".$db->escape($scandir).
"'" :
"null");
178 $result2 = $db->query($sql);
179 if ($result1 && $result2) {
187if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
188 $setaccountancycodecustomerinvoicemandatory =
GETPOSTINT(
'value');
189 $res =
dolibarr_set_const($db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'', $conf->entity);
201if ($action ==
"setvatintraunique") {
203 $res =
dolibarr_set_const($db,
"SOCIETE_VAT_INTRA_UNIQUE", $setvatintraunique,
'yesno', 0,
'', $conf->entity);
215if ($action ==
"setaddrefinlist") {
217 $res =
dolibarr_set_const($db,
"SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist,
'yesno', 0,
'', $conf->entity);
229if ($action ==
"setvatinlist") {
231 $res =
dolibarr_set_const($db,
"SOCIETE_SHOW_VAT_IN_LIST", $setvatinlist,
'yesno', 0,
'', $conf->entity);
243if ($action ==
"setaddadressinlist") {
245 $res =
dolibarr_set_const($db,
"COMPANY_SHOW_ADDRESS_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
257if ($action ==
"setaddemailphonetownincontactlist") {
259 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'', $conf->entity);
271if ($action ==
"setaskforshippingmet") {
273 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'', $conf->entity);
285if ($action ==
"setdisableprospectcustomer") {
286 $setdisableprospectcustomer =
GETPOSTINT(
'value');
287 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'', $conf->entity);
299if ($action ==
'setprofid') {
300 $status =
GETPOST(
'status',
'alpha');
302 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
310if ($action ==
'setprofidmandatory') {
311 $status =
GETPOST(
'status',
'alpha');
313 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
321if ($action ==
'setprofidinvoicemandatory') {
322 $status =
GETPOST(
'status',
'alpha');
324 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
332if ($action ==
'sethideinactivethirdparty') {
333 $status =
GETPOST(
'status',
'alpha');
335 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'', $conf->entity);
340if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
341 $setonsearchandlistgooncustomerorsuppliercard =
GETPOSTINT(
'value');
342 $res =
dolibarr_set_const($db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'', $conf->entity);
360$form =
new Form($db);
362$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
363llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
365$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
366print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
371print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
373$dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
374foreach ($conf->modules_parts[
'models'] as $mo) {
375 $dirsociete[] = $mo.
'core/modules/societe/';
382print
'<div class="div-table-responsive-no-min">';
383print
'<table class="noborder centpercent">'.
"\n";
384print
'<tr class="liste_titre">'.
"\n";
385print
' <td>'.$langs->trans(
"Name").
'</td>';
386print
' <td>'.$langs->trans(
"Description").
'</td>';
387print
' <td>'.$langs->trans(
"Example").
'</td>';
388print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
389print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
392$arrayofmodules = array();
394foreach ($dirsociete as $dirroot) {
397 $handle = @opendir($dir);
398 if (is_resource($handle)) {
400 while (($file = readdir($handle)) !==
false) {
401 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
402 $file = substr($file, 0,
dol_strlen($file) - 4);
411 $modCodeTiers =
new $file($db);
412 '@phan-var-force ModeleThirdPartyCode $modCodeTiers';
415 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
418 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
422 $arrayofmodules[$file] = $modCodeTiers;
430'@phan-var-force array<string,ModeleThirdPartyCode> $arrayofmodules';
432foreach ($arrayofmodules as $file => $modCodeTiers) {
433 print
'<tr class="oddeven">'.
"\n";
434 print
'<td width="140">'.$modCodeTiers->name.
'</td>'.
"\n";
435 print
'<td>'.$modCodeTiers->info($langs).
'</td>'.
"\n";
436 print
'<td class="nowrap">'.$modCodeTiers->getExample($langs).
'</td>'.
"\n";
438 if ($conf->global->SOCIETE_CODECLIENT_ADDON ==
"$file") {
439 print
'<td class="center">'.
"\n";
440 print
img_picto($langs->trans(
"Activated"),
'switch_on');
443 $disabled = (isModEnabled(
'multicompany') && ((is_object($mc) && !empty($mc->sharings[
'referent'])) && ($mc->sharings[
'referent'] != $conf->entity)));
444 print
'<td class="center">';
446 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeclient&token='.
newToken().
'&value='.urlencode($file).
'">';
448 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
455 print
'<td class="center">';
456 $s = $modCodeTiers->getToolTip($langs,
null, -1);
457 print $form->textwithpicto(
'', $s, 1);
472print
'<div class="div-table-responsive-no-min">';
473print
'<table class="noborder centpercent">';
474print
'<tr class="liste_titre">';
475print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
476print
'<td>'.$langs->trans(
"Description").
'</td>';
477print
'<td>'.$langs->trans(
"Example").
'</td>';
478print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
479print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
482$arrayofmodules = array();
484foreach ($dirsociete as $dirroot) {
487 $handle = @opendir($dir);
488 if (is_resource($handle)) {
489 while (($file = readdir($handle)) !==
false) {
490 if (substr($file, 0, 15) ==
'mod_codecompta_' && substr($file, -3) ==
'php') {
491 $file = substr($file, 0,
dol_strlen($file) - 4);
499 $modCodeCompta =
new $file();
500 '@phan-var-force ModeleAccountancyCode $modCodeTiers';
502 $arrayofmodules[$file] = $modCodeCompta;
510'@phan-var-force array<string,ModeleAccountancyCode> $arrayofmodules';
513foreach ($arrayofmodules as $file => $modCodeCompta) {
514 print
'<tr class="oddeven">';
515 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
516 print $modCodeCompta->info($langs);
518 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
520 if ($conf->global->SOCIETE_CODECOMPTA_ADDON ==
"$file") {
521 print
'<td class="center">';
522 print
img_picto($langs->trans(
"Activated"),
'switch_on');
525 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.
newToken().
'&value='.urlencode($file).
'">';
526 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
529 print
'<td class="center">';
530 $s = $modCodeCompta->getToolTip($langs,
null, -1);
531 print $form->textwithpicto(
'', $s, 1);
548$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
549$sql .=
" WHERE type = 'company'";
550$sql .=
" AND entity = ".$conf->entity;
551$resql = $db->query($sql);
554 $num_rows = $db->num_rows($resql);
555 while ($i < $num_rows) {
556 $array = $db->fetch_array($resql);
557 if (is_array($array)) {
558 array_push($def, $array[0]);
566print
'<div class="div-table-responsive-no-min">';
567print
'<table class="noborder centpercent">';
568print
'<tr class="liste_titre">';
569print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
570print
'<td>'.$langs->trans(
"Description").
'</td>';
571print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
572print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
573print
'<td class="center" width="60">'.$langs->trans(
"Preview").
'</td>';
576foreach ($dirsociete as $dirroot) {
579 $handle = @opendir($dir);
580 if (is_resource($handle)) {
581 while (($file = readdir($handle)) !==
false) {
582 if (preg_match(
'/\.modules\.php$/i', $file)) {
583 $name = substr($file, 4,
dol_strlen($file) - 16);
584 $classname = substr($file, 0,
dol_strlen($file) - 12);
592 $module =
new $classname($db);
593 '@phan-var-force ModeleThirdPartyDoc $module';
595 $modulequalified = 1;
596 if (!empty($module->version)) {
597 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
598 $modulequalified = 0;
599 } elseif ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
600 $modulequalified = 0;
604 if ($modulequalified) {
605 print
'<tr class="oddeven"><td width="100">';
608 if (method_exists($module,
'info')) {
609 print $module->info($langs);
611 print $module->description;
616 if (in_array($name, $def)) {
617 print
"<td class=\"center\">\n";
620 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).
'">';
621 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
631 print
'<td class="center">'.
"\n";
635 print
'<td class="center">'.
"\n";
636 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>';
642 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
643 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
644 if ($module->type ==
'pdf') {
645 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
647 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
648 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
650 print
'<td class="center nowrap">';
651 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
655 print
'<td class="center nowrap">';
656 if ($module->type ==
'pdf') {
657 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.
newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
659 $linkspec =
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
679print
'<div class="div-table-responsive-no-min">';
680print
'<table class="noborder centpercent">';
681print
'<tr class="liste_titre">';
682print
'<td>'.$langs->trans(
"Name").
'</td>';
683print
'<td>'.$langs->trans(
"Description").
'</td>';
684print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
685print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'</td>';
686print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
689$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array());
690$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
691$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1', $mysoc->country_code);
692$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
693$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2', $mysoc->country_code);
694$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
695$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3', $mysoc->country_code);
696$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
697$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4', $mysoc->country_code);
698$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
699$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5', $mysoc->country_code);
700$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
701$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6', $mysoc->country_code);
702$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
703$profid[
'EMAIL'][1] = $langs->trans(
'Email');
704if (isModEnabled(
'accounting')) {
705 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
706 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
707 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
708 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
709 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
710 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
713$nbofloop = count($profid);
714foreach ($profid as $key => $val) {
715 if ($profid[$key][1] !=
'-') {
716 print
'<tr class="oddeven">';
717 print
'<td>'.$profid[$key][0].
"</td><td>\n";
718 print $profid[$key][1];
721 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
722 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
723 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
725 $verif = !empty($conf->global->$idprof_unique);
726 $mandatory = !empty($conf->global->$idprof_mandatory);
727 $invoice_mandatory = !empty($conf->global->$idprof_invoice_mandatory);
730 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
731 print
img_picto($langs->trans(
"Activated"),
'switch_on');
734 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
735 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
740 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
741 print
img_picto($langs->trans(
"Activated"),
'switch_on');
744 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
745 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
749 if ($invoice_mandatory) {
750 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
751 print
img_picto($langs->trans(
"Activated"),
'switch_on');
754 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
755 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
764print
'<tr class="oddeven">';
765print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
768 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatintraunique&token='.
newToken().
'&value=0">';
769 print
img_picto($langs->trans(
"Activated"),
'switch_on');
772 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatintraunique&token='.
newToken().
'&value=1">';
773 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
776print
'<td colspan="2"></td>';
787$form =
new Form($db);
789print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
790print
'<input type="hidden" name="token" value="'.newToken().
'">';
791print
'<input type="hidden" name="page_y" value="">';
792print
'<input type="hidden" name="action" value="updateoptions">';
794print
'<div class="div-table-responsive-no-min">';
795print
'<table class="noborder centpercent">';
796print
'<tr class="liste_titre">';
797print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
798print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
799print
'<td width="80"> </td></tr>'.
"\n";
803print
'<tr class="oddeven">';
804print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
805if (!$conf->use_javascript_ajax) {
806 print
'<td class="nowrap right" colspan="2">';
807 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
810 print
'<td width="60" class="right">';
811 $arrval = array(
'0' => $langs->trans(
"No"),
812 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
813 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
814 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
816 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
817 print
'</td><td class="right">';
818 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
824print
'<tr class="oddeven">';
825print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
826if (!$conf->use_javascript_ajax) {
827 print
'<td class="nowrap right" colspan="2">';
828 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
831 print
'<td width="60" class="right">';
832 $arrval = array(
'0' => $langs->trans(
"No"),
833 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
834 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
835 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
837 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
838 print
'</td><td class="right">';
839 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
846print
'<tr class="oddeven">';
847print
'<td width="80%">'.$langs->trans(
"AddRefInList").
'</td>';
848print
'<td> </td>';
849print
'<td class="center">';
851 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
852 print
img_picto($langs->trans(
"Activated"),
'switch_on');
854 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
855 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
860print
'<tr class="oddeven">';
861print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
862print
'<td> </td>';
863print
'<td class="center">';
865 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
866 print
img_picto($langs->trans(
"Activated"),
'switch_on');
868 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
869 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
874print
'<tr class="oddeven">';
875print
'<td width="80%">'.$langs->trans(
"AddAdressInList").
'</td>';
876print
'<td> </td>';
877print
'<td class="center">';
879 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
880 print
img_picto($langs->trans(
"Activated"),
'switch_on');
882 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
883 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
888print
'<tr class="oddeven">';
889print
'<td width="80%">'.$langs->trans(
"AddEmailPhoneTownInContactList").
'</td>';
890print
'<td> </td>';
891print
'<td class="center">';
893 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
894 print
img_picto($langs->trans(
"Activated"),
'switch_on');
896 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
897 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
902if (isModEnabled(
"shipping")) {
904 print
'<tr class="oddeven">';
905 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
906 print
'<td> </td>';
907 print
'<td class="center">';
909 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
910 print
img_picto($langs->trans(
"Activated"),
'switch_on');
912 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
913 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
921print
'<tr class="oddeven">';
922print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
923print
'<td> </td>';
924print
'<td class="center">';
926 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
927 print
img_picto($langs->trans(
"Activated"),
'switch_on');
929 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
930 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
937 print
'<tr class="oddeven">';
938 print
'<td>'.$langs->trans(
"DefaultCustomerType").
'</td>';
940 print $formcompany->selectProspectCustomerType(
getDolGlobalString(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
942 print
'<td class="center">';
943 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
949 print
'<tr class="oddeven">';
950 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
951 if (!$conf->use_javascript_ajax) {
952 print
'<td class="nowrap right" colspan="2">';
953 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
956 print
'<td width="60" class="right">';
958 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
960 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
961 print
'</td><td class="right">';
962 print
'<input type="submit" class="button small eposition" name="CONTACTS_DEFAULT_ROLES" 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($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.
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)
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)
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.
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'.
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...
getDolGlobalString($key, $default='')
Return a 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.