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') {
84 $companysearch =
GETPOST(
'activate_COMPANY_USE_SEARCH_TO_SELECT',
'alpha');
90 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
92 setEventMessages($langs->trans(
"Error"),
null,
'errors');
97 $contactsearch =
GETPOST(
'activate_CONTACT_USE_SEARCH_TO_SELECT',
'alpha');
103 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
105 setEventMessages($langs->trans(
"Error"),
null,
'errors');
109 if (
GETPOSTISSET(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
110 $customertypedefault =
GETPOSTINT(
'defaultcustomertype');
111 $res =
dolibarr_set_const($db,
"THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault,
'chaine', 0,
'',
$conf->entity);
116 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
118 setEventMessages($langs->trans(
"Error"),
null,
'errors');
123 $rolessearch =
GETPOST(
'activate_CONTACTS_DEFAULT_ROLES',
'array:aZ09');
124 $res =
dolibarr_set_const($db,
"CONTACTS_DEFAULT_ROLES", implode(
',', $rolessearch),
'chaine', 0,
'',
$conf->entity);
129 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
131 setEventMessages($langs->trans(
"Error"),
null,
'errors');
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);
186 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
188 setEventMessages($langs->trans(
"Error"),
null,
'errors');
193if ($action ==
"setaddrefinlist") {
200 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
202 setEventMessages($langs->trans(
"Error"),
null,
'errors');
207if ($action ==
"setvatinlist") {
214 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
216 setEventMessages($langs->trans(
"Error"),
null,
'errors');
221if ($action ==
"setaddadressinlist") {
228 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
230 setEventMessages($langs->trans(
"Error"),
null,
'errors');
235if ($action ==
"setaddemailphonetownincontactlist") {
237 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'',
$conf->entity);
242 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
244 setEventMessages($langs->trans(
"Error"),
null,
'errors');
249if ($action ==
"setaskforshippingmet") {
251 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'',
$conf->entity);
256 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
258 setEventMessages($langs->trans(
"Error"),
null,
'errors');
263if ($action ==
"setdisableprospectcustomer") {
264 $setdisableprospectcustomer =
GETPOSTINT(
'value');
265 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'',
$conf->entity);
270 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
272 setEventMessages($langs->trans(
"Error"),
null,
'errors');
277if ($action ==
'setprofid') {
278 $status =
GETPOST(
'status',
'alpha');
280 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
283 dol_print_error($db);
288if ($action ==
'setprofidmandatory') {
289 $status =
GETPOST(
'status',
'alpha');
291 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
294 dol_print_error($db);
299if ($action ==
'setprofidinvoicemandatory' || $action ==
'setprofidinvoicemandatoryeeconly') {
300 $status =
GETPOST(
'status',
'alpha');
301 if ($status ==
'1' && $action ==
'setprofidinvoicemandatoryeeconly') {
304 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
307 dol_print_error($db);
312if ($action ==
'sethideinactivethirdparty') {
313 $status =
GETPOST(
'status',
'alpha');
315 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'',
$conf->entity);
317 dol_print_error($db);
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);
327 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
329 setEventMessages($langs->trans(
"Error"),
null,
'errors');
340$form =
new Form($db);
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) {
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) {
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);
525printDocumentModelList(
'company',
'societe',
'COMPANY_ADDON_PDF', $langs->trans(
"ModelModules"), array(
526 'Logo' =>
'option_logo',
527 'WatermarkOnDraft' =>
'option_draft_watermark',
536print
'<div class="div-table-responsive-no-min">';
537print
'<table class="noborder centpercent">';
538print
'<tr class="liste_titre">';
539print
'<td>'.$langs->trans(
"Name").
'</td>';
540print
'<td>'.$langs->trans(
"Description").
'</td>';
541print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
542print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'<br><span class="opacitymedium">'.$langs->trans(
"MustBeMandatory2").
'</span></td>';
543print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
546$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array(),
'EUID' => array());
547$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
548$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1',
$mysoc->country_code);
549$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
550$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2',
$mysoc->country_code);
551$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
552$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3',
$mysoc->country_code);
553$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
554$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4',
$mysoc->country_code);
555$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
556$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5',
$mysoc->country_code);
557$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
558$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6',
$mysoc->country_code);
559$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
560$profid[
'EMAIL'][1] = $langs->trans(
'Email');
561$profid[
'EUID'][0] = $langs->trans(
"EUIDShort");
562$profid[
'EUID'][1] = $langs->trans(
'EUID');
564 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
565 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
566 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
567 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
568 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
569 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
572$nbofloop = count($profid);
573foreach ($profid as $key => $val) {
574 if ($profid[$key][1] !=
'-') {
575 print
'<tr class="oddeven">';
576 print
'<td>'.$profid[$key][0].
"</td><td>\n";
577 print $profid[$key][1];
580 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
581 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
582 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
584 $verif = !empty(
$conf->global->$idprof_unique);
585 $mandatory = !empty(
$conf->global->$idprof_mandatory);
586 $invoice_mandatory = !empty(
$conf->global->$idprof_invoice_mandatory);
589 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
590 print img_picto($langs->trans(
"Activated"),
'switch_on');
593 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
594 print img_picto($langs->trans(
"Disabled"),
'switch_off');
599 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
600 print img_picto($langs->trans(
"Activated"),
'switch_on');
603 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
604 print img_picto($langs->trans(
"Disabled"),
'switch_off');
608 if ($invoice_mandatory) {
609 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
610 print img_picto($langs->trans(
"Activated"),
'switch_on');
613 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
614 print img_picto($langs->trans(
"Disabled"),
'switch_off');
623print
'<tr class="oddeven">';
624print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
627 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
628 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
631 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
632 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
636 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
637 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
640 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
641 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
644print
'<td class="center">';
646 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=0">';
647 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
649 print $langs->trans(
"SaleEEC").
'<br>';
650 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
651 print img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
653 print $langs->trans(
"AnySale");
655 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
656 print img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
658 print $langs->trans(
"SaleEEC").
'<br>';
659 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
660 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
662 print $langs->trans(
"AnySale");
664 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
665 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
667 print $langs->trans(
"SaleEEC").
'<br>';
668 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
669 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
671 print $langs->trans(
"AnySale");
684$form =
new Form($db);
686print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
687print
'<input type="hidden" name="token" value="'.newToken().
'">';
688print
'<input type="hidden" name="page_y" value="">';
689print
'<input type="hidden" name="action" value="updateoptions">';
691print
'<div class="div-table-responsive-no-min">';
692print
'<table class="noborder centpercent">';
693print
'<tr class="liste_titre">';
694print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
695print
'<td class="right" width="60"></td>'.
"\n";
696print
'<td width="80"> </td></tr>'.
"\n";
700print
'<tr class="oddeven">';
701print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
702if (!
$conf->use_javascript_ajax) {
703 print
'<td class="nowrap right" colspan="2">';
704 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
707 print
'<td width="60" class="right">';
709 0 => array(
'label' => $langs->trans(
"No")),
710 1 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 1).
')</span>'),
711 2 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 2).
')</span>'),
712 3 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 3).
')</span>'),
714 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
715 print
'</td><td class="right">';
716 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
722print
'<tr class="oddeven">';
723print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
724if (!
$conf->use_javascript_ajax) {
725 print
'<td class="nowrap right" colspan="2">';
726 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
729 print
'<td width="60" class="right">';
731 0 => array(
'label' => $langs->trans(
"No")),
732 1 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 1).
')</span>'),
733 2 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 2).
')</span>'),
734 3 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 3).
')</span>'),
736 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
737 print
'</td><td class="right">';
738 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
744print
'<tr class="oddeven">';
745print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddRefInList"), $langs->trans(
"AddRefInListHelp")).
'</td>';
746print
'<td> </td>';
747print
'<td class="center">';
749 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
750 print img_picto($langs->trans(
"Activated"),
'switch_on');
752 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
753 print img_picto($langs->trans(
"Disabled"),
'switch_off');
758print
'<tr class="oddeven">';
759print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
760print
'<td> </td>';
761print
'<td class="center">';
763 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
764 print img_picto($langs->trans(
"Activated"),
'switch_on');
766 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
767 print img_picto($langs->trans(
"Disabled"),
'switch_off');
772print
'<tr class="oddeven">';
773print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddAdressInList"), $langs->trans(
"AddAdressInListHelp")).
'</td>';
774print
'<td> </td>';
775print
'<td class="center">';
777 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
778 print img_picto($langs->trans(
"Activated"),
'switch_on');
780 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
781 print img_picto($langs->trans(
"Disabled"),
'switch_off');
786print
'<tr class="oddeven">';
787print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddEmailPhoneTownInContactList"), $langs->trans(
"AddEmailPhoneTownInContactListHelp")).
'</td>';
788print
'<td> </td>';
789print
'<td class="center">';
791 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
792 print img_picto($langs->trans(
"Activated"),
'switch_on');
794 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
795 print img_picto($langs->trans(
"Disabled"),
'switch_off');
802 print
'<tr class="oddeven">';
803 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
804 print
'<td> </td>';
805 print
'<td class="center">';
807 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
808 print img_picto($langs->trans(
"Activated"),
'switch_on');
810 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
811 print img_picto($langs->trans(
"Disabled"),
'switch_off');
819print
'<tr class="oddeven">';
820print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
821print
'<td> </td>';
822print
'<td class="center">';
824 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
825 print img_picto($langs->trans(
"Activated"),
'switch_on');
827 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
828 print img_picto($langs->trans(
"Disabled"),
'switch_off');
835 print
'<tr class="oddeven">';
836 print
'<td>'.$langs->trans(
"DefaultCustomerType", $langs->transnoentitiesnoconv(
"MenuNewThirdParty"), $langs->transnoentitiesnoconv(
"MenuNewCustomer")).
'</td>';
838 print $formcompany->selectProspectCustomerType(
getDolGlobalInt(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
840 print
'<td class="center">';
841 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
847 print
'<tr class="oddeven">';
848 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
849 if (!
$conf->use_javascript_ajax) {
850 print
'<td class="nowrap right" colspan="2">';
851 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
854 print
'<td width="60" class="right">';
856 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
858 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
859 print
'</td><td class="right">';
860 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.
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.
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, $nodefault=0)
Return value of a param into GET or POST supervariable.
dol_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
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_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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.