34 parent::__construct(
$cn);
42 $http=new \HttpInput();
46 $this->{
"e_account".$i}=
$http->post(
"e_account'.$i");
47 $this->{
"e_account".$i.
"_amount"}=
$http->post(
"e_account".
$i.
"_amount",
"number",0);
48 $this->{
"e_account".$i.
"_type"}=
$http->post(
'e_account'.
$i.
"_type");
56 function save($p_od_id,$p_nbitem)
61 for (
$i=0;
$i< $p_nbitem ;
$i++)
63 $sql=
'insert into op_predef_detail (opd_poste,opd_amount,'.
65 ' values ($1,$2,$3,$4)';
67 $this->
db->exec_sql(
$sql,array($this->{
"e_account".$i},
68 $this->{
"e_account".$i.
"_amount"},
69 ($this->{
"e_account".$i.
"_type"}==
'd')?
't':
'f',
77 echo (
$e->getMessage());
90 $c=(
$row[
'opd_debit']==
't')?
'd':
'c';
92 "e_account".
$count.
"_amount"=>
$row[
'opd_amount'],
93 "e_account".$count.
"_type"=>$c
105 $sql=
"select opd_id,opd_poste,opd_amount,opd_debit".
106 " from op_predef_detail where od_id= $1 ".
107 " order by opd_debit, opd_id,opd_amount";
108 $res=$this->
db->exec_sql(
$sql,array($p_od_id));
record_log($p_message)
Record an error message into the log file of the server.
static fetch_all($ret)
wrapper for the function pg_fetch_all
concerns the predefined operation for ODS ledger
save($p_od_id, $p_nbitem)
save the detail and op in the database
load($p_od_id)
load the data from the database and return an array
compute_array($p_od_id)
compute an array accordingly with the FormVenView function
mother of the pre_op_XXX, it contains only one data : an object Pre_Operation. The child class contai...