noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 50/119: Follow-up search : show the closing s


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 50/119: Follow-up search : show the closing status
Date: Mon, 26 Oct 2020 18:27:17 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 3effa4bb848e0daef8e89b7ba4295272bf3f6254
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Mon Oct 5 15:43:39 2020 +0200

    Follow-up search : show the closing status
---
 include/class/follow_up.class.php  | 9 ++++++---
 include/template/action_search.php | 9 +++++----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/include/class/follow_up.class.php 
b/include/class/follow_up.class.php
index 1637c39..26a8927 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -1117,7 +1117,7 @@ class Follow_Up
         /* State of documents */
         $type_state=new ISelect('state');
         $aState=$cn->make_array('select s_id,s_value from document_state order 
by s_value');
-        $aState[]=array('value'=>'-1', 'label'=>_('Tous les Etats'));
+        $aState[]=array('value'=>'-1', 'label'=>_('Tous les actions 
ouvertes'));
         $type_state->value=$aState;
         $type_state->selected=(isset($_GET['state']))?$_GET['state']:-1;
 
@@ -1235,7 +1235,7 @@ class Follow_Up
         if ($p_array==null)             $p_array=$_GET;
         
         $action_query="";
-
+        $ag_state=""; //<! selected status of the event , if not set or equal 
to -1 , it is all of them
         if (isset($_REQUEST['action_query']))
         {
             // if a query is request build the sql stmt
@@ -1268,6 +1268,8 @@ class Follow_Up
         if (isset($p_array['state'])&&$p_array['state'] !=-1)
         {
             $action_query .= ' and ag_state= '.sql_string($p_array['state']);
+            // a status is selected
+            $ag_state=$p_array['state'];
         }
         if (isset($p_array['hsstate'])&&$p_array['hsstate']!=-1)
         {
@@ -1313,7 +1315,8 @@ class Follow_Up
         {
             $action_query .= " and 
to_date('".sql_string($p_array['remind_date_end'])."','DD.MM.YYYY')>= 
ag_remind_date";
         }
-        if (!isset($p_array['closed_action']))
+        // only for open action or a closing status is selected
+        if (!isset($p_array['closed_action']) && $ag_state == "")
         {
             $action_query.=" and s_status is null ";
         }
diff --git a/include/template/action_search.php 
b/include/template/action_search.php
index 657f5d9..58cab55 100644
--- a/include/template/action_search.php
+++ b/include/template/action_search.php
@@ -56,6 +56,10 @@
                                <td style="text-align:right" ><?php echo  
_("Etat")?></td>
                                <td><?php echo  $type_state->input()?></td>
                        </tr>
+                        <tr>
+                               <td style="text-align:right"> <?php echo 
_("Affiche aussi les actions fermées");?></td>
+                               <td><?php echo $closed_action->input();?></td>
+                       </tr>
                        <tr>
                                <td style="text-align:right" ><?php echo  
_("Exclure Etat")?></td>
                                <td><?php echo  
$hsExcptype_state->input()?></td>
@@ -103,10 +107,7 @@
                                        <?php echo $remind_date_end->input();?>
                                </td>
                        </tr>
-                       <tr>
-                               <td style="text-align:right"> <?php echo 
_("Affiche aussi les actions fermées");?></td>
-                               <td><?php echo $closed_action->input();?></td>
-                       </tr>
+               
                        
                         </table>
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]