handle the param_detail type Account The type_sum_account gives the type of total
More...
|
| compute ($p_start, $p_end) |
|
| from_array ($p_array) |
| the p_array contains a row from formulaire_param_detail it will be copied into this->form. More...
|
|
|
static | factory ($p_array) |
| create an object RAPAV_dd_Formula, RAPAV_dd_Account_Tva or Rapav_dd_compute following the idx type_detail More...
|
|
handle the param_detail type Account The type_sum_account gives the type of total
- 0 D-C
- 1 C-D
- 2 D
- 4 C it uses tmp_val, with_tmp_val and type_sum_account
- See Also
- RAPAV_Account
Definition at line 1142 of file class_rapav_declaration.php.
Rapav_dd_Account::compute |
( |
|
$p_start, |
|
|
|
$p_end |
|
) |
| |
Definition at line 1145 of file class_rapav_declaration.php.
References $amount, $cn, $sql, and RAPAV\get_sql_date().
1148 $filter_ledger =
"";
1149 if ($this->form->jrn_def_id !=
"")
1151 $filter_ledger =
" and jrn1.j_jrn_def = " . sql_string($this->form->jrn_def_id);
1157 switch ($this->form->type_sum_account)
1165 select sum(jrnx_amount)
1167 select distinct jrn1.j_id,case when jrn1.j_debit = 't' then jrn1.j_montant else jrn1.j_montant*(-1) end as jrnx_amount
1169 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1171 jrn1.j_poste like $1
1174 jrn2.j_poste like $4
1179 $this->form->tmp_val,
1182 $this->form->with_tmp_val
1185 if ($this->form->type_sum_account == 2)
1192 select sum(jrnx_amount)
1194 select distinct jrn1.j_id,jrn1.j_montant as jrnx_amount
1196 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1198 jrn1.j_poste like $1
1201 jrn2.j_poste like $4
1208 $this->form->tmp_val,
1211 $this->form->with_tmp_val
1218 select sum(jrnx_amount)
1220 select distinct jrn1.j_id,jrn1.j_montant as jrnx_amount
1222 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1224 jrn1.j_poste like $1
1227 jrn2.j_poste like $4
1234 $this->form->tmp_val,
1237 $this->form->with_tmp_val,
1244 die(__FILE__ .
":" . __LINE__ .
" UNKNOW SUM TYPE");
static get_sql_date($p_date, $p_prefix="")
Compute the SQL for the date.
static Rapav_Declaration_Detail::factory |
( |
|
$p_array | ) |
|
|
staticinherited |
create an object RAPAV_dd_Formula, RAPAV_dd_Account_Tva or Rapav_dd_compute following the idx type_detail
- Parameters
-
- Returns
- object RAPAV_dd_Formula, RAPAV_dd_Account_Tva or Rapav_dd_compute
- Exceptions
-
Definition at line 843 of file class_rapav_declaration.php.
References $ret.
Referenced by Rapav_Declaration_Param\compute(), and Rapav_Declaration_Param\compute_child().
845 switch ($p_array[
'type_detail'])
867 throw new Exception(
"Type inconnu");
870 $ret->from_array($p_array);
871 $ret->ddr_amount = 0;
handle the param_detail type Compute
handle the param_detail type Account The type_sum_account gives the type of total ...
handle the param_detail type Account The type_sum_account gives the type of total ...
handle the param_detail type Account_Tva The t_id gives the type of total
Rapav_Declaration_Detail::from_array |
( |
|
$p_array | ) |
|
|
inherited |
the p_array contains a row from formulaire_param_detail it will be copied into this->form.
- Parameters
-
type | $p_array | match formulaire_param_detail table structure |
Definition at line 880 of file class_rapav_declaration.php.
883 $attribute = explode(
',',
'fp_id,p_id,tmp_val,tva_id,fp_formula,fp_signed,jrn_def_type,tt_id,type_detail,with_tmp_val,type_sum_account,operation_pcm_val,jrn_def_id,date_paid');
884 foreach ($attribute as $e)
886 $this->form->$e = $p_array[$e];
The documentation for this class was generated from the following file: