Fix author searching include first and last name

This commit is contained in:
Jay Yeo 2021-12-16 16:28:45 +07:00
parent e85289777c
commit 41e4e70c6e
7 changed files with 7 additions and 7 deletions

View File

@ -537,7 +537,7 @@ if ($search_multicurrency_tx != '') $sql .= natural_search('f.multicurrency_tx',
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('f.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurrency_total_tva', $search_multicurrency_montant_vat, 1);
if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('f.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1);
if ($search_login) $sql .= natural_search('u.login', $search_login);
if ($search_login) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login);
if ($search_categ_cus > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus);
if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL";
if ($search_status != '-1' && $search_status != '')

View File

@ -461,7 +461,7 @@ if ($search_multicurrency_tx != '') $sql .= natural_search('f.multicurrency_tx',
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('f.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurrency_total_tva', $search_multicurrency_montant_vat, 1);
if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('f.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1);
if ($search_login) $sql .= natural_search('u.login', $search_login);
if ($search_login) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login);
if ($search_status != '' && $search_status >= 0) $sql .= " AND f.fk_statut = ".$db->escape($search_status);
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".((int) $search_paymentmode);
if ($search_paymentcond > 0) $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond);

View File

@ -428,7 +428,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref);
if (!empty($search_product)) $sql .= natural_search('p.label', $search_product);
if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2);
if (!empty($search_user)) $sql .= natural_search('u.login', $search_user);
if (!empty($search_user)) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_user);
if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch);
if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1);
if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2);

View File

@ -464,7 +464,7 @@ if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $se
if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref);
if (!empty($search_product)) $sql .= natural_search('p.label', $search_product);
if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2);
if (!empty($search_user)) $sql .= natural_search('u.login', $search_user);
if (!empty($search_user)) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login')', $search_user);
if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch);
if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1);
if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2);

View File

@ -490,7 +490,7 @@ if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $se
if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref);
if (!empty($search_product)) $sql .= natural_search('p.label', $search_product);
if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2);
if (!empty($search_user)) $sql .= natural_search('u.login', $search_user);
if (!empty($search_user)) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_user);
if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch);
if (!empty($product_id)) $sql .= natural_search('p.rowid', $product_id);
if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1);

View File

@ -132,7 +132,7 @@ if (!$user->rights->societe->client->voir && !$socid) {
}
if ($sref) $sql .= natural_search('cf.ref', $sref);
if ($snom) $sql .= natural_search('s.nom', $snom);
if ($suser) $sql .= natural_search('u.login', $suser);
if ($suser) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $suser);
if ($sttc) $sql .= natural_search('cf.total_ttc', $sttc, 1);
$sql .= dolSqlDateFilter('cf.date_creation', $search_dateday, $search_datemonth, $search_dateyear);
if ($sall) $sql .= natural_search(array('cf.ref', 'cf.note'), $sall);

View File

@ -297,7 +297,7 @@ if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_ref) $sql .= natural_search('sp.ref', $search_ref);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_login) $sql .= natural_search('u.login', $search_login);
if ($search_login) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login);
if ($search_montant_ht) $sql .= natural_search('sp.total_ht=', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql .= natural_search("sp.tva", $search_montant_vat, 1);
if ($search_montant_ttc != '') $sql .= natural_search("sp.total", $search_montant_ttc, 1);