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 1265 of file class_rapav_declaration.php.
Rapav_dd_Reconcile::compute |
( |
|
$p_start, |
|
|
|
$p_end |
|
) |
| |
Definition at line 1268 of file class_rapav_declaration.php.
References $amount, $cn, and $sql.
1272 $filter_ledger =
"";
1273 if ($this->form->jrn_def_id !=
"")
1275 $filter_ledger =
" and jrn1.j_jrn_def = " . sql_string($this->form->jrn_def_id);
1277 switch ($this->form->type_sum_account)
1284 select sum(tv_amount.jrnx_amount)
1286 select distinct jrn1.j_id,j1.jr_id,
1287 case when jrn1.j_debit = 't' then jrn1.j_montant else jrn1.j_montant*(-1) end as jrnx_amount
1289 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1290 join jrn as j1 on (jrn1.j_grpt=j1.jr_grpt_id)
1292 jrn1.j_poste like $1
1293 and jrn2.j_poste like $2
1296 join jrn_rapt as rap1 on (rap1.jr_id=tv_amount.jr_id or rap1.jra_concerned=tv_amount.jr_id)
1297 join (select distinct jrn3.j_id,j2.jr_id
1299 join jrn as j2 on (j2.jr_grpt_id=jrn3.j_grpt)
1301 (jrn3.j_date >= to_date($3,'DD.MM.YYYY') and jrn3.j_date <= to_date($4,'DD.MM.YYYY')) and
1302 jrn3.j_poste like $5) as reconc on (rap1.jr_id=reconc.jr_id or rap1.jra_concerned=reconc.jr_id)
1306 $this->form->tmp_val,
1307 $this->form->with_tmp_val,
1310 $this->form->operation_pcm_val
1313 if ($this->form->type_sum_account == 2)
1319 select sum(tv_amount.jrnx_amount)
1321 select distinct jrn1.j_id,j1.jr_id,
1322 jrn1.j_montant as jrnx_amount
1324 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1325 join jrn as j1 on (jrn1.j_grpt=j1.jr_grpt_id)
1327 jrn1.j_poste like $1
1328 and jrn2.j_poste like $2
1329 and jrn1.j_debit='t'
1332 join jrn_rapt as rap1 on (rap1.jr_id=tv_amount.jr_id or rap1.jra_concerned=tv_amount.jr_id)
1333 join (select distinct jrn3.j_id,j2.jr_id
1335 join jrn as j2 on (j2.jr_grpt_id=jrn3.j_grpt)
1337 (jrn3.j_date >= to_date($3,'DD.MM.YYYY') and jrn3.j_date <= to_date($4,'DD.MM.YYYY')) and
1338 jrn3.j_poste like $5) as reconc on (rap1.jr_id=reconc.jr_id or rap1.jra_concerned=reconc.jr_id)
1342 $this->form->tmp_val,
1343 $this->form->with_tmp_val,
1346 $this->form->operation_pcm_val
1352 select sum(tv_amount.jrnx_amount)
1354 select distinct jrn1.j_id,j1.jr_id,
1355 jrn1.j_montant as jrnx_amount
1357 join jrnx as jrn2 on (jrn1.j_grpt=jrn2.j_grpt)
1358 join jrn as j1 on (jrn1.j_grpt=j1.jr_grpt_id)
1360 jrn1.j_poste like $1
1361 and jrn2.j_poste like $2
1362 and jrn1.j_debit='f'
1365 join jrn_rapt as rap1 on (rap1.jr_id=tv_amount.jr_id or rap1.jra_concerned=tv_amount.jr_id)
1366 join (select distinct jrn3.j_id,j2.jr_id
1368 join jrn as j2 on (j2.jr_grpt_id=jrn3.j_grpt)
1370 (jrn3.j_date >= to_date($3,'DD.MM.YYYY') and jrn3.j_date <= to_date($4,'DD.MM.YYYY')) and
1371 jrn3.j_poste like $5) as reconc on (rap1.jr_id=reconc.jr_id or rap1.jra_concerned=reconc.jr_id)
1375 $this->form->tmp_val,
1376 $this->form->with_tmp_val,
1379 $this->form->operation_pcm_val
1386 die(__FILE__ .
":" . __LINE__ .
" UNKNOW SUM TYPE");
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: