diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index fb50283991b..e66b5eaa273 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"; $langs->loadLangs(array('products', 'contracts', 'companies')); $optioncss = GETPOST('optioncss', 'aZ09'); +$mode = GETPOST("mode"); $massaction = GETPOST('massaction', 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -55,11 +56,10 @@ if (!$sortorder) { $sortorder = "ASC"; } -$mode = GETPOST("mode"); $filter = GETPOST("filter"); $search_name = GETPOST("search_name", 'alpha'); $search_subprice = GETPOST("search_subprice", 'alpha'); -$search_qty = GETPOST("search_name", 'alpha'); +$search_qty = GETPOST("search_qty", 'alpha'); $search_total_ht = GETPOST("search_total_ht", 'alpha'); $search_total_tva = GETPOST("search_total_tva", 'alpha'); $search_total_ttc = GETPOST("search_total_ttc", 'alpha'); @@ -144,10 +144,10 @@ $arrayfields = array( 'cd.qty'=>array('label'=>"Qty", 'checked'=>1, 'position'=>108), 'cd.total_ht'=>array('label'=>"TotalHT", 'checked'=>-1, 'position'=>109, 'isameasure'=>1), 'cd.total_tva'=>array('label'=>"TotalVAT", 'checked'=>-1, 'position'=>110), - 'cd.date_ouverture_prevue'=>array('label'=>"DateStartPlannedShort", 'checked'=>(($mode == "" || $mode == -1) || $mode == "0"), 'position'=>150), - 'cd.date_ouverture'=>array('label'=>"DateStartRealShort", 'checked'=>(($mode == "" || $mode == -1) || $mode > 0), 'position'=>160), - 'cd.date_fin_validite'=>array('label'=>"DateEndPlannedShort", 'checked'=>(($mode == "" || $mode == -1) || $mode < 5), 'position'=>170), - 'cd.date_cloture'=>array('label'=>"DateEndRealShort", 'checked'=>(($mode == "" || $mode == -1) || $mode >= 5), 'position'=>180), + 'cd.date_ouverture_prevue'=>array('label'=>"DateStartPlannedShort", 'checked'=>1, 'position'=>150), + 'cd.date_ouverture'=>array('label'=>"DateStartRealShort", 'checked'=>1, 'position'=>160), + 'cd.date_fin_validite'=>array('label'=>"DateEndPlannedShort", 'checked'=>1, 'position'=>170), + 'cd.date_cloture'=>array('label'=>"DateEndRealShort", 'checked'=>1, 'position'=>180), //'cd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'cd.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), 'status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) @@ -294,7 +294,7 @@ if ($search_subprice) { $sql .= natural_search("cd.subprice", $search_subprice, 1); } if ($search_qty) { - $sql .= natural_search("cd.total_qty", $search_qty, 1); + $sql .= natural_search("cd.qty", $search_qty, 1); } if ($search_total_ht) { $sql .= natural_search("cd.total_ht", $search_total_ht, 1); @@ -563,7 +563,7 @@ if (!empty($arrayfields['c.ref']['checked'])) { print '