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');
178if ($action ==
'specimen') {
179 $modele =
GETPOST(
'module',
'alpha');
187 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
188 foreach ($dirmodels as $reldir) {
189 $file =
dol_buildpath($reldir.
"core/modules/societe/doc/pdf_".$modele.
".modules.php", 0);
190 if (file_exists($file)) {
191 $classname =
"pdf_".$modele;
196 if ($classname !==
'') {
200 '@phan-var-force ModeleThirdPartyDoc $module';
204 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=societe&file=SPECIMEN.pdf");
211 $langs->load(
'errors');
212 setEventMessages($langs->trans(
"ErrorModuleNotFound"),
null,
'errors');
213 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
218if ($action ==
"setaccountancycodecustomerinvoicemandatory") {
219 $setaccountancycodecustomerinvoicemandatory =
GETPOSTINT(
'value');
220 $res =
dolibarr_set_const($db,
"SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_INVOICE_MANDATORY", $setaccountancycodecustomerinvoicemandatory,
'yesno', 0,
'',
$conf->entity);
225 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
227 setEventMessages($langs->trans(
"Error"),
null,
'errors');
232if ($action ==
"setaddrefinlist") {
239 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
241 setEventMessages($langs->trans(
"Error"),
null,
'errors');
246if ($action ==
"setvatinlist") {
253 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
255 setEventMessages($langs->trans(
"Error"),
null,
'errors');
260if ($action ==
"setaddadressinlist") {
267 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
269 setEventMessages($langs->trans(
"Error"),
null,
'errors');
274if ($action ==
"setaddemailphonetownincontactlist") {
276 $res =
dolibarr_set_const($db,
"CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val,
'yesno', 0,
'',
$conf->entity);
281 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
283 setEventMessages($langs->trans(
"Error"),
null,
'errors');
288if ($action ==
"setaskforshippingmet") {
290 $res =
dolibarr_set_const($db,
"SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet,
'yesno', 0,
'',
$conf->entity);
295 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
297 setEventMessages($langs->trans(
"Error"),
null,
'errors');
302if ($action ==
"setdisableprospectcustomer") {
303 $setdisableprospectcustomer =
GETPOSTINT(
'value');
304 $res =
dolibarr_set_const($db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'',
$conf->entity);
309 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
311 setEventMessages($langs->trans(
"Error"),
null,
'errors');
316if ($action ==
'setprofid') {
317 $status =
GETPOST(
'status',
'alpha');
319 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
322 dol_print_error($db);
327if ($action ==
'setprofidmandatory') {
328 $status =
GETPOST(
'status',
'alpha');
330 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
333 dol_print_error($db);
338if ($action ==
'setprofidinvoicemandatory' || $action ==
'setprofidinvoicemandatoryeeconly') {
339 $status =
GETPOST(
'status',
'alpha');
340 if ($status ==
'1' && $action ==
'setprofidinvoicemandatoryeeconly') {
343 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
346 dol_print_error($db);
351if ($action ==
'sethideinactivethirdparty') {
352 $status =
GETPOST(
'status',
'alpha');
354 $result =
dolibarr_set_const($db,
"COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status,
'chaine', 0,
'',
$conf->entity);
356 dol_print_error($db);
359if ($action ==
'setonsearchandlistgooncustomerorsuppliercard') {
360 $setonsearchandlistgooncustomerorsuppliercard =
GETPOSTINT(
'value');
361 $res =
dolibarr_set_const($db,
"SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard,
'yesno', 0,
'',
$conf->entity);
366 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
368 setEventMessages($langs->trans(
"Error"),
null,
'errors');
379$form =
new Form($db);
381$help_url =
'EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers|ES:Configuración_del_módulo_terceros';
382llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
384$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>';
386print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
391print
dol_get_fiche_head($head,
'general', $langs->trans(
"ThirdParties"), -1,
'company');
393$dirsociete = array_merge(array(
'/core/modules/societe/'),
$conf->modules_parts[
'societe']);
394foreach (
$conf->modules_parts[
'models'] as $mo) {
395 $dirsociete[] = $mo.
'core/modules/societe/';
402print
'<div class="div-table-responsive-no-min">';
403print
'<table class="noborder centpercent">'.
"\n";
404print
'<tr class="liste_titre">'.
"\n";
405print
' <td>'.$langs->trans(
"Name").
'</td>';
406print
' <td>'.$langs->trans(
"Description").
'</td>';
407print
' <td>'.$langs->trans(
"Example").
'</td>';
408print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
409print
' <td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
412$arrayofmodules = array();
414foreach ($dirsociete as $dirroot) {
417 $handle = @opendir($dir);
418 if (is_resource($handle)) {
420 while (($file = readdir($handle)) !==
false) {
431 $modCodeTiers =
new $file($db);
432 '@phan-var-force ModeleThirdPartyCode $modCodeTiers';
435 if ($modCodeTiers->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
438 if ($modCodeTiers->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
442 $arrayofmodules[$file] = $modCodeTiers;
452foreach ($arrayofmodules as $file => $modCodeTiers) {
453 print
'<tr class="oddeven">'.
"\n";
454 print
'<td width="140">'.$modCodeTiers->name.
'</td>'.
"\n";
455 print
'<td>'.$modCodeTiers->info($langs).
'</td>'.
"\n";
456 print
'<td class="nowrap">'.$modCodeTiers->getExample($langs).
'</td>'.
"\n";
459 print
'<td class="center">'.
"\n";
460 print img_picto($langs->trans(
"Activated"),
'switch_on');
463 $disabled = (
isModEnabled(
'multicompany') && isset($mc) && ((is_object($mc) && !empty($mc->sharings[
'referent'])) && ($mc->sharings[
'referent'] !=
$conf->entity)));
464 print
'<td class="center">';
466 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeclient&token='.
newToken().
'&value='.urlencode($file).
'">';
468 print img_picto($langs->trans(
"Disabled"),
'switch_off');
475 print
'<td class="center">';
476 $s = $modCodeTiers->getToolTip($langs,
null, -1);
477 print $form->textwithpicto(
'', $s, 1);
492print
'<div class="div-table-responsive-no-min">';
493print
'<table class="noborder centpercent">';
494print
'<tr class="liste_titre">';
495print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
496print
'<td>'.$langs->trans(
"Description").
'</td>';
497print
'<td>'.$langs->trans(
"Example").
'</td>';
498print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
499print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
502$arrayofmodules = array();
504foreach ($dirsociete as $dirroot) {
507 $handle = @opendir($dir);
508 if (is_resource($handle)) {
509 while (($file = readdir($handle)) !==
false) {
519 $modCodeCompta =
new $file();
520 '@phan-var-force ModeleAccountancyCode $modCodeTiers';
522 $arrayofmodules[$file] = $modCodeCompta;
530'@phan-var-force array<string,ModeleAccountancyCode> $arrayofmodules';
533foreach ($arrayofmodules as $file => $modCodeCompta) {
534 print
'<tr class="oddeven">';
535 print
'<td>'.$modCodeCompta->name.
"</td><td>\n";
536 print $modCodeCompta->info($langs);
538 print
'<td class="nowrap">'.$modCodeCompta->getExample($langs).
"</td>\n";
541 print
'<td class="center">';
542 print img_picto($langs->trans(
"Activated"),
'switch_on');
545 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodecompta&token='.
newToken().
'&value='.urlencode($file).
'">';
546 print img_picto($langs->trans(
"Disabled"),
'switch_off');
549 print
'<td class="center">';
550 $s = $modCodeCompta->getToolTip($langs,
null, -1);
551 print $form->textwithpicto(
'', $s, 1);
564printDocumentModelList(
'company',
'societe',
'COMPANY_ADDON_PDF', $langs->trans(
"ModelModules"), array(
565 'Logo' =>
'option_logo',
566 'WatermarkOnDraft' =>
'option_draft_watermark',
575print
'<div class="div-table-responsive-no-min">';
576print
'<table class="noborder centpercent">';
577print
'<tr class="liste_titre">';
578print
'<td>'.$langs->trans(
"Name").
'</td>';
579print
'<td>'.$langs->trans(
"Description").
'</td>';
580print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
581print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'<br><span class="opacitymedium">'.$langs->trans(
"MustBeMandatory2").
'</span></td>';
582print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
585$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array(),
'EUID' => array());
586$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
587$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1',
$mysoc->country_code);
588$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
589$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2',
$mysoc->country_code);
590$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
591$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3',
$mysoc->country_code);
592$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
593$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4',
$mysoc->country_code);
594$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
595$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5',
$mysoc->country_code);
596$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
597$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6',
$mysoc->country_code);
598$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
599$profid[
'EMAIL'][1] = $langs->trans(
'Email');
600$profid[
'EUID'][0] = $langs->trans(
"EUIDShort");
601$profid[
'EUID'][1] = $langs->trans(
'EUID');
603 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
604 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
605 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
606 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
607 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
608 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
611$nbofloop = count($profid);
612foreach ($profid as $key => $val) {
613 if ($profid[$key][1] !=
'-') {
614 print
'<tr class="oddeven">';
615 print
'<td>'.$profid[$key][0].
"</td><td>\n";
616 print $profid[$key][1];
619 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
620 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
621 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
623 $verif = !empty(
$conf->global->$idprof_unique);
624 $mandatory = !empty(
$conf->global->$idprof_mandatory);
625 $invoice_mandatory = !empty(
$conf->global->$idprof_invoice_mandatory);
628 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
629 print img_picto($langs->trans(
"Activated"),
'switch_on');
632 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
633 print img_picto($langs->trans(
"Disabled"),
'switch_off');
638 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
639 print img_picto($langs->trans(
"Activated"),
'switch_on');
642 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
643 print img_picto($langs->trans(
"Disabled"),
'switch_off');
647 if ($invoice_mandatory) {
648 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
649 print img_picto($langs->trans(
"Activated"),
'switch_on');
652 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
653 print img_picto($langs->trans(
"Disabled"),
'switch_off');
662print
'<tr class="oddeven">';
663print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
666 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
667 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
670 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
671 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
675 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
676 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
679 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
680 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
683print
'<td class="center">';
685 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=0">';
686 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
688 print $langs->trans(
"SaleEEC").
'<br>';
689 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
690 print img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
692 print $langs->trans(
"AnySale");
694 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
695 print img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
697 print $langs->trans(
"SaleEEC").
'<br>';
698 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
699 print img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
701 print $langs->trans(
"AnySale");
703 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
704 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
706 print $langs->trans(
"SaleEEC").
'<br>';
707 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
708 print img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
710 print $langs->trans(
"AnySale");
723$form =
new Form($db);
725print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
726print
'<input type="hidden" name="token" value="'.newToken().
'">';
727print
'<input type="hidden" name="page_y" value="">';
728print
'<input type="hidden" name="action" value="updateoptions">';
730print
'<div class="div-table-responsive-no-min">';
731print
'<table class="noborder centpercent">';
732print
'<tr class="liste_titre">';
733print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
734print
'<td class="right" width="60"></td>'.
"\n";
735print
'<td width="80"> </td></tr>'.
"\n";
739print
'<tr class="oddeven">';
740print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
741if (!
$conf->use_javascript_ajax) {
742 print
'<td class="nowrap right" colspan="2">';
743 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
746 print
'<td width="60" class="right">';
748 0 => array(
'label' => $langs->trans(
"No")),
749 1 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 1).
')</span>'),
750 2 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 2).
')</span>'),
751 3 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 3).
')</span>'),
753 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
754 print
'</td><td class="right">';
755 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
761print
'<tr class="oddeven">';
762print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
763if (!
$conf->use_javascript_ajax) {
764 print
'<td class="nowrap right" colspan="2">';
765 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
768 print
'<td width="60" class="right">';
770 0 => array(
'label' => $langs->trans(
"No")),
771 1 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 1).
')</span>'),
772 2 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 2).
')</span>'),
773 3 => array(
'label' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
'labelhtml' => $langs->trans(
"Yes").
' <span class="opacitymedium small">('.$langs->trans(
"NumberOfKeyToSearch", 3).
')</span>'),
775 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
776 print
'</td><td class="right">';
777 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
783print
'<tr class="oddeven">';
784print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddRefInList"), $langs->trans(
"AddRefInListHelp")).
'</td>';
785print
'<td> </td>';
786print
'<td class="center">';
788 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
789 print img_picto($langs->trans(
"Activated"),
'switch_on');
791 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
792 print img_picto($langs->trans(
"Disabled"),
'switch_off');
797print
'<tr class="oddeven">';
798print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
799print
'<td> </td>';
800print
'<td class="center">';
802 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
803 print img_picto($langs->trans(
"Activated"),
'switch_on');
805 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
806 print img_picto($langs->trans(
"Disabled"),
'switch_off');
811print
'<tr class="oddeven">';
812print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddAdressInList"), $langs->trans(
"AddAdressInListHelp")).
'</td>';
813print
'<td> </td>';
814print
'<td class="center">';
816 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
817 print img_picto($langs->trans(
"Activated"),
'switch_on');
819 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
820 print img_picto($langs->trans(
"Disabled"),
'switch_off');
825print
'<tr class="oddeven">';
826print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddEmailPhoneTownInContactList"), $langs->trans(
"AddEmailPhoneTownInContactListHelp")).
'</td>';
827print
'<td> </td>';
828print
'<td class="center">';
830 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
831 print img_picto($langs->trans(
"Activated"),
'switch_on');
833 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
834 print img_picto($langs->trans(
"Disabled"),
'switch_off');
841 print
'<tr class="oddeven">';
842 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
843 print
'<td> </td>';
844 print
'<td class="center">';
846 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
847 print img_picto($langs->trans(
"Activated"),
'switch_on');
849 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
850 print img_picto($langs->trans(
"Disabled"),
'switch_off');
858print
'<tr class="oddeven">';
859print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
860print
'<td> </td>';
861print
'<td class="center">';
863 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
864 print img_picto($langs->trans(
"Activated"),
'switch_on');
866 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
867 print img_picto($langs->trans(
"Disabled"),
'switch_off');
874 print
'<tr class="oddeven">';
875 print
'<td>'.$langs->trans(
"DefaultCustomerType", $langs->transnoentitiesnoconv(
"MenuNewThirdParty"), $langs->transnoentitiesnoconv(
"MenuNewCustomer")).
'</td>';
877 print $formcompany->selectProspectCustomerType(
getDolGlobalInt(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
879 print
'<td class="center">';
880 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
886 print
'<tr class="oddeven">';
887 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
888 if (!
$conf->use_javascript_ajax) {
889 print
'<td class="nowrap right" colspan="2">';
890 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
893 print
'<td width="60" class="right">';
895 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
897 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
898 print
'</td><td class="right">';
899 print
'<input type="submit" class="button small eposition" name="CONTACTS_DEFAULT_ROLES" value="'.$langs->trans(
"Modify").
'">';
if(! $sortfield) if(! $sortorder) $object
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.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to manage third parties objects (customers, suppliers, prospects...)
if(! $sortfield) if(! $sortorder) $module
societe_admin_prepare_head()
Return array head with list of tabs to view object information.
dol_strlen($string, $stringencoding='UTF-8', $binarycount=0)
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.