diff --git a/ChangeLog b/ChangeLog index a0f4aa3ddb3..bf8b488ff39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 2.9 compared to 2.8 ***** For users: +- New: Can filter third parties lists on categories. - New: Can build documents for third parties (Use ODT templates, need PHP 5.2+). - New: Support products property length and area. - New: Add "payment due before" field in invoice exports diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 63619ebfc35..038c2f9cd3e 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -529,8 +529,8 @@ class Categorie * label = nom de la categorie * fulllabel = nom avec chemin complet de la categorie * fullpath = chemin complet compose des id - * \param type Type de categories (0=produit, 1=fournisseur, 2=client) - * \return array Tableau de array + * \param type Type of categories (0=product, 1=suppliers, 2=customers, 3=members) + * \return array Array of categories */ function get_full_arbo($type) { diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index 9cd7c8acca9..0ea19674eb7 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ */ require("./pre.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php"); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; @@ -46,29 +47,53 @@ $search_nom=isset($_GET["search_nom"])?$_GET["search_nom"]:$_POST["search_nom"]; $search_ville=isset($_GET["search_ville"])?$_GET["search_ville"]:$_POST["search_ville"]; $search_code=isset($_GET["search_code"])?$_GET["search_code"]:$_POST["search_code"]; +// Load sale and categ filters +$search_sale = isset($_GET["search_sale"])?$_GET["search_sale"]:$_POST["search_sale"]; +$search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["search_categ"]; + /* * view */ +$htmlother=new FormOther($db); + llxHeader(); $sql = "SELECT s.rowid, s.nom, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client"; -$sql.= ", ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea"; +$sql.= ",s.datec, s.datea"; +// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) +if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; +// We'll need these fields in order to filter by categ +if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_societe"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +// We'll need this table joined to the select in order to filter by sale +if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +// We'll need this table joined to the select in order to filter by categ +if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.client IN (1, 3)"; $sql.= " AND s.entity = ".$conf->entity; if (!$user->rights->societe->client->voir) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; +if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale +if ($search_categ) $sql.= " AND s.rowid = cs.fk_societe"; // Join for the needed table to filter by categ if ($search_nom) $sql.= " AND s.nom like '%".addslashes(strtolower($search_nom))."%'"; if ($search_ville) $sql.= " AND s.ville like '%".addslashes(strtolower($search_ville))."%'"; if ($search_code) $sql.= " AND s.code_client like '%".addslashes(strtolower($search_code))."%'"; - +// Insert sale filter +if ($search_sale) +{ + $sql .= " AND sc.fk_user = ".$search_sale; +} +// Insert categ filter +if ($search_categ) +{ + $sql .= " AND cs.fk_categorie = ".$search_categ; +} if ($socname) { $sql.= " AND s.nom like '%".addslashes(strtolower($socname))."%'"; @@ -93,6 +118,8 @@ if ($result) $num = $db->num_rows($result); $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville; + if ($search_categ != '') $param.='&search_categ='.$search_categ; + if ($search_sale != '') $param.='&search_sale='.$search_sale; print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); @@ -100,6 +127,29 @@ if ($result) print '
'."\n"; print ''."\n"; + + // Filter on categories + $moreforfilter=''; + if ($conf->categorie->enabled) + { + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$htmlother->select_categories(2,$search_categ,'search_categ'); + $moreforfilter.='       '; + } + // If the user can view prospects other than his' + if ($user->rights->societe->client->voir || $socid) + { + $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; + $moreforfilter.=$htmlother->select_salesrepresentatives($search_sale,'search_sale'); + } + if ($moreforfilter) + { + print ''; + print ''; + } + print ''; print_liste_field_titre($langs->trans("Company"),"clients.php","s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville","",$param,"",$sortfield,$sortorder); @@ -132,7 +182,7 @@ if ($result) print ' '.stripslashes($obj->nom).''; print ''; print ''; - print ''; + print ''; print "\n"; $i++; } diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index 0163661f4df..ea335c7e3a8 100644 --- a/htdocs/comm/prospect/prospects.php +++ b/htdocs/comm/prospect/prospects.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -21,12 +21,13 @@ /** * \file htdocs/comm/prospect/prospects.php * \ingroup prospect - * \brief Page de la liste des prospects + * \brief Page to list prospects * \version $Id$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/prospect.class.php"); +require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php"); $langs->load("propal"); $langs->load("companies"); @@ -102,6 +103,7 @@ $sql = "SELECT code, label, sortorder, ".$sortwhere; $sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $sql.= " WHERE active > 0"; $sql.= " ORDER BY sortorder"; + $resql = $db->query($sql); if ($resql) { @@ -156,7 +158,9 @@ if ($_GET["action"] == 'cstc') * View */ -$sql = "SELECT s.rowid, s.nom, s.ville, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea,"; +$htmlother=new FormOther($db); + +$sql = "SELECT s.rowid, s.nom, s.ville, s.datec, s.datea,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; // Updated by Matelli (see http://matelli.fr/showcases/patchs-dolibarr/enhance-prospect-searching.html) @@ -166,7 +170,7 @@ if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_societe"; $sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We'll need this table joined to the select in order to filter by categ if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -175,10 +179,8 @@ $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.client in (2, 3)"; $sql.= " AND s.entity = ".$conf->entity; if ($user->societe_id) $sql.= " AND s.rowid = " .$user->societe_id; -// Join for the needed table to filter by sale -if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; -// Join for the needed table to filter by categ -if ($search_categ) $sql.= " AND s.rowid = cs.fk_societe"; +if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale +if ($search_categ) $sql.= " AND s.rowid = cs.fk_societe"; // Join for the needed table to filter by categ if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm; if ($_GET["search_nom"]) $sql .= " AND s.nom like '%".addslashes(strtolower($_GET["search_nom"]))."%'"; @@ -188,20 +190,19 @@ if ($search_levels) { $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')'; } -// Insert salee filter +// Insert sale filter if ($search_sale) { - $sql .= " AND sc.fk_user = ".$search_sale; + $sql .= " AND sc.fk_user = ".addslashes($search_sale); } // Insert categ filter if ($search_categ) { - $sql .= " AND cs.fk_categorie = ".$search_categ; + $sql .= " AND cs.fk_categorie = ".addslashes($search_categ); } - if ($socname) { - $sql .= " AND s.nom like '%".addslashes(strtolower($socname))."%'"; + $sql .= " AND s.nom like '%".addslashes($socname)."%'"; $sortfield = "s.nom"; $sortorder = "ASC"; } @@ -214,8 +215,8 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $nbtotalofrecords = $db->num_rows($result); } -$sql .= " ORDER BY $sortfield $sortorder, s.nom ASC"; -$sql .= $db->plimit($conf->liste_limit+1, $offset); +$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC"; +$sql.= $db->plimit($conf->liste_limit+1, $offset); $resql = $db->query($sql); if ($resql) @@ -246,25 +247,10 @@ if ($resql) $param.='&search_cstc['.((int) $key).']=false'; } } - // Store the potentiels filters in the URL - if ($search_level_from != '') - { - $param.='&search_level_from='.$search_level_from; - } - if ($search_level_to != '') - { - $param.='&search_level_to='.$search_level_to; - } - // Store the categ filter in the URL - if ($search_categ != '') - { - $param.='&search_categ='.$search_categ; - } - // Store the sale filter in the URL - if ($search_sale != '') - { - $param.='&search_sale='.$search_sale; - } + if ($search_level_from != '') $param.='&search_level_from='.$search_level_from; + if ($search_level_to != '') $param.='&search_level_to='.$search_level_to; + if ($search_categ != '') $param.='&search_categ='.$search_categ; + if ($search_sale != '') $param.='&search_sale='.$search_sale; // $param and $urladd should have the same value $urladd = $param; @@ -274,73 +260,30 @@ if ($resql) // Print the search-by-sale and search-by-categ filters print ''; - $moreforfilter=''; + print '
'; + print $moreforfilter; + print '
'.$obj->ville.''.$obj->code_client.''.dol_print_date($obj->datec).''.dol_print_date($db->jdate($obj->datec)).'
'; + // Filter on categories + $moreforfilter=''; + if ($conf->categorie->enabled) + { + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$htmlother->select_categories(2,$search_categ,'search_categ'); + $moreforfilter.='       '; + } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { - // Select each sales and print them in a select input - $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; - $moreforfilter.='       '; + $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; + $moreforfilter.=$htmlother->select_salesrepresentatives($search_sale,'search_sale'); } - - // Include Categorie class - if ($conf->categorie->enabled) + if ($moreforfilter) { - require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); - - // Load list of "categories" - $static_categs = new Categorie($db); - $tab_categs = $static_categs->get_full_arbo(2); - - // Print a select with each of them - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.='
'; + print ''; + print ''; } - print '
'; + print $moreforfilter; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),"prospects.php","s.nom","",$param,"valign=\"center\"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),"prospects.php","s.ville","",$param,"",$sortfield,$sortorder); @@ -404,12 +347,6 @@ if ($resql) print "\n"; - print ''; - print ''; - - $i = 0; $var=true; @@ -431,7 +368,7 @@ if ($resql) print ""; print ""; // Creation date - print ""; + print ""; // Level print ""; + print '\n"; + print "\n"; + print ''; + print ''; + print ''; + print "\n"; + print "\n"; + $i++; + } + print "
'; - print $moreforfilter; - print '
".$obj->ville." $obj->departement".dol_print_date($obj->datec)."".dol_print_date($db->jdate($obj->datec)).""; print $prospectstatic->LibLevel($obj->fk_prospectlevel); diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index bf2be885f83..a9b2a080ab7 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ */ require("./pre.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php"); $langs->load("suppliers"); $langs->load("orders"); @@ -54,39 +55,45 @@ $pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="nom"; +// Load categ filters +$search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["search_categ"]; + /* -* View -*/ + * View + */ + +$htmlother=new FormOther($db); llxHeader(); -/* - * Mode Liste - * - */ $sql = "SELECT s.rowid as socid, s.nom, s.ville,".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm"; $sql.= " , code_fournisseur, code_compta_fournisseur"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st"; -if ($_GET["cat"]) $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cf"; +if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cf"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur=1"; -if ($_GET["cat"]) $sql .= " AND cf.fk_societe = s.rowid AND cf.fk_categorie='".$_GET["cat"]."'"; +if ($search_categ) $sql.= " AND s.rowid = cf.fk_societe"; // Join for the needed table to filter by categ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql .= " AND s.rowid = ".$socid; if ($socname) { - $sql .= " AND lower(s.nom) like '%".strtolower($socname)."%'"; - $sortfield = "lower(s.nom)"; - $sortorder = "ASC"; + $sql .= " AND s.nom like '%".addslashes($socname)."%'"; + $sortfield = "s.nom"; + $sortorder = "ASC"; } if ($search_nom) { - $sql .= " AND s.nom LIKE '%".$search_nom."%'"; + $sql .= " AND s.nom LIKE '%".addslashes($search_nom)."%'"; } if ($search_ville) { - $sql .= " AND s.ville LIKE '%".$search_ville."%'"; + $sql .= " AND s.ville LIKE '%".addslashes($search_ville)."%'"; +} +// Insert categ filter +if ($search_categ) +{ + $sql .= " AND cf.fk_categorie = ".addslashes($search_categ); } // Count total nb of records @@ -97,73 +104,91 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $nbtotalofrecords = $db->num_rows($result); } -$sql.= " ORDER BY $sortfield $sortorder "; +$sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); $resql = $db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; + $num = $db->num_rows($resql); + $i = 0; - $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville; - - print_barre_liste($langs->trans("ListOfSuppliers"), $page, "liste.php", $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); + $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville; + if ($search_categ != '') $param.='&search_categ='.$search_categ; - print ''; - print ''; - print ''; - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,'valign="middle"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="center"',$sortfield,$sortorder); - print ''; - print "\n"; + print_barre_liste($langs->trans("ListOfSuppliers"), $page, "liste.php", $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); - print ''; + print ''; + print '
 
'; - print ''; - print ''; + // Filter on categories + $moreforfilter=''; + if ($conf->categorie->enabled) + { + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$htmlother->select_categories(1,$search_categ,'search_categ'); + $moreforfilter.='       '; + } + if ($moreforfilter) + { + print ''; + print ''; + } - print ''; + print ''; + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,'valign="middle"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="center"',$sortfield,$sortorder); + print ''; + print "\n"; - print ''; + print ''; + + print ''; + print ''; + + print ''; + + print ''; - print ''; + print ''; - print ''; + print ''; - $var=True; + $var=True; - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($resql); - $var=!$var; + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object($resql); + $var=!$var; - print ""; - print '\n"; - print "\n"; - print ''; - print ''; - print ''; - print "\n"; - print "\n"; - $i++; - } - print "
'; + print $moreforfilter; + print '
'; - print ''; - print '
 
'; - print ''; - print '
'; + print ''; + print ''; + print ''; + print '
'.img_object($langs->trans("ShowSupplier"),"company").''; - print " socid."\">".$obj->nom."".$obj->ville."'.$obj->code_fournisseur.' '.$obj->code_compta_fournisseur.' '.dol_print_date($obj->datec).' 
\n"; - print "\n"; - $db->free($resql); + print "
'.img_object($langs->trans("ShowSupplier"),"company").''; + print " socid."\">".$obj->nom."".$obj->ville."'.$obj->code_fournisseur.' '.$obj->code_compta_fournisseur.' '.dol_print_date($obj->datec).' 
\n"; + print "\n"; + $db->free($resql); } -else +else { - dol_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/html.formother.class.php b/htdocs/html.formother.class.php index 341f6626ec4..9473199a374 100644 --- a/htdocs/html.formother.class.php +++ b/htdocs/html.formother.class.php @@ -232,6 +232,85 @@ class FormOther return $return; } + /** + * \brief Return select list for categories (to use in form search selectors) + * \param type Type of categories (0=product, 1=suppliers, 2=customers, 3=members) + * \param selected Preselected value + * \param htmlname Name of combo list + * \return return Html combo list code + */ + function select_categories($type,$selected=0,$htmlname='search_categ') + { + global $langs; + require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); + + // Load list of "categories" + $static_categs = new Categorie($this->db); + $tab_categs = $static_categs->get_full_arbo($type); + + // Print a select with each of them + $moreforfilter =''; + + return $moreforfilter; + } + + + /** + * \brief Return select list for categories (to use in form search selectors) + * \param selected Preselected value + * \param htmlname Name of combo list + * \return return Html combo list code + */ + function select_salesrepresentatives($selected=0,$htmlname='search_sale') + { + global $conf; + + // Select each sales and print them in a select input + $moreforfilter =''; + + return $moreforfilter; + } + /** * \brief Retourn list of project and tasks * \param selected Pre-selected value diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 6f86be698a3..2cfe1803085 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -245,7 +245,7 @@ if ($resql) print ""; print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label",$param,"","",$sortfield,$sortorder); - if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"),"liste.php", "p.barcode",$param,"",'align="right"',$sortfield,$sortorder); + if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"),"liste.php", "p.barcode",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateModification"),"liste.php", "p.tms",$param,"",'align="center"',$sortfield,$sortorder); if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"),"liste.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price",$param,"",'align="right"',$sortfield,$sortorder); @@ -263,7 +263,7 @@ if ($resql) print ''; if ($conf->barcode->enabled) { - print ''; + print ''; print ''; print ''; }