46 "price_unit"=>
"ad_pu",
47 "quantity"=>
"ad_quant",
48 "tva_id"=>
"ad_tva_id",
49 "tva_amount"=>
"ad_tva_amount",
50 "total"=>
"ad_total_amount",
67 throw new Exception(
"Attribut inexistant $p_string");
77 throw new Exception(
"Attribut inexistant $p_string");
92 if ( $this->ad_id == 0 )
100 if ( $this->
verify() != 0 )
return;
101 $sql=
'INSERT INTO action_detail('.
102 ' f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount,'.
103 ' ad_total_amount, ag_id)'.
104 ' VALUES ($1, $2, $3, $4,$5,$6,$7,$8) returning ad_id';
105 $this->ad_id=$this->
db->get_value(
$sql,array(
111 $this->ad_tva_amount,
112 $this->ad_total_amount,
121 if ( $this->
verify() != 0 )
return;
123 $sql=
'UPDATE action_detail '.
124 ' SET f_id=$1, ad_text=$2, ad_pu=$3, ad_quant=$4, ad_tva_id=$5,'.
125 ' ad_tva_amount=$6, ad_total_amount=$7, ag_id=$8'.
127 $this->
id=$this->
db->exec_sql(
$sql,array(
133 $this->ad_tva_amount,
134 $this->ad_total_amount,
148 $sql=
"SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount,
149 ad_total_amount, ag_id FROM action_detail ".
150 " where ag_id=$1 order by ad_id";
151 $res=$this->
db->get_array(
155 if ( $this->
db->count() == 0 )
return array();
175 $sql=
"SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount,
176 ad_total_amount, ag_id FROM action_detail".
179 $res=$this->
db->get_array(
183 if ( $this->
db->count() == 0 )
return false;
191 public function delete()
193 $sql=
"delete from action_detail where ad_id=$1";
194 $this->
db->exec_sql(
$sql,array($this->ad_id));
223 $this->f_id=
$tmp->id;
225 $this->ad_text=(isset(
$row[
'e_march'.
$idx.
'_label']))?
$row[
'e_march'.
$idx.
'_label']:
"";
226 $this->ad_pu=(isset(
$row[
'e_march'.
$idx.
'_price']))?
$row[
'e_march'.
$idx.
'_price']:0;
228 $this->ad_tva_id=(isset(
$row[
'e_march'.
$idx.
'_tva_id']))?
$row[
'e_march'.
$idx.
'_tva_id']:0;
229 $this->ad_tva_amount=(isset(
$row[
'e_march'.
$idx.
'_tva_amount']))?
$row[
'e_march'.
$idx.
'_tva_amount']:0;
230 $this->ad_total_amount=(isset(
$row[
'tvac_march'.
$idx]))?
$row[
'tvac_march'.
$idx]:0;
233 if (trim($this->ad_pu)==
"" ||
isNumber($this->ad_pu)==0) $this->ad_pu=0;
234 if (trim($this->ad_quant)==
"" ||
isNumber($this->ad_quant)==0) $this->ad_quant=0;
235 if (trim($this->ad_tva_amount)==
""||
isNumber($this->ad_tva_amount)==0) $this->ad_tva_amount=0;
236 if (trim($this->ad_total_amount)==
""||
isNumber($this->ad_total_amount)==0) $this->ad_total_amount=0;
237 if (trim($this->ad_tva_id)==
"" ||
isNumber($this->ad_tva_id)==0) $this->ad_tva_id=0;
242 $option=$p_follow_up->db->get_value(
"select do_option from document_option "
243 .
" where document_type_id=$1 and do_code='detail_operation'",[$p_follow_up->dt_id]);
245 require NOALYSS_TEMPLATE.
"/follow_up_detail_display.php";
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Follow_Up Details are the details for an actions, it means the details of an order,...
static display(Follow_Up $p_follow_up, $p_view)
set_parameter($p_string, $p_value)
__construct($p_cn, $p_id=0)
load()
load the todo_list row thanks it's ID
from_array($array, $idx)
Fill an Action_Detail Object with the data contained in an array.
load_all()
retrieve all the details of an Follow_Up