';
+
+print '';
+if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
+if (! empty($arrayfields['s.barcode']['checked'])) print_liste_field_titre($langs->trans("Gencod"), $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder);
+if (! empty($arrayfields['s.code_client']['checked'])) print_liste_field_titre($arrayfields['s.code_client']['label'],$_SERVER["PHP_SELF"],"s.code_client","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['s.code_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['s.code_compta']['checked'])) print_liste_field_titre($arrayfields['s.code_compta']['label'],$_SERVER["PHP_SELF"],"s.code_compta","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['s.code_compta_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_compta_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
+if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
+if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.siren']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$param,'class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.siret']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$param,'class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$param,'class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder);
+print_liste_field_titre(''); // type of customer
+if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
+// Extra fields
+if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
+{
+ foreach($extrafields->attribute_label as $key => $val)
+ {
+ if (! empty($arrayfields["ef.".$key]['checked']))
+ {
+ $align=$extrafields->getAlignFlag($key);
+ print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
+ }
+ }
+}
+// Hook fields
+$parameters=array('arrayfields'=>$arrayfields);
+$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+if (! empty($arrayfields['s.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"s.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
+if (! empty($arrayfields['s.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
+print "
\n";
+
+// Fields title search
+print '';
+if (! empty($arrayfields['s.nom']['checked']))
+{
+ print '| ';
+ if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
+ print '';
+ print ' | ';
+}
+// Barcode
+if (! empty($arrayfields['s.barcode']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Customer code
+if (! empty($arrayfields['s.code_client']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Supplier code
+if (! empty($arrayfields['s.code_fournisseur']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Account Customer code
+if (! empty($arrayfields['s.code_compta']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Account Supplier code
+if (! empty($arrayfields['s.code_compta_fournisseur']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Town
+if (! empty($arrayfields['s.town']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Zip
+if (! empty($arrayfields['s.zip']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// State
+if (! empty($arrayfields['state.nom']['checked']))
+{
+ print '';
+ print '';
+ print ' | ';
+}
+// Country
+if (! empty($arrayfields['country.code_iso']['checked']))
+{
+ print '';
+ print $form->select_country($search_country,'search_country','',0,'maxwidth100');
+ print ' | ';
+}
+// Company type
+if (! empty($arrayfields['typent.code']['checked']))
+{
+ print '';
+ print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
+ print ' | ';
+}
+if (! empty($arrayfields['s.siren']['checked']))
+{
+ // IdProf1
+ print '';
+ print '';
+ print ' | ';
+}
+if (! empty($arrayfields['s.siret']['checked']))
+{
+ // IdProf2
+ print '';
+ print '';
+ print ' | ';
+}
+if (! empty($arrayfields['s.ape']['checked']))
+{
+ // IdProf3
+ print '';
+ print '';
+ print ' | ';
+}
+if (! empty($arrayfields['s.idprof4']['checked']))
+{
+ // IdProf4
+ print '';
+ print '';
+ print ' | ';
+}
+if (! empty($arrayfields['s.idprof5']['checked']))
+{
+ // IdProf5
+ print '';
+ print '';
+ print ' | ';
+}
+if (! empty($arrayfields['s.idprof6']['checked']))
+{
+ // IdProf6
+ print '';
+ print '';
+ print ' | ';
+}
+
+// Type (customer/prospect/supplier)
+print '';
+if ($type != '') print '';
+print ' | ';
+
+if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
+{
+ // Prospect level
+ print '';
+ $options_from = ''; // Generate in $options_from the list of each option sorted
+ foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
+ {
+ $options_from .= '';
+ }
+ array_reverse($tab_level, true); // Reverse the list
+ $options_to = ''; // Generate in $options_to the list of each option sorted in the reversed order
+ foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
+ {
+ $options_to .= '';
+ }
+
+ // Print these two select
+ print $langs->trans("From").' ';
+ print ' ';
+ print $langs->trans("to").' ';
+
+ print ' | ';
+}
+
+if (! empty($arrayfields['s.fk_stcomm']['checked']))
+{
+ // Prospect status
+ print '';
+ $arraystcomm=array();
+ foreach($prospectstatic->cacheprospectstatus as $key => $val)
+ {
+ $arraystcomm[$val['id']]=($langs->trans("StatusProspect".$val['id']) != "StatusProspect".$val['id'] ? $langs->trans("StatusProspect".$val['id']) : $val['label']);
+ }
+ print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2);
+ print ' | ';
+}
+// Extra fields
+if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
+{
+ foreach($extrafields->attribute_label as $key => $val)
+ {
+ if (! empty($arrayfields["ef.".$key]['checked']))
+ {
+ $align=$extrafields->getAlignFlag($key);
+ $typeofextrafield=$extrafields->attribute_type[$key];
+ print '';
+ if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
+ {
+ $crit=$val;
+ $tmpkey=preg_replace('/search_options_/','',$key);
+ $searchclass='';
+ if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
+ if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
+ print '';
+ }
+ print ' | ';
+ }
+ }
+}
+// Fields from hook
+$parameters=array('arrayfields'=>$arrayfields);
+$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+// Date creation
+if (! empty($arrayfields['s.datec']['checked']))
+{
+ print '';
+ print ' | ';
+}
+// Date modification
+if (! empty($arrayfields['s.tms']['checked']))
+{
+ print '';
+ print ' | ';
+}
+// Status
+if (! empty($arrayfields['s.status']['checked']))
+{
+ print '';
+ print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
+ print ' | ';
+}
+// Action column
+print '';
+$searchpitco=$form->showFilterAndCheckAddButtons(0);
+print $searchpitco;
+print ' | ';
+
+print "
\n";
+
+$var=True;
+
+while ($i < min($num, $limit))
+{
+ $obj = $db->fetch_object($resql);
+ $var=!$var;
+
+ $companystatic->id=$obj->rowid;
+ $companystatic->name=$obj->name;
+ $companystatic->canvas=$obj->canvas;
+ $companystatic->client=$obj->client;
+ $companystatic->status=$obj->status;
+ $companystatic->fournisseur=$obj->fournisseur;
+ $companystatic->code_client=$obj->code_client;
+ $companystatic->code_fournisseur=$obj->code_fournisseur;
+ $companystatic->fk_prospectlevel=$obj->fk_prospectlevel;
+ $companystatic->name_alias=$obj->name_alias;
+
+ print "";
+ if (! empty($arrayfields['s.nom']['checked']))
+ {
+ print "| ";
+ print $companystatic->getNomUrl(1,'',100);
+ print " | \n";
+ }
// Barcode
if (! empty($arrayfields['s.barcode']['checked']))
- {
- print '';
- print '';
- print ' | ';
- }
+ {
+ print ''.$obj->barcode.' | ';
+ }
// Customer code
if (! empty($arrayfields['s.code_client']['checked']))
- {
- print '';
- print '';
- print ' | ';
- }
- // Supplier code
+ {
+ print ''.$obj->code_client.' | ';
+ }
+ // Supplier code
if (! empty($arrayfields['s.code_fournisseur']['checked']))
- {
- print '';
- print '';
- print ' | ';
- }
- // Account Customer code
+ {
+ print ''.$obj->code_fournisseur.' | ';
+ }
+ // Account customer code
if (! empty($arrayfields['s.code_compta']['checked']))
- {
- print '';
- print '';
- print ' | ';
- }
- // Account Supplier code
+ {
+ print ''.$obj->code_compta.' | ';
+ }
+ // Account supplier code
if (! empty($arrayfields['s.code_compta_fournisseur']['checked']))
- {
- print '';
- print '';
- print ' | ';
- }
- // Town
+ {
+ print ''.$obj->code_compta_fournisseur.' | ';
+ }
+ // Town
if (! empty($arrayfields['s.town']['checked']))
{
- print '';
- print '';
- print ' | ';
+ print "".$obj->town." | \n";
}
- // Zip
+ // Zip
if (! empty($arrayfields['s.zip']['checked']))
{
- print '';
- print '';
- print ' | ';
- }
- // State
+ print "".$obj->zip." | \n";
+ }
+ // State
if (! empty($arrayfields['state.nom']['checked']))
{
- print '';
- print '';
- print ' | ';
- }
+ print "".$obj->state_name." | \n";
+ }
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
- print '';
- print $form->select_country($search_country,'search_country','',0,'maxwidth100');
- print ' | ';
+ print '';
+ $tmparray=getCountry($obj->fk_pays,'all');
+ print $tmparray['label'];
+ print ' | ';
}
- // Company type
+ // Type ent
if (! empty($arrayfields['typent.code']['checked']))
{
- print '';
- print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
- print ' | ';
+ print '';
+ if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
+ print $typenArray[$obj->typent_code];
+ print ' | ';
+ }
+ if (! empty($arrayfields['s.siren']['checked']))
+ {
+ print "".$obj->idprof1." | \n";
}
- if (! empty($arrayfields['s.siren']['checked']))
- {
- // IdProf1
- print '';
- print '';
- print ' | ';
- }
if (! empty($arrayfields['s.siret']['checked']))
{
- // IdProf2
- print '';
- print '';
- print ' | ';
+ print "".$obj->idprof2." | \n";
}
if (! empty($arrayfields['s.ape']['checked']))
{
- // IdProf3
- print '';
- print '';
- print ' | ';
+ print "".$obj->idprof3." | \n";
}
if (! empty($arrayfields['s.idprof4']['checked']))
{
- // IdProf4
- print '';
- print '';
- print ' | ';
+ print "".$obj->idprof4." | \n";
}
if (! empty($arrayfields['s.idprof5']['checked']))
{
- // IdProf5
- print '';
- print '';
- print ' | ';
+ print "".$obj->idprof5." | \n";
}
if (! empty($arrayfields['s.idprof6']['checked']))
{
- // IdProf6
- print '';
- print '';
- print ' | ';
+ print "".$obj->idprof6." | \n";
}
-
- // Type (customer/prospect/supplier)
- print '';
- if ($type != '') print '';
- print ' | ';
-
+ // Type
+ print '';
+ $s='';
+ if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
+ {
+ $companystatic->name=$langs->trans("Customer");
+ $companystatic->name_alias='';
+ $s.=$companystatic->getNomUrl(0,'customer');
+ }
+ if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
+ {
+ if ($s) $s.=" / ";
+ $companystatic->name=$langs->trans("Prospect");
+ $companystatic->name_alias='';
+ $s.=$companystatic->getNomUrl(0,'prospect');
+ }
+ if (! empty($conf->fournisseur->enabled) && $obj->fournisseur)
+ {
+ if ($s) $s.=" / ";
+ $companystatic->name=$langs->trans("Supplier");
+ $companystatic->name_alias='';
+ $s.=$companystatic->getNomUrl(0,'supplier');
+ }
+ print $s;
+ print ' | ';
if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
{
- // Prospect level
- print '';
- $options_from = ''; // Generate in $options_from the list of each option sorted
- foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
- {
- $options_from .= '';
- }
- array_reverse($tab_level, true); // Reverse the list
- $options_to = ''; // Generate in $options_to the list of each option sorted in the reversed order
- foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
- {
- $options_to .= '';
- }
-
- // Print these two select
- print $langs->trans("From").' ';
- print ' ';
- print $langs->trans("to").' ';
-
- print ' | ';
+ // Prospect level
+ print '';
+ print $companystatic->getLibProspLevel();
+ print " | ";
}
-
if (! empty($arrayfields['s.fk_stcomm']['checked']))
{
- // Prospect status
- print '';
- $arraystcomm=array();
+ // Prospect status
+ print ' | ';
+ print ' '.$companystatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']);
+ print ' - | ';
+ print '';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
@@ -781,267 +998,55 @@ if ($resql)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
- $align=$extrafields->getAlignFlag($key);
- $typeofextrafield=$extrafields->attribute_type[$key];
- print '';
- if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
- {
- $crit=$val;
- $tmpkey=preg_replace('/search_options_/','',$key);
- $searchclass='';
- if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
- if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
- print '';
- }
+ print ' | getAlignFlag($key);
+ if ($align) print ' align="'.$align.'"';
+ print '>';
+ $tmpkey='options_'.$key;
+ print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
print ' | ';
}
}
}
// Fields from hook
- $parameters=array('arrayfields'=>$arrayfields);
- $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
+ $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
+ $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['s.datec']['checked']))
{
- print '';
+ print ' | ';
+ print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
print ' | ';
}
// Date modification
if (! empty($arrayfields['s.tms']['checked']))
{
- print '';
+ print ' | ';
+ print dol_print_date($db->jdate($obj->date_update), 'dayhour');
print ' | ';
}
// Status
if (! empty($arrayfields['s.status']['checked']))
{
- print '';
- print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
- print ' | ';
+ print ''.$companystatic->getLibStatut(3).' | ';
}
// Action column
- print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
- print $searchpitco;
- print ' | ';
-
- print "
\n";
-
- $var=True;
-
- while ($i < min($num, $limit))
- {
- $obj = $db->fetch_object($resql);
- $var=!$var;
-
- $companystatic->id=$obj->rowid;
- $companystatic->name=$obj->name;
- $companystatic->canvas=$obj->canvas;
- $companystatic->client=$obj->client;
- $companystatic->status=$obj->status;
- $companystatic->fournisseur=$obj->fournisseur;
- $companystatic->code_client=$obj->code_client;
- $companystatic->code_fournisseur=$obj->code_fournisseur;
- $companystatic->fk_prospectlevel=$obj->fk_prospectlevel;
- $companystatic->name_alias=$obj->name_alias;
-
- print "";
- if (! empty($arrayfields['s.nom']['checked']))
- {
- print "| ";
- print $companystatic->getNomUrl(1,'',100);
- print " | \n";
- }
- // Barcode
- if (! empty($arrayfields['s.barcode']['checked']))
- {
- print ''.$obj->barcode.' | ';
- }
- // Customer code
- if (! empty($arrayfields['s.code_client']['checked']))
- {
- print ''.$obj->code_client.' | ';
- }
- // Supplier code
- if (! empty($arrayfields['s.code_fournisseur']['checked']))
- {
- print ''.$obj->code_fournisseur.' | ';
- }
- // Account customer code
- if (! empty($arrayfields['s.code_compta']['checked']))
- {
- print ''.$obj->code_compta.' | ';
- }
- // Account supplier code
- if (! empty($arrayfields['s.code_compta_fournisseur']['checked']))
- {
- print ''.$obj->code_compta_fournisseur.' | ';
- }
- // Town
- if (! empty($arrayfields['s.town']['checked']))
- {
- print "".$obj->town." | \n";
- }
- // Zip
- if (! empty($arrayfields['s.zip']['checked']))
- {
- print "".$obj->zip." | \n";
- }
- // State
- if (! empty($arrayfields['state.nom']['checked']))
- {
- print "".$obj->state_name." | \n";
- }
- // Country
- if (! empty($arrayfields['country.code_iso']['checked']))
- {
- print '';
- $tmparray=getCountry($obj->fk_pays,'all');
- print $tmparray['label'];
- print ' | ';
- }
- // Type ent
- if (! empty($arrayfields['typent.code']['checked']))
- {
- print '';
- if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
- print $typenArray[$obj->typent_code];
- print ' | ';
- }
- if (! empty($arrayfields['s.siren']['checked']))
- {
- print "".$obj->idprof1." | \n";
- }
- if (! empty($arrayfields['s.siret']['checked']))
- {
- print "".$obj->idprof2." | \n";
- }
- if (! empty($arrayfields['s.ape']['checked']))
- {
- print "".$obj->idprof3." | \n";
- }
- if (! empty($arrayfields['s.idprof4']['checked']))
- {
- print "".$obj->idprof4." | \n";
- }
- if (! empty($arrayfields['s.idprof5']['checked']))
- {
- print "".$obj->idprof5." | \n";
- }
- if (! empty($arrayfields['s.idprof6']['checked']))
- {
- print "".$obj->idprof6." | \n";
- }
- // Type
- print '';
- $s='';
- if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
- {
- $companystatic->name=$langs->trans("Customer");
- $companystatic->name_alias='';
- $s.=$companystatic->getNomUrl(0,'customer');
- }
- if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
- {
- if ($s) $s.=" / ";
- $companystatic->name=$langs->trans("Prospect");
- $companystatic->name_alias='';
- $s.=$companystatic->getNomUrl(0,'prospect');
- }
- if (! empty($conf->fournisseur->enabled) && $obj->fournisseur)
- {
- if ($s) $s.=" / ";
- $companystatic->name=$langs->trans("Supplier");
- $companystatic->name_alias='';
- $s.=$companystatic->getNomUrl(0,'supplier');
- }
- print $s;
- print ' | ';
- if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
- {
- // Prospect level
- print '';
- print $companystatic->getLibProspLevel();
- print " | ";
- }
- if (! empty($arrayfields['s.fk_stcomm']['checked']))
- {
- // Prospect status
- print '';
- print ' '.$companystatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']);
- print ' - | ';
- }
- // Extra fields
- if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
- {
- foreach($extrafields->attribute_label as $key => $val)
- {
- if (! empty($arrayfields["ef.".$key]['checked']))
- {
- print 'getAlignFlag($key);
- if ($align) print ' align="'.$align.'"';
- print '>';
- $tmpkey='options_'.$key;
- print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
- print ' | ';
- }
- }
- }
- // Fields from hook
- $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
- $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- // Date creation
- if (! empty($arrayfields['s.datec']['checked']))
- {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
- print ' | ';
- }
- // Date modification
- if (! empty($arrayfields['s.tms']['checked']))
- {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour');
- print ' | ';
- }
- // Status
- if (! empty($arrayfields['s.status']['checked']))
- {
- print ''.$companystatic->getLibStatut(3).' | ';
- }
- // Action column
- print ' | ';
-
- print '
'."\n";
- $i++;
- }
-
- $db->free($resql);
-
- $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
- $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
-
- print "
";
-
- print '';
+ print '