Update list.php

This commit is contained in:
UT from dolibit 2023-01-14 17:41:29 +01:00 committed by GitHub
parent fbc74cd571
commit bff128a061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,10 +101,10 @@ $search_type = GETPOST('search_type', 'alpha');
$search_address = GETPOST('search_address', 'alpha'); $search_address = GETPOST('search_address', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha');
$search_town = GETPOST('search_town', 'alpha'); $search_town = GETPOST('search_town', 'alpha');
$search_import_key = GETPOST("search_import_key", "alpha"); $search_import_key = GETPOST("search_import_key", 'alpha');
$search_country = GETPOST("search_country", 'intcomma'); $search_country = GETPOST("search_country", 'intcomma');
$search_roles = GETPOST("search_roles", 'array'); $search_roles = GETPOST("search_roles", 'array');
$search_level = GETPOST("search_level", "array"); $search_level = GETPOST("search_level", 'array');
$search_stcomm = GETPOST('search_stcomm', 'int'); $search_stcomm = GETPOST('search_stcomm', 'int');
if ($search_status === '') { if ($search_status === '') {
@ -350,9 +350,14 @@ $formother = new FormOther($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$contactstatic = new Contact($db); $contactstatic = new Contact($db);
$morejs=array(); $morejs = array();
$morecss = array(); $morecss = array();
// Page Header
$title = $langs->trans("Contacts")." - ".$langs->trans("List");
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas';
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) {
$contactstatic->loadCacheOfProspStatus(); $contactstatic->loadCacheOfProspStatus();
} }
@ -387,6 +392,7 @@ $sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays,
$sql .= " p.import_key,"; $sql .= " p.import_key,";
$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectlevel,"; $sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectlevel,";
$sql .= " co.label as country, co.code as country_code"; $sql .= " co.label as country, co.code as country_code";
// Add fields from extrafields // Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) { if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
@ -396,13 +402,15 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
if (isModEnabled('mailing')) { if (isModEnabled('mailing')) {
$sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed"; $sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed";
} }
// Add fields from hooks
// Add fields from hooks - ListSelect
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
$sqlfields = $sql; // $sql fields to remove for count total $sqlfields = $sql; // $sql fields to remove for count total
// SQL Table Aliase
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)";
@ -413,7 +421,8 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_stcommcontact as st ON st.id = p.fk_stco
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
} }
// Add fields from hooks
// Add fields from hooks - ListFrom
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
@ -443,9 +452,13 @@ if ($search_priv != '0' && $search_priv != '1') {
} }
} }
// Search Categories
// Search Contact Categories
$searchCategoryContactList = $search_categ ? array($search_categ) : array(); $searchCategoryContactList = $search_categ ? array($search_categ) : array();
$searchCategoryContactOperator = 0; $searchCategoryContactOperator = 0;
// Search for tag/category ($searchCategoryContactList is an array of ID) // Search for tag/category ($searchCategoryContactList is an array of ID)
if (!empty($searchCategoryContactList)) { if (!empty($searchCategoryContactList)) {
$searchCategoryContactSqlList = array(); $searchCategoryContactSqlList = array();
$listofcategoryid = ''; $listofcategoryid = '';
@ -473,9 +486,11 @@ if (!empty($searchCategoryContactList)) {
} }
} }
} }
// Search Customer Categories
$searchCategoryCustomerList = $search_categ_thirdparty ? array($search_categ_thirdparty) : array(); $searchCategoryCustomerList = $search_categ_thirdparty ? array($search_categ_thirdparty) : array();
$searchCategoryCustomerOperator = 0; $searchCategoryCustomerOperator = 0;
// Search for tag/category ($searchCategoryCustomerList is an array of ID) // Search for tag/category ($searchCategoryCustomerList is an array of ID)
if (!empty($searchCategoryCustomerList)) { if (!empty($searchCategoryCustomerList)) {
$searchCategoryCustomerSqlList = array(); $searchCategoryCustomerSqlList = array();
$listofcategoryid = ''; $listofcategoryid = '';
@ -503,9 +518,11 @@ if (!empty($searchCategoryCustomerList)) {
} }
} }
} }
// Search Supplier Categories
$searchCategorySupplierList = $search_categ_supplier ? array($search_categ_supplier) : array(); $searchCategorySupplierList = $search_categ_supplier ? array($search_categ_supplier) : array();
$searchCategorySupplierOperator = 0; $searchCategorySupplierOperator = 0;
// Search for tag/category ($searchCategorySupplierList is an array of ID) // Search for tag/category ($searchCategorySupplierList is an array of ID)
if (!empty($searchCategorySupplierList)) { if (!empty($searchCategorySupplierList)) {
$searchCategorySupplierSqlList = array(); $searchCategorySupplierSqlList = array();
$listofcategoryid = ''; $listofcategoryid = '';
@ -600,6 +617,7 @@ if (isModEnabled('socialnetworks')) {
} }
} }
//print $sql; //print $sql;
if (strlen($search_email)) { if (strlen($search_email)) {
$sql .= natural_search('p.email', $search_email); $sql .= natural_search('p.email', $search_email);
} }
@ -627,20 +645,22 @@ if ($search_status != '' && $search_status >= 0) {
if ($search_import_key) { if ($search_import_key) {
$sql .= natural_search("p.import_key", $search_import_key); $sql .= natural_search("p.import_key", $search_import_key);
} }
if ($type == "o") { // filtre sur type if ($type == "o") { // filter on type
$sql .= " AND p.fk_soc IS NULL"; $sql .= " AND p.fk_soc IS NULL";
} elseif ($type == "f") { // filtre sur type } elseif ($type == "f") { // filter on type
$sql .= " AND s.fournisseur = 1"; $sql .= " AND s.fournisseur = 1";
} elseif ($type == "c") { // filtre sur type } elseif ($type == "c") { // filter on type
$sql .= " AND s.client IN (1, 3)"; $sql .= " AND s.client IN (1, 3)";
} elseif ($type == "p") { // filtre sur type } elseif ($type == "p") { // filter on type
$sql .= " AND s.client IN (2, 3)"; $sql .= " AND s.client IN (2, 3)";
} }
if (!empty($socid)) { if (!empty($socid)) {
$sql .= " AND s.rowid = ".((int) $socid); $sql .= " AND s.rowid = ".((int) $socid);
} }
// Add where from extra fields // Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
// Add where from hooks // Add where from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@ -695,8 +715,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && (
exit; exit;
} }
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas';
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
$param = ''; $param = '';
if (!empty($mode)) { if (!empty($mode)) {
@ -948,20 +967,25 @@ if (!empty($arrayfields['p.town']['checked'])) {
print '<input class="flat" type="text" name="search_town" size="5" value="'.dol_escape_htmltag($search_town).'">'; print '<input class="flat" type="text" name="search_town" size="5" value="'.dol_escape_htmltag($search_town).'">';
print '</td>'; print '</td>';
} }
/*
// State // State
/*if (!empty($arrayfields['state.nom']['checked'])) if (!empty($arrayfields['state.nom']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '<input class="flat searchstring" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
print '</td>'; print '</td>';
} }
// Region // Region
if (!empty($arrayfields['region.nom']['checked'])) if (!empty($arrayfields['region.nom']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="4" type="text" name="search_region" value="'.dol_escape_htmltag($search_region).'">'; print '<input class="flat searchstring" size="4" type="text" name="search_region" value="'.dol_escape_htmltag($search_region).'">';
print '</td>'; print '</td>';
}*/ }
*/
// Country // Country
if (!empty($arrayfields['country.code_iso']['checked'])) { if (!empty($arrayfields['country.code_iso']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
@ -1014,7 +1038,7 @@ if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom'][
print '<input class="flat" type="text" name="search_societe" size="8" value="'.dol_escape_htmltag($search_societe).'">'; print '<input class="flat" type="text" name="search_societe" size="8" value="'.dol_escape_htmltag($search_societe).'">';
print '</td>'; print '</td>';
} }
// Alias // Alias of ThirdParty
if (!empty($arrayfields['s.name_alias']['checked'])) { if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth100" type="text" name="search_societe_alias" value="'.dol_escape_htmltag($search_societe_alias).'">'; print '<input class="flat maxwidth100" type="text" name="search_societe_alias" value="'.dol_escape_htmltag($search_societe_alias).'">';
@ -1079,7 +1103,7 @@ if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
} }
print '</tr>'; print '</tr>';
// Ligne des titres // Title line
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
@ -1238,6 +1262,7 @@ while ($i < min($num, $limit)) {
} }
print '</td>'; print '</td>';
} }
// ID // ID
if (!empty($arrayfields['p.rowid']['checked'])) { if (!empty($arrayfields['p.rowid']['checked'])) {
print '<td class="tdoverflowmax50">'; print '<td class="tdoverflowmax50">';
@ -1247,7 +1272,8 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Name
// (Last) Name
if (!empty($arrayfields['p.lastname']['checked'])) { if (!empty($arrayfields['p.lastname']['checked'])) {
print '<td class="middle tdoverflowmax150">'; print '<td class="middle tdoverflowmax150">';
print $contactstatic->getNomUrl(1); print $contactstatic->getNomUrl(1);
@ -1256,6 +1282,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Firstname // Firstname
if (!empty($arrayfields['p.firstname']['checked'])) { if (!empty($arrayfields['p.firstname']['checked'])) {
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">'.dol_escape_htmltag($obj->firstname).'</td>'; print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">'.dol_escape_htmltag($obj->firstname).'</td>';
@ -1263,6 +1290,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Job position // Job position
if (!empty($arrayfields['p.poste']['checked'])) { if (!empty($arrayfields['p.poste']['checked'])) {
print '<td class="tdoverflowmax100">'.dol_escape_htmltag($obj->poste).'</td>'; print '<td class="tdoverflowmax100">'.dol_escape_htmltag($obj->poste).'</td>';
@ -1270,6 +1298,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Address // Address
if (!empty($arrayfields['p.address']['checked'])) { if (!empty($arrayfields['p.address']['checked'])) {
print '<td>'.dol_escape_htmltag($obj->address).'</td>'; print '<td>'.dol_escape_htmltag($obj->address).'</td>';
@ -1277,6 +1306,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Zip // Zip
if (!empty($arrayfields['p.zip']['checked'])) { if (!empty($arrayfields['p.zip']['checked'])) {
print '<td>'.dol_escape_htmltag($obj->zip).'</td>'; print '<td>'.dol_escape_htmltag($obj->zip).'</td>';
@ -1284,6 +1314,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Town // Town
if (!empty($arrayfields['p.town']['checked'])) { if (!empty($arrayfields['p.town']['checked'])) {
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">'.dol_escape_htmltag($obj->town).'</td>'; print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">'.dol_escape_htmltag($obj->town).'</td>';
@ -1291,18 +1322,22 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
/*
// State // State
/*if (!empty($arrayfields['state.nom']['checked'])) if (!empty($arrayfields['state.nom']['checked']))
{ {
print "<td>".$obj->state_name."</td>\n"; print "<td>".$obj->state_name."</td>\n";
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
// Region // Region
if (!empty($arrayfields['region.nom']['checked'])) if (!empty($arrayfields['region.nom']['checked']))
{ {
print "<td>".$obj->region_name."</td>\n"; print "<td>".$obj->region_name."</td>\n";
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
}*/ }*/
// Country // Country
if (!empty($arrayfields['country.code_iso']['checked'])) { if (!empty($arrayfields['country.code_iso']['checked'])) {
print '<td class="center">'; print '<td class="center">';
@ -1313,13 +1348,15 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Phone
// Phone pro
if (!empty($arrayfields['p.phone']['checked'])) { if (!empty($arrayfields['p.phone']['checked'])) {
print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>'; print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Phone perso // Phone perso
if (!empty($arrayfields['p.phone_perso']['checked'])) { if (!empty($arrayfields['p.phone_perso']['checked'])) {
print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>'; print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>';
@ -1327,6 +1364,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Phone mobile // Phone mobile
if (!empty($arrayfields['p.phone_mobile']['checked'])) { if (!empty($arrayfields['p.phone_mobile']['checked'])) {
print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').'</td>'; print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').'</td>';
@ -1334,6 +1372,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Fax // Fax
if (!empty($arrayfields['p.fax']['checked'])) { if (!empty($arrayfields['p.fax']['checked'])) {
print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').'</td>'; print '<td class="nowraponall tdoverflowmax150">'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').'</td>';
@ -1341,6 +1380,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// EMail // EMail
if (!empty($arrayfields['p.email']['checked'])) { if (!empty($arrayfields['p.email']['checked'])) {
print '<td class="nowraponall tdoverflowmax300">'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).'</td>'; print '<td class="nowraponall tdoverflowmax300">'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).'</td>';
@ -1348,7 +1388,8 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// No EMail
// No EMail Subscription
if (!empty($arrayfields['unsubscribed']['checked'])) { if (!empty($arrayfields['unsubscribed']['checked'])) {
print '<td class="center">'; print '<td class="center">';
if (empty($obj->email)) { if (empty($obj->email)) {
@ -1361,6 +1402,8 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Social Networks
if (isModEnabled('socialnetworks')) { if (isModEnabled('socialnetworks')) {
foreach ($socialnetworks as $key => $value) { foreach ($socialnetworks as $key => $value) {
if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) { if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) {
@ -1371,7 +1414,8 @@ while ($i < min($num, $limit)) {
} }
} }
} }
// Company
// Company / Third Party
if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) {
print '<td class="tdoverflowmax200">'; print '<td class="tdoverflowmax200">';
if ($obj->socid) { if ($obj->socid) {
@ -1404,9 +1448,9 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Prospect Level
if (!empty($arrayfields['p.fk_prospectlevel']['checked'])) { if (!empty($arrayfields['p.fk_prospectlevel']['checked'])) {
// Prospect level
print '<td class="center">'; print '<td class="center">';
print $contactstatic->getLibProspLevel(); print $contactstatic->getLibProspLevel();
print "</td>"; print "</td>";
@ -1415,8 +1459,8 @@ while ($i < min($num, $limit)) {
} }
} }
// Prospect status
if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) { if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) {
// Prospect status
print '<td class="center nowrap"><div class="nowrap">'; print '<td class="center nowrap"><div class="nowrap">';
print '<div class="inline-block">'.$contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto); print '<div class="inline-block">'.$contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto);
print '</div> - <div class="inline-block">'; print '</div> - <div class="inline-block">';
@ -1437,6 +1481,7 @@ while ($i < min($num, $limit)) {
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@ -1450,6 +1495,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Date modification // Date modification
if (!empty($arrayfields['p.tms']['checked'])) { if (!empty($arrayfields['p.tms']['checked'])) {
print '<td class="center nowraponall">'; print '<td class="center nowraponall">';
@ -1459,6 +1505,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Status // Status
if (!empty($arrayfields['p.statut']['checked'])) { if (!empty($arrayfields['p.statut']['checked'])) {
print '<td class="center">'.$contactstatic->getLibStatut(5).'</td>'; print '<td class="center">'.$contactstatic->getLibStatut(5).'</td>';
@ -1466,6 +1513,7 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Import key // Import key
if (!empty($arrayfields['p.import_key']['checked'])) { if (!empty($arrayfields['p.import_key']['checked'])) {
print '<td class="tdoverflowmax100">'; print '<td class="tdoverflowmax100">';