From b457768d44bc94813b49ddc30bfe123aa626929e Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sat, 12 Jul 2025 16:30:50 +0200 Subject: [PATCH] Code documentation ANC_OPERATION, ANC_KEY delete reverse.sql --- include/class/acc_operation.class.php | 18 +++++++++++++----- include/class/anc_key.class.php | 10 +++++++--- sql/reverse.sql | 0 3 files changed, 20 insertions(+), 8 deletions(-) delete mode 100644 sql/reverse.sql diff --git a/include/class/acc_operation.class.php b/include/class/acc_operation.class.php index 08c332870..c5e806437 100644 --- a/include/class/acc_operation.class.php +++ b/include/class/acc_operation.class.php @@ -394,7 +394,7 @@ EOF; { if ( ! isset($this->jr_id) ) throw new Exception('jr_id is not set',1); - $Res=$this->db->exec_sql("select jr_internal from jrn where jr_id=".$this->jr_id); + $Res=$this->db->exec_sql("select jr_internal from jrn where jr_id=$1",[$this->jr_id]); if ( Database::num_row($Res) == 0 ) return null; $l_line=Database::fetch_array($Res); $this->jr_internal= $l_line['jr_internal']; @@ -436,19 +436,25 @@ EOF; $all=Database::fetch_all($res); return $all; } - /*!\brief add a comment to the line (jrnx.j_text) */ + /*! + * \brief add a comment to the line (jrnx.j_text) + */ function update_comment($p_text) { $sql="update jrnx set j_text=$1 where j_id=$2"; $this->db->exec_sql($sql,array($p_text,$this->jrnx_id)); } - /*!\brief add a comment to the operation (jrn.jr_text) */ + /*! + * \brief add a comment to the operation (jrn.jr_text) + */ function operation_update_comment($p_text) { $sql="update jrn set jr_comment=$1 where jr_id=$2"; $this->db->exec_sql($sql,array($p_text,$this->jr_id)); } - /*!\brief add a limit of payment to the operation (jrn.jr_ech) */ + /*! + * \brief add a limit of payment to the operation (jrn.jr_ech) + */ function operation_update_date_limit($p_text) { if ( isDate($p_text) == null ) @@ -458,7 +464,9 @@ EOF; $sql="update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2"; $this->db->exec_sql($sql,array($p_text,$this->jr_id)); } - /*!\brief return the jrn_def_id from jrn */ + /*! + * \brief return the jrn_def_id from jrn + */ function get_ledger() { $sql="select jr_def_id from jrn where jr_id=$1"; diff --git a/include/class/anc_key.class.php b/include/class/anc_key.class.php index 037413ebd..16173a841 100644 --- a/include/class/anc_key.class.php +++ b/include/class/anc_key.class.php @@ -39,9 +39,13 @@ class Anc_Key { private $key; /*! the distribution key */ - protected $a_ledger; - protected $a_activity; - protected $a_row; + protected $a_ledger ; /*!< array of ledger (JRN_DEF.JRN_DEF_ID) for + * which the key is available*/ + protected $a_activity; /*!< array of activity for + * which the key is available*/ + protected $a_row; /*!< array of row from key_distribution_detail + * , detail of the key*/ + /** *@brief Return the number of keys available. * Return the number of keys available for the ledger given in parameter diff --git a/sql/reverse.sql b/sql/reverse.sql deleted file mode 100644 index e69de29bb..000000000