[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 111/119: Follow-Up improve search
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 111/119: Follow-Up improve search |
Date: |
Mon, 26 Oct 2020 18:27:40 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9857de7e08d652cce01f083f91a5fed288722454
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Oct 16 10:14:12 2020 +0200
Follow-Up improve search
---
include/class/follow_up.class.php | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/class/follow_up.class.php
b/include/class/follow_up.class.php
index 5810aa2..c36fe8d 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -1246,15 +1246,26 @@ class Follow_Up
static function create_query($cn, $p_array=null)
{
if ($p_array==null) $p_array=$_GET;
-
+ $http=new HttpInput();
+ $search_docid=0; // search for a document
$action_query="";
$ag_state=""; //<! selected status of the event , if not set or equal
to -1 , it is all of them
+ //
+ // search for a specific document id (ag_id) , if given then status
and date doesn't count
+ if (isset ($p_array['ag_id']) &&
isNumber($p_array['ag_id'])==1&&$p_array['ag_id']!=0)
+ {
+ $action_query=" and ag_id= ".sql_string($p_array['ag_id']);
+ $search_docid=$p_array['ag_id'];
+ return $action_query;
+ }
if (isset($_REQUEST['action_query']))
{
+ $action_query = $http->request('action_query');
// if a query is request build the sql stmt
- $action_query="and (ag_title ilike
'%".sql_string($_REQUEST['action_query'])."%' ".
- "or ag_ref ='".trim(sql_string($_REQUEST['action_query'])).
- "' or ag_id in (select ag_id from action_gestion_comment
where agc_comment ilike '%".trim(sql_string($_REQUEST['action_query']))."%')".
+ $action_query="and (ag_title ilike
'%".sql_string($action_query)."%' ".
+ "or ag_ref ='".trim(sql_string($action_query)).
+ "' or ag_id in (select ag_id from action_gestion_comment ".
+ " where agc_comment ilike
'%".trim(sql_string($action_query))."%')".
")";
}
@@ -1266,7 +1277,7 @@ class Follow_Up
{
$fiche=new Fiche($cn);
- $fiche->get_by_qcode($_REQUEST['qcode']);
+ $fiche->get_by_qcode($http->request('qcode'));
// if quick code not found then nothing
if ($fiche->id==0)
$str=' and false ';
@@ -1318,10 +1329,6 @@ class Follow_Up
if (isset ($p_array['ag_id']) &&
isNumber($p_array['ag_id'])==1&&$p_array['ag_id']!=0)
{
- $action_query=" and ag_id= ".sql_string($p_array['ag_id']);
- }
- if
(isset($p_array['$remind_date'])&&$p_array['remind_date']!=""&&isDate($p_array['remind_date'])==$p_array['remind_date'])
- {
$action_query .= " and
to_date('".sql_string($p_array['$remind_date'])."','DD.MM.YYYY')<=
ag_remind_date";
}
if
(isset($p_array['remind_date_end'])&&$p_array['remind_date_end']!=""&&isDate($p_array['$remind_date_end'])==$p_array['remind_date_end'])
- [Noalyss-commit] [noalyss] 114/119: Cosmetic & version, (continued)
- [Noalyss-commit] [noalyss] 114/119: Cosmetic & version, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 115/119: Analytic accountancy protect against divide by zero, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 82/119: Follow up search card, add a button to select all , cosmetic add qcode in dialog box for contact option, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 83/119: Bug : from VEN , cannot get the price, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 85/119: Follow-up fix order, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 88/119: Fix bug : follow up option contact are not remove when document type changed, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 99/119: Upgrade DB 147, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 102/119: remove dead code, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 106/119: Filter_Multiselect : make a search on select (multi-row), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 104/119: Select_Box Add new position : absolute, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 111/119: Follow-Up improve search,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 110/119: Follow Up : an action can have several parents, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 119/119: Tache #0001859: PARAM/CFGDOC : icone fermer + bouton, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 116/119: Modern CheckBox, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 118/119: Fontello : fix icon-edit, Dany De Bontridder, 2020/10/26