21require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
42 $this->ji_id=$p_ji_id;
46 if ( ! isset ($this->
jr_id) ||
47 ! isset ($this->ji_value) ||
48 ! isset ($this->id_type ) )
50 echo
'Appel incorrecte '.__FILE__.__LINE__;
52 throw new Exception(_(
'appel incorrect'));
56 $sql=$this->
cn->exec_sql(
'insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)'.
58 array ($this->
jr_id,$this->id_type,$this->ji_value)
65 echo
"Echec sauvegarde info additionnelles";
71 if ( ! isset ($this->
jr_id) ||
72 ! isset ($this->ji_value) ||
73 ! isset ($this->
jr_id ) )
75 echo
'Appel incorrecte '.__FILE__.__LINE__;
77 throw new Exception(
'appel incorrect');
81 $sql=$this->exec_sql(
'update jrn_info set jr_id=$1 ,id_type=$2,ji_value=$3 where ji_id=$4)'.
82 array ($this->
jr_id,$this->id_type,$this->ji_value,$this->ji_id)
88 $this->
cn->rollback();
89 echo
"Echec sauvegarde info additionnelles";
99 $sql=
"select jr_id,id_type,ji_value from jrn_info where ji_id=$1";
100 $r=$this->
cn->exec_sql(
$sql,[$this->ji_id]);
114 foreach (array(
"jr_id",
"id_type",
"ji_value") as $col)
121 $this->$ji_id=$p_ji_id;
129 $this->id_type=
$p_id;
133 $this->ji_value=
$p_id;
140 if ( ! isset ($this->
jr_id) )
142 echo
"jr_id is not set ".__FILE__.__LINE__;
143 throw new Exception(
'Error : jr_id not set');
146 $sql=
"select ji_id from jrn_info where jr_id=".$this->jr_id;
163 $sql=
"select ji_id from jrn_info where jr_id=".$this->jr_id;
164 return $this->
cn->count_sql(
$sql);
168 $sql=
"select jr_id from jrn where jr_internal='$p_internal'";
190 $this->
jr_id=$p_jr_id;
noalyss_strlentrim($p_string)
record_log($p_message)
Record an error message into the log file of the server.
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
Manage the additionnal info for operation (from jrn), when an invoice is generated,...
load()
load the todo_list row thanks it's ID
save_extra($p_jr_id, $p_array)
save all extra information in once, called by compta_ven and compta_ach
search_id_internal($p_internal)
load_all()
load all the jrn_info thanks the jr_id
__construct($p_cn, $p_ji_id=0)
static fetch_all($ret)
wrapper for the function pg_fetch_all
static fetch_result($ret, $p_row=0, $p_col=0)
wrapper for the function pg_fetch_all
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows