32require
'../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
46$langs->loadLangs(array(
"admin",
"accountancy",
"companies",
"other"));
48$action =
GETPOST(
'action',
'aZ09');
49$value =
GETPOST(
'value',
'alpha');
50$modulepart =
GETPOST(
'modulepart',
'aZ09');
66include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
68if ($action ==
'setcodeclient') {
75if ($action ==
'setcodecompta') {
82if ($action ==
'updateoptions') {
83 if (GETPOSTISSET(
'COMPANY_USE_SEARCH_TO_SELECT')) {
84 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
96 if (GETPOSTISSET(
'CONTACT_USE_SEARCH_TO_SELECT')) {
97 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
109 if (GETPOSTISSET(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
110 $customertypedefault =
GETPOSTINT(
'defaultcustomertype');
123 $rolessearch =
GETPOST(
'activate_CONTACTS_DEFAULT_ROLES',
'array:aZ09');
137if ($action ==
'set') {
138 $label =
GETPOST(
'label',
'alpha');
139 $scandir =
GETPOST(
'scan_dir',
'alpha');
150if ($action ==
'del') {
156if ($action ==
'setdoc') {
157 $label =
GETPOST(
'label',
'alpha');
158 $scandir =
GETPOST(
'scan_dir',
'alpha');
179if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
180 $setaccountancycodecustomerinvoicemandatory =
GETPOSTINT(
'value');
181 $res =
dolibarr_set_const(
$db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'',
$conf->entity);
193if ($action ==
"setaddrefinlist") {
207if ($action ==
"setvatinlist") {
221if ($action ==
"setaddadressinlist") {
235if ($action ==
"setaddemailphonetownincontactlist") {
249if ($action ==
"setaskforshippingmet") {
263if ($action ==
"setdisableprospectcustomer") {
264 $setdisableprospectcustomer =
GETPOSTINT(
'value');
265 $res =
dolibarr_set_const(
$db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'',
$conf->entity);
277if ($action ==
'setprofid') {
278 $status =
GETPOST(
'status',
'alpha');
280 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
288if ($action ==
'setprofidmandatory') {
289 $status =
GETPOST(
'status',
'alpha');
291 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
299if ($action ==
'setprofidinvoicemandatory' || $action ==
'setprofidinvoicemandatoryeeconly') {
300 $status =
GETPOST(
'status',
'alpha');
301 if ($status ==
'1' && $action ==
'setprofidinvoicemandatoryeeconly') {
304 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
312if ($action ==
'sethideinactivethirdparty') {
313 $status =
GETPOST(
'status',
'alpha');
320if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
321 $setonsearchandlistgooncustomerorsuppliercard =
GETPOSTINT(
'value');
322 $res =
dolibarr_set_const(
$db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'',
$conf->entity);
342$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
343llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
345$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>';
347print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
352print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
354$dirsociete = array_merge(array(
'/core/modules/societe/'),
$conf->modules_parts[
'societe']);
355foreach (
$conf->modules_parts[
'models'] as $mo) {
356 $dirsociete[] = $mo.
'core/modules/societe/';
363print
'<div class="div-table-responsive-no-min">';
364print
'<table class="noborder centpercent">'.
"\n";
365print
'<tr class="liste_titre">'.
"\n";
366print
' <td>'.$langs->trans(
"Name").
'</td>';
367print
' <td>'.$langs->trans(
"Description").
'</td>';
368print
' <td>'.$langs->trans(
"Example").
'</td>';
369print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
370print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
373$arrayofmodules = array();
375foreach ($dirsociete as $dirroot) {
378 $handle = @opendir($dir);
379 if (is_resource($handle)) {
381 while (($file = readdir($handle)) !==
false) {
382 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
383 $file = substr($file, 0,
dol_strlen($file) - 4);
392 $modCodeTiers =
new $file(
$db);
393 '@phan-var-force ModeleThirdPartyCode $modCodeTiers';
396 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
399 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
403 $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";
420 print
'<td class="center">'.
"\n";
421 print
img_picto($langs->trans(
"Activated"),
'switch_on');
424 $disabled = (
isModEnabled(
'multicompany') && isset($mc) && ((is_object($mc) && !empty($mc->sharings[
'referent'])) && ($mc->sharings[
'referent'] !=
$conf->entity)));
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();
481 '@phan-var-force ModeleAccountancyCode $modCodeTiers';
483 $arrayofmodules[$file] = $modCodeCompta;
491'@phan-var-force array<string,ModeleAccountancyCode> $arrayofmodules';
494foreach ($arrayofmodules as $file => $modCodeCompta) {
495 print
'<tr class="oddeven">';
496 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
497 print $modCodeCompta->info($langs);
499 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
502 print
'<td class="center">';
503 print
img_picto($langs->trans(
"Activated"),
'switch_on');
506 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.newToken().
'&value='.urlencode($file).
'">';
507 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
510 print
'<td class="center">';
511 $s = $modCodeCompta->getToolTip($langs,
null, -1);
512 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);
575 '@phan-var-force ModeleThirdPartyDoc $module';
577 $modulequalified = 1;
578 if (!empty($module->version)) {
579 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
580 $modulequalified = 0;
581 } elseif ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
582 $modulequalified = 0;
586 if ($modulequalified) {
587 print
'<tr class="oddeven"><td width="100">';
590 if (method_exists($module,
'info')) {
591 print $module->info($langs);
593 print $module->description;
598 if (in_array($name, $def)) {
599 print
'<td class="center">'.
"\n";
600 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).
'">';
601 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
606 print
'<td class="center">'.
"\n";
607 print
img_picto(
dol_escape_htmltag($langs->trans(
"ErrorModuleRequirePHPVersion", implode(
'.', $module->phpmin))),
'switch_off',
'class="opacitymedium"');
610 print
'<td class="center">'.
"\n";
611 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>';
617 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
618 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
619 if ($module->type ==
'pdf') {
620 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
622 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
623 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
625 print
'<td class="center nowrap">';
626 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
630 print
'<td class="center nowrap">';
631 if ($module->type ==
'pdf') {
632 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
634 $linkspec =
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
654print
'<div class="div-table-responsive-no-min">';
655print
'<table class="noborder centpercent">';
656print
'<tr class="liste_titre">';
657print
'<td>'.$langs->trans(
"Name").
'</td>';
658print
'<td>'.$langs->trans(
"Description").
'</td>';
659print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
660print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'<br><span class="opacitymedium">'.$langs->trans(
"MustBeMandatory2").
'</span></td>';
661print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
664$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array(),
'EUID' => array());
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');
679$profid[
'EUID'][0] = $langs->trans(
"EUIDShort");
680$profid[
'EUID'][1] = $langs->trans(
'EUID');
682 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
683 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
684 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
685 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
686 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
687 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
690$nbofloop = count($profid);
691foreach ($profid as $key => $val) {
692 if ($profid[$key][1] !=
'-') {
693 print
'<tr class="oddeven">';
694 print
'<td>'.$profid[$key][0].
"</td><td>\n";
695 print $profid[$key][1];
698 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
699 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
700 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
702 $verif = !empty(
$conf->global->$idprof_unique);
703 $mandatory = !empty(
$conf->global->$idprof_mandatory);
704 $invoice_mandatory = !empty(
$conf->global->$idprof_invoice_mandatory);
707 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=0">';
708 print
img_picto($langs->trans(
"Activated"),
'switch_on');
711 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=1">';
712 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
717 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=0">';
718 print
img_picto($langs->trans(
"Activated"),
'switch_on');
721 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=1">';
722 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
726 if ($invoice_mandatory) {
727 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=0">';
728 print
img_picto($langs->trans(
"Activated"),
'switch_on');
731 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=1">';
732 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
741print
'<tr class="oddeven">';
742print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
745 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=0">';
746 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
749 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.newToken().
'&value='.$key.
'&status=1">';
750 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
754 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=0">';
755 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
758 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.newToken().
'&value='.$key.
'&status=1">';
759 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
762print
'<td class="center">';
764 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.newToken().
'&value='.$key.
'&status=0">';
765 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
767 print $langs->trans(
"SaleEEC").
'<br>';
768 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=1">';
769 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
771 print $langs->trans(
"AnySale");
773 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.newToken().
'&value='.$key.
'&status=1">';
774 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
776 print $langs->trans(
"SaleEEC").
'<br>';
777 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=0">';
778 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
780 print $langs->trans(
"AnySale");
782 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.newToken().
'&value='.$key.
'&status=1">';
783 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
785 print $langs->trans(
"SaleEEC").
'<br>';
786 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.newToken().
'&value='.$key.
'&status=1">';
787 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
789 print $langs->trans(
"AnySale");
804print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
805print
'<input type="hidden" name="token" value="'.newToken().
'">';
806print
'<input type="hidden" name="page_y" value="">';
807print
'<input type="hidden" name="action" value="updateoptions">';
809print
'<div class="div-table-responsive-no-min">';
810print
'<table class="noborder centpercent">';
811print
'<tr class="liste_titre">';
812print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
813print
'<td class="right" width="60"></td>'.
"\n";
814print
'<td width="80"> </td></tr>'.
"\n";
818print
'<tr class="oddeven">';
819print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
820if (!
$conf->use_javascript_ajax) {
821 print
'<td class="nowrap right" colspan="2">';
822 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
825 print
'<td width="60" class="right">';
826 $arrval = array(
'0' => $langs->trans(
"No"),
827 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
828 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
829 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
831 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
832 print
'</td><td class="right">';
833 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
839print
'<tr class="oddeven">';
840print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
841if (!
$conf->use_javascript_ajax) {
842 print
'<td class="nowrap right" colspan="2">';
843 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
846 print
'<td width="60" class="right">';
847 $arrval = array(
'0' => $langs->trans(
"No"),
848 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
849 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
850 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
852 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
853 print
'</td><td class="right">';
854 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
860print
'<tr class="oddeven">';
861print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddRefInList"), $langs->trans(
"AddRefInListHelp")).
'</td>';
862print
'<td> </td>';
863print
'<td class="center">';
865 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.newToken().
'&value=0">';
866 print
img_picto($langs->trans(
"Activated"),
'switch_on');
868 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.newToken().
'&value=1">';
869 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
874print
'<tr class="oddeven">';
875print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
876print
'<td> </td>';
877print
'<td class="center">';
879 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.newToken().
'&value=0">';
880 print
img_picto($langs->trans(
"Activated"),
'switch_on');
882 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.newToken().
'&value=1">';
883 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
888print
'<tr class="oddeven">';
889print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddAdressInList"), $langs->trans(
"AddAdressInListHelp")).
'</td>';
890print
'<td> </td>';
891print
'<td class="center">';
893 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.newToken().
'&value=0">';
894 print
img_picto($langs->trans(
"Activated"),
'switch_on');
896 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.newToken().
'&value=1">';
897 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
902print
'<tr class="oddeven">';
903print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddEmailPhoneTownInContactList"), $langs->trans(
"AddEmailPhoneTownInContactListHelp")).
'</td>';
904print
'<td> </td>';
905print
'<td class="center">';
907 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.newToken().
'&value=0">';
908 print
img_picto($langs->trans(
"Activated"),
'switch_on');
910 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.newToken().
'&value=1">';
911 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
918 print
'<tr class="oddeven">';
919 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
920 print
'<td> </td>';
921 print
'<td class="center">';
923 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.newToken().
'&value=0">';
924 print
img_picto($langs->trans(
"Activated"),
'switch_on');
926 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.newToken().
'&value=1">';
927 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
935print
'<tr class="oddeven">';
936print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
937print
'<td> </td>';
938print
'<td class="center">';
940 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.newToken().
'&value=0">';
941 print
img_picto($langs->trans(
"Activated"),
'switch_on');
943 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.newToken().
'&value=1">';
944 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
951 print
'<tr class="oddeven">';
952 print
'<td>'.$langs->trans(
"DefaultCustomerType", $langs->transnoentitiesnoconv(
"MenuNewThirdParty"), $langs->transnoentitiesnoconv(
"MenuNewCustomer")).
'</td>';
954 print $formcompany->selectProspectCustomerType(
getDolGlobalInt(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
956 print
'<td class="center">';
957 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
963 print
'<tr class="oddeven">';
964 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
965 if (!
$conf->use_javascript_ajax) {
966 print
'<td class="nowrap right" colspan="2">';
967 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
970 print
'<td width="60" class="right">';
972 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
974 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
975 print
'</td><td class="right">';
976 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.
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.