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');
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');
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 !==
'') {
199 $module =
new $classname(
$db);
200 '@phan-var-force ModeleThirdPartyDoc $module';
203 if ($module->write_file(
$object, $langs) > 0) {
204 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=societe&file=SPECIMEN.pdf");
211 $langs->load(
'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);
232if ($action ==
"setaddrefinlist") {
246if ($action ==
"setvatinlist") {
260if ($action ==
"setaddadressinlist") {
274if ($action ==
"setaddemailphonetownincontactlist") {
288if ($action ==
"setaskforshippingmet") {
302if ($action ==
"setdisableprospectcustomer") {
303 $setdisableprospectcustomer =
GETPOSTINT(
'value');
304 $res =
dolibarr_set_const(
$db,
"SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer,
'yesno', 0,
'',
$conf->entity);
316if ($action ==
'setprofid') {
317 $status =
GETPOST(
'status',
'alpha');
319 $idprof =
"SOCIETE_".$value.
"_UNIQUE";
327if ($action ==
'setprofidmandatory') {
328 $status =
GETPOST(
'status',
'alpha');
330 $idprof =
"SOCIETE_".$value.
"_MANDATORY";
338if ($action ==
'setprofidinvoicemandatory' || $action ==
'setprofidinvoicemandatoryeeconly') {
339 $status =
GETPOST(
'status',
'alpha');
340 if ($status ==
'1' && $action ==
'setprofidinvoicemandatoryeeconly') {
343 $idprof =
"SOCIETE_".$value.
"_INVOICE_MANDATORY";
351if ($action ==
'sethideinactivethirdparty') {
352 $status =
GETPOST(
'status',
'alpha');
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);
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) {
421 if (substr($file, 0, 15) ==
'mod_codeclient_' && substr($file, -3) ==
'php') {
422 $file = substr($file, 0,
dol_strlen($file) - 4);
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) {
510 if (substr($file, 0, 15) ==
'mod_codecompta_' && substr($file, -3) ==
'php') {
511 $file = substr($file, 0,
dol_strlen($file) - 4);
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);
569$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
570$sql .=
" WHERE type = 'company'";
571$sql .=
" AND entity = ".((int)
$conf->entity);
572$resql =
$db->query($sql);
575 $num_rows =
$db->num_rows($resql);
576 while ($i < $num_rows) {
577 $array =
$db->fetch_array($resql);
578 if (is_array($array)) {
579 array_push($def, $array[0]);
587print
'<div class="div-table-responsive-no-min">';
588print
'<table class="noborder centpercent">';
589print
'<tr class="liste_titre">';
590print
'<td width="140">'.$langs->trans(
"Name").
'</td>';
591print
'<td>'.$langs->trans(
"Description").
'</td>';
592print
'<td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
593print
'<td class="center" width="60">'.$langs->trans(
"ShortInfo").
'</td>';
594print
'<td class="center" width="60">'.$langs->trans(
"Preview").
'</td>';
597foreach ($dirsociete as $dirroot) {
600 $handle = @opendir($dir);
601 if (is_resource($handle)) {
602 while (($file = readdir($handle)) !==
false) {
603 if (preg_match(
'/\.modules\.php$/i', $file)) {
604 $name = substr($file, 4,
dol_strlen($file) - 16);
605 $classname = substr($file, 0,
dol_strlen($file) - 12);
613 $module =
new $classname(
$db);
614 '@phan-var-force ModeleThirdPartyDoc $module';
616 $modulequalified = 1;
617 if (!empty($module->version)) {
618 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
619 $modulequalified = 0;
620 } elseif ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
621 $modulequalified = 0;
625 if ($modulequalified) {
626 print
'<tr class="oddeven"><td width="100">';
629 if (method_exists($module,
'info')) {
630 print $module->info($langs);
632 print $module->description;
637 if (in_array($name, $def)) {
638 print
'<td class="center">'.
"\n";
639 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).
'">';
640 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
645 print
'<td class="center">'.
"\n";
646 print
img_picto(
dol_escape_htmltag($langs->trans(
"ErrorModuleRequirePHPVersion", implode(
'.', $module->phpmin))),
'switch_off',
'class="opacitymedium"');
649 print
'<td class="center">'.
"\n";
650 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>';
656 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
657 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
658 if ($module->type ==
'pdf') {
659 $htmltooltip .=
'<br>'.$langs->trans(
"Height").
'/'.$langs->trans(
"Width").
': '.$module->page_hauteur.
'/'.$module->page_largeur;
661 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
662 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraft").
': '.
yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark :
''), 1, 1);
664 print
'<td class="center nowrap">';
665 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
669 print
'<td class="center nowrap">';
670 if ($module->type ==
'pdf') {
671 $linkspec =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&token='.
newToken().
'&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
673 $linkspec =
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
693print
'<div class="div-table-responsive-no-min">';
694print
'<table class="noborder centpercent">';
695print
'<tr class="liste_titre">';
696print
'<td>'.$langs->trans(
"Name").
'</td>';
697print
'<td>'.$langs->trans(
"Description").
'</td>';
698print
'<td class="center">'.$langs->trans(
"MustBeUnique").
'</td>';
699print
'<td class="center">'.$langs->trans(
"MustBeMandatory").
'<br><span class="opacitymedium">'.$langs->trans(
"MustBeMandatory2").
'</span></td>';
700print
'<td class="center">'.$langs->trans(
"MustBeInvoiceMandatory").
'</td>';
703$profid = array(
'IDPROF1' => array(),
'IDPROF2' => array(),
'IDPROF3' => array(),
'IDPROF4' => array(),
'IDPROF5' => array(),
'IDPROF6' => array(),
'EMAIL' => array(),
'EUID' => array());
704$profid[
'IDPROF1'][0] = $langs->trans(
"ProfId1");
705$profid[
'IDPROF1'][1] = $langs->transcountry(
'ProfId1',
$mysoc->country_code);
706$profid[
'IDPROF2'][0] = $langs->trans(
"ProfId2");
707$profid[
'IDPROF2'][1] = $langs->transcountry(
'ProfId2',
$mysoc->country_code);
708$profid[
'IDPROF3'][0] = $langs->trans(
"ProfId3");
709$profid[
'IDPROF3'][1] = $langs->transcountry(
'ProfId3',
$mysoc->country_code);
710$profid[
'IDPROF4'][0] = $langs->trans(
"ProfId4");
711$profid[
'IDPROF4'][1] = $langs->transcountry(
'ProfId4',
$mysoc->country_code);
712$profid[
'IDPROF5'][0] = $langs->trans(
"ProfId5");
713$profid[
'IDPROF5'][1] = $langs->transcountry(
'ProfId5',
$mysoc->country_code);
714$profid[
'IDPROF6'][0] = $langs->trans(
"ProfId6");
715$profid[
'IDPROF6'][1] = $langs->transcountry(
'ProfId6',
$mysoc->country_code);
716$profid[
'EMAIL'][0] = $langs->trans(
"EMail");
717$profid[
'EMAIL'][1] = $langs->trans(
'Email');
718$profid[
'EUID'][0] = $langs->trans(
"EUIDShort");
719$profid[
'EUID'][1] = $langs->trans(
'EUID');
721 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'] = array();
722 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][0] = $langs->trans(
"CustomerAccountancyCodeShort");
723 $profid[
'ACCOUNTANCY_CODE_CUSTOMER'][1] = $langs->trans(
'CustomerAccountancyCodeShort');
724 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'] = array();
725 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][0] = $langs->trans(
"SupplierAccountancyCodeShort");
726 $profid[
'ACCOUNTANCY_CODE_SUPPLIER'][1] = $langs->trans(
'SupplierAccountancyCodeShort');
729$nbofloop = count($profid);
730foreach ($profid as $key => $val) {
731 if ($profid[$key][1] !=
'-') {
732 print
'<tr class="oddeven">';
733 print
'<td>'.$profid[$key][0].
"</td><td>\n";
734 print $profid[$key][1];
737 $idprof_unique =
'SOCIETE_'.$key.
'_UNIQUE';
738 $idprof_mandatory =
'SOCIETE_'.$key.
'_MANDATORY';
739 $idprof_invoice_mandatory =
'SOCIETE_'.$key.
'_INVOICE_MANDATORY';
741 $verif = !empty(
$conf->global->$idprof_unique);
742 $mandatory = !empty(
$conf->global->$idprof_mandatory);
743 $invoice_mandatory = !empty(
$conf->global->$idprof_invoice_mandatory);
746 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
747 print
img_picto($langs->trans(
"Activated"),
'switch_on');
750 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
751 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
756 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
757 print
img_picto($langs->trans(
"Activated"),
'switch_on');
760 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
761 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
765 if ($invoice_mandatory) {
766 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
767 print
img_picto($langs->trans(
"Activated"),
'switch_on');
770 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
771 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
780print
'<tr class="oddeven">';
781print
'<td colspan="2">'.$langs->trans(
'VATIntra').
"</td>\n";
784 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=0">';
785 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
788 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofid&token='.
newToken().
'&value='.$key.
'&status=1">';
789 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
793 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
794 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle"');
797 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidmandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
798 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle"');
801print
'<td class="center">';
803 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=0">';
804 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
806 print $langs->trans(
"SaleEEC").
'<br>';
807 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
808 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
810 print $langs->trans(
"AnySale");
812 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
813 print
img_picto($langs->trans(
"Activated"),
'switch_off',
'class="valignmiddle paddingrightonly"');
815 print $langs->trans(
"SaleEEC").
'<br>';
816 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=0">';
817 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="valignmiddle paddingrightonly"');
819 print $langs->trans(
"AnySale");
821 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatoryeeconly&token='.
newToken().
'&value='.$key.
'&status=1">';
822 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
824 print $langs->trans(
"SaleEEC").
'<br>';
825 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setprofidinvoicemandatory&token='.
newToken().
'&value='.$key.
'&status=1">';
826 print
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="valignmiddle paddingrightonly"');
828 print $langs->trans(
"AnySale");
843print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
844print
'<input type="hidden" name="token" value="'.newToken().
'">';
845print
'<input type="hidden" name="page_y" value="">';
846print
'<input type="hidden" name="action" value="updateoptions">';
848print
'<div class="div-table-responsive-no-min">';
849print
'<table class="noborder centpercent">';
850print
'<tr class="liste_titre">';
851print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
852print
'<td class="right" width="60"></td>'.
"\n";
853print
'<td width="80"> </td></tr>'.
"\n";
857print
'<tr class="oddeven">';
858print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectCompany"), $langs->trans(
'UseSearchToSelectCompanyTooltip'), 1).
' </td>';
859if (!
$conf->use_javascript_ajax) {
860 print
'<td class="nowrap right" colspan="2">';
861 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
864 print
'<td width="60" class="right">';
865 $arrval = array(
'0' => $langs->trans(
"No"),
866 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
867 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
868 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
870 print $form->selectarray(
"activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
871 print
'</td><td class="right">';
872 print
'<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
878print
'<tr class="oddeven">';
879print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"DelaiedFullListToSelectContact"), $langs->trans(
'UseSearchToSelectContactTooltip'), 1).
'</td>';
880if (!
$conf->use_javascript_ajax) {
881 print
'<td class="nowrap right" colspan="2">';
882 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
885 print
'<td width="60" class="right">';
886 $arrval = array(
'0' => $langs->trans(
"No"),
887 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
888 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
889 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
891 print $form->selectarray(
"activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp maxwidth400');
892 print
'</td><td class="right">';
893 print
'<input type="submit" class="button small reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
899print
'<tr class="oddeven">';
900print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddRefInList"), $langs->trans(
"AddRefInListHelp")).
'</td>';
901print
'<td> </td>';
902print
'<td class="center">';
904 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=0">';
905 print
img_picto($langs->trans(
"Activated"),
'switch_on');
907 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddrefinlist&token='.
newToken().
'&value=1">';
908 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
913print
'<tr class="oddeven">';
914print
'<td width="80%">'.$langs->trans(
"AddVatInList").
'</td>';
915print
'<td> </td>';
916print
'<td class="center">';
918 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=0">';
919 print
img_picto($langs->trans(
"Activated"),
'switch_on');
921 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setvatinlist&token='.
newToken().
'&value=1">';
922 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
927print
'<tr class="oddeven">';
928print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddAdressInList"), $langs->trans(
"AddAdressInListHelp")).
'</td>';
929print
'<td> </td>';
930print
'<td class="center">';
932 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=0">';
933 print
img_picto($langs->trans(
"Activated"),
'switch_on');
935 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddadressinlist&token='.
newToken().
'&value=1">';
936 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
941print
'<tr class="oddeven">';
942print
'<td width="80%">'.$form->textwithpicto($langs->trans(
"AddEmailPhoneTownInContactList"), $langs->trans(
"AddEmailPhoneTownInContactListHelp")).
'</td>';
943print
'<td> </td>';
944print
'<td class="center">';
946 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=0">';
947 print
img_picto($langs->trans(
"Activated"),
'switch_on');
949 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaddemailphonetownincontactlist&token='.
newToken().
'&value=1">';
950 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
957 print
'<tr class="oddeven">';
958 print
'<td width="80%">'.$langs->trans(
"AskForPreferredShippingMethod").
'</td>';
959 print
'<td> </td>';
960 print
'<td class="center">';
962 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=0">';
963 print
img_picto($langs->trans(
"Activated"),
'switch_on');
965 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setaskforshippingmet&token='.
newToken().
'&value=1">';
966 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
974print
'<tr class="oddeven">';
975print
'<td width="80%">'.$langs->trans(
"DisableProspectCustomerType").
'</td>';
976print
'<td> </td>';
977print
'<td class="center">';
979 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=0">';
980 print
img_picto($langs->trans(
"Activated"),
'switch_on');
982 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setdisableprospectcustomer&token='.
newToken().
'&value=1">';
983 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
990 print
'<tr class="oddeven">';
991 print
'<td>'.$langs->trans(
"DefaultCustomerType", $langs->transnoentitiesnoconv(
"MenuNewThirdParty"), $langs->transnoentitiesnoconv(
"MenuNewCustomer")).
'</td>';
993 print $formcompany->selectProspectCustomerType(
getDolGlobalInt(
'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'),
'defaultcustomertype',
'defaultcustomertype',
'admin');
995 print
'<td class="center">';
996 print
'<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans(
"Modify").
'">';
1002 print
'<tr class="oddeven">';
1003 print
'<td width="80%">'.$langs->trans(
'ContactsDefaultRoles').
'</td>';
1004 if (!
$conf->use_javascript_ajax) {
1005 print
'<td class="nowrap right" colspan="2">';
1006 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
1009 print
'<td width="60" class="right">';
1011 $contactType = $contact->listeTypeContacts(
'external', 0, 1);
1013 print $form->multiselectarray(
'activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0,
'minwidth75imp');
1014 print
'</td><td class="right">';
1015 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.
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.
Class to manage third parties objects (customers, suppliers, prospects...)
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)
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.
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.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
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.
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.
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_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.