Fix filter
This commit is contained in:
parent
9b825df158
commit
b77cadf39a
@ -570,13 +570,13 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
}
|
||||
$param .= '&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||
$param .= '&type='.urlencode($type).'&view='.urlencode($view);
|
||||
if (!empty($search_categ)) {
|
||||
if (!empty($search_categ) && $search_categ != '-1') {
|
||||
$param .= '&search_categ='.urlencode($search_categ);
|
||||
}
|
||||
if (!empty($search_categ_thirdparty)) {
|
||||
if (!empty($search_categ_thirdparty) && $search_categ_thirdparty != '-1') {
|
||||
$param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
|
||||
}
|
||||
if (!empty($search_categ_supplier)) {
|
||||
if (!empty($search_categ_supplier) && $search_categ_supplier != '-1') {
|
||||
$param .= '&search_categ_supplier='.urlencode($search_categ_supplier);
|
||||
}
|
||||
if ($sall != '') {
|
||||
|
||||
@ -441,7 +441,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
if (!empty($search_categ_sup)) {
|
||||
if (!empty($search_categ_sup) && $search_categ_supplier != '-1') {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc";
|
||||
}
|
||||
|
||||
|
||||
@ -497,7 +497,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region. code_regio
|
||||
if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
}
|
||||
if (!empty($search_categ_sup) && $search_categ_sup!=-1) {
|
||||
if (!empty($search_categ_sup) && $search_categ_sup != '-1') {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
}
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."c_stcomm as st ON s.fk_stcomm = st.id";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user