diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 998e1e9e23e..18880093d21 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -67,6 +67,7 @@ $search_refproject = GETPOST('search_refproject', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); +$search_societe_alias = GETPOST('search_societe_alias', 'alpha'); $search_montant_ht = GETPOST('search_montant_ht', 'alpha'); $search_montant_vat = GETPOST('search_montant_vat', 'alpha'); $search_montant_ttc = GETPOST('search_montant_ttc', 'alpha'); @@ -161,6 +162,7 @@ $arrayfields = array( 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1), 's.town'=>array('label'=>"Town", 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'checked'=>1), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), @@ -223,6 +225,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_refproject = ''; $search_project = ''; $search_societe = ''; + $search_societe_alias = ''; $search_montant_ht = ''; $search_montant_vat = ''; $search_montant_ttc = ''; @@ -289,7 +292,7 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos' $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; $sql .= " typent.code as typent_code,"; $sql .= " ava.rowid as availability,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -349,6 +352,7 @@ if ($search_project) $sql .= natural_search('pr.title', $search_project); if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; if ($search_societe) $sql .= natural_search('s.nom', $search_societe); +if ($search_societe_alias) $sql .= natural_search('s.name_alias', $search_societe_alias); if ($search_login) $sql .= natural_search("u.login", $search_login); if ($search_montant_ht != '') $sql .= natural_search("p.total_ht", $search_montant_ht, 1); if ($search_montant_vat != '') $sql .= natural_search("p.tva", $search_montant_vat, 1); @@ -459,6 +463,7 @@ if ($resql) if ($search_refcustomer) $param .= '&search_refcustomer='.urlencode($search_refcustomer); if ($search_refproject) $param .= '&search_refproject='.urlencode($search_refproject); if ($search_societe) $param .= '&search_societe='.urlencode($search_societe); + if ($search_societe_alias) $param .= '&search_societe_alias='.urlencode($search_societe_alias); if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); if ($search_montant_ht) $param .= '&search_montant_ht='.urlencode($search_montant_ht); @@ -621,6 +626,12 @@ if ($resql) print ''; print ''; } + if (!empty($arrayfields['s.name_alias']['checked'])) + { + print '