From 3416e51acc4acccedfa95f54df0745a7a789ca02 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Wed, 28 Oct 2020 18:16:26 +0100 Subject: [PATCH] FollowUp : nouvelle balises HOUR , GROUPMGMT , PRIORITY --- include/class/document.class.php | 41 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/include/class/document.class.php b/include/class/document.class.php index 084e0beaf..86f557baa 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -1211,7 +1211,7 @@ class Document // Comments, use a counter to move to the next comment, only for Follow-Up // - case 'COMMENTS': + case 'COMMENT': if ( isset($p_array['ag_id'])) { // Static value, if null the retrieve all of them if ( $aComment == NULL ) { @@ -1225,12 +1225,12 @@ class Document } $nb_comment=count($aComment); $description=""; - if (count ($aComment) > $this->counter_comment) { - $description.= sprintf(_('le %s , %s écrit %s'."\n"), - $aComment[$this->counter_comment]['str_date'], - $aComment[$this->counter_comment]['tech_user'], - $aComment[$this->counter_comment]['agc_comment']); - $this->counter_comment++; + if (count ($aComment) > $counter_comment) { + $description.= sprintf(_('le %s , %s écrit %s'), + $aComment[$counter_comment]['str_date'], + $aComment[$counter_comment]['tech_user'], + $aComment[$counter_comment]['agc_comment']); + $counter_comment++; } return $description; } @@ -1370,7 +1370,7 @@ class Document } $nb_comment=count($aFileAttached); $description=""; - if (count ($aFileAttached) > $this->counter_comment) { + if (count ($aFileAttached) > $counter_file) { $description.= sprintf("%s %s ", $aFileAttached[$counter_file]['d_filename'], $aFileAttached [$counter_file]['d_description']); @@ -1405,7 +1405,30 @@ class Document if ( isset($p_array["e_comm_paiement"])) { return $p_array["e_comm_paiement"]; } else return ""; - } + + // priority of the follow up document + case 'PRIORITY': + if ( isset($p_array['ag_priority'])) { + $aPriority=array(1=>_("Haute"),2=>_("Normale"),3=>_("Basse")); + return $aPriority[$p_array["ag_priority"]]; + } + return ""; + // Priority of the follow up document + case 'GROUPMGT': + if ( isset($p_array['ag_dest'])) { + $profile=$this->db->get_value("select p_name from profile where p_id=$1",array($p_array['ag_dest'])); + return $profile; + } + return ""; + // Hour in the follow up document + case 'HOUR': + if ( isset($p_array['ag_hour'])) { + return $p_array["ag_hour"]; + } + return ""; + + + } // end switch /* * retrieve the value of ATTR for e_march */