34 private static $variable=array(
"code"=>
"pcode",
"value"=>
"pvalue",
"account"=>
'paccount');
39 if ( array_key_exists($p_string,self::$variable) ) {
40 $idx=self::$variable[$p_string];
44 throw new Exception(
"Attribut inexistant $p_string");
47 if ( array_key_exists($p_string,self::$variable) ) {
48 $idx=self::$variable[$p_string];
52 throw new Exception(
"Attribut inexistant $p_string");
56 public function get_info() {
return var_export(self::$variable,
true); }
63 public function seek($cond,$p_array=null)
71 if ( $this->
verify() != 0 )
return;
73 $sql=
"insert into tva_belge.parameter (pcode,pvalue,paccount) ".
75 $this->tva_id=$this->cn->exec_sql(
85 if ( $this->
verify() != 0 )
return;
87 $sql=
"update tva_belge.parameter set pvalue=$1,paccount=$2 ".
89 $res=$this->cn->exec_sql(
100 $sql=
"select pcode from tva_belge.parameter where pcode=$1";
102 $res=$this->cn->get_array(
107 if ( count(
$res) == 0 )
return -1;
108 for ($i=0;$i<count(
$res);$i++) { $this->pcode=
$res[$i][
'pcode'];$this->pvalue=
$res[$i][
'pvalue'];$this->paccount=
$res[$i][
'paccount']; }
117 $count=$this->cn->get_value(
'select count(*) from tmp_pcmn where pcm_val::text like $1',array($p_code));
126 $res=$this->cn->get_array(
"select pcode from tva_belge.parameter");
129 require_once(
'form_parameter.php');
130 $r=ob_get_contents();
seek($cond, $p_array=null)
retrieve * row thanks a condition
set_parameter($p_string, $p_value)
exist_pcmn($p_code)
check that this accounting does exist in the accounting plan
display()
show the content of the table tva_belge.parameter