Match each row of a form, this row can have several details.
More...
|
| insert () |
| insert into rapport_advanced.formulaire_param More...
|
|
| from_array ($p_array) |
| set the attribute param with the content of the array. More...
|
|
| compute_date ($p_start, $p_end) |
| compute the date following the attribute t_id (match rapport_advanced.periode_type and store the result into $this->start and $this-> end More...
|
|
| compute_child ($p_pcm_val, $p_start, $p_end) |
|
| compute ($p_start, $p_end) |
|
| get_depending () |
| find depending accounting More...
|
|
Match each row of a form, this row can have several details.
Definition at line 647 of file class_rapav_declaration.php.
Rapav_Declaration_Param::compute |
( |
|
$p_start, |
|
|
|
$p_end |
|
) |
| |
Definition at line 793 of file class_rapav_declaration.php.
References $array, $cn, compute_date(), and Rapav_Declaration_Detail\factory().
799 $array = $cn->get_array(
"select fp_id,p_id,tmp_val,tva_id,fp_formula,fp_signed,jrn_def_type,tt_id,type_detail,
800 with_tmp_val,type_sum_account,operation_pcm_val,jrn_def_id,date_paid
801 from rapport_advanced.formulaire_param_detail where p_id=$1", array($this->param->p_id));
803 for ($e = 0; $e < count(
$array); $e++)
806 $row_detail->dr_id = $this->dr_id;
807 $row_detail->d_id = $this->d_id;
808 $tmp_amount = $row_detail->compute($this->start, $this->end);
809 $this->amount = bcadd(
"$tmp_amount",
"$this->amount");
810 $row_detail->insert();
if(isset($_POST['remove'])) $array
compute_date($p_start, $p_end)
compute the date following the attribute t_id (match rapport_advanced.periode_type and store the resu...
static factory($p_array)
create an object RAPAV_dd_Formula, RAPAV_dd_Account_Tva or Rapav_dd_compute following the idx type_de...
Rapav_Declaration_Param::compute_child |
( |
|
$p_pcm_val, |
|
|
|
$p_start, |
|
|
|
$p_end |
|
) |
| |
Definition at line 764 of file class_rapav_declaration.php.
References $array, $cn, compute_date(), and Rapav_Declaration_Detail\factory().
Referenced by Rapav_Declaration\add_child_account().
770 $array = $cn->get_array(
"select fp_id,p_id,tmp_val,tva_id,fp_formula,fp_signed,jrn_def_type,tt_id,type_detail,
771 with_tmp_val,type_sum_account,operation_pcm_val,jrn_def_id,date_paid
772 from rapport_advanced.formulaire_param_detail where p_id=$1", array($this->param->p_id));
774 for ($e = 0; $e < count(
$array); $e++)
777 $row_detail->form->tmp_val=$p_pcm_val;
778 $row_detail->dr_id = $this->dr_id;
779 $row_detail->d_id = $this->d_id;
780 $tmp_amount = $row_detail->compute($this->start, $this->end);
781 $this->amount = bcadd(
"$tmp_amount",
"$this->amount");
782 $row_detail->insert();
if(isset($_POST['remove'])) $array
compute_date($p_start, $p_end)
compute the date following the attribute t_id (match rapport_advanced.periode_type and store the resu...
static factory($p_array)
create an object RAPAV_dd_Formula, RAPAV_dd_Account_Tva or Rapav_dd_compute following the idx type_de...
Rapav_Declaration_Param::compute_date |
( |
|
$p_start, |
|
|
|
$p_end |
|
) |
| |
compute the date following the attribute t_id (match rapport_advanced.periode_type and store the result into $this->start and $this-> end
- 1 date from the FORM
- 2 N
- 3 N-1
- 4 N-2
- 5 N-3
- Parameters
-
$p_start | requested date |
$p_end | requested date |
Definition at line 703 of file class_rapav_declaration.php.
References $cn, $exercice, and $periode.
Referenced by compute(), and compute_child().
706 switch ($this->param->t_id)
709 $this->start = $p_start;
714 list($this->start, $this->end) = $g_user->get_limit_current_exercice();
730 list($this->start, $this->end) = $g_user->get_limit_current_exercice();
735 throw new Exception(
'compute_date : t_id est incorrect');
742 $exist_exercice = $cn->get_value(
'select count(p_id) from parm_periode where p_exercice=$1', array(
$exercice));
743 if ($exist_exercice == 0)
745 $this->start =
'01.01.1900';
746 $this->end =
'01.01.1900';
752 $this->start = $per_start->first_day();
753 $this->end = $per_end->last_day();
Rapav_Declaration_Param::from_array |
( |
|
$p_array | ) |
|
set the attribute param with the content of the array.
keys :
- 'p_id',
- 'p_code',
- 'p_libelle',
- 'p_type',
- 'p_order',
- 'f_id',
- 't_id'
- Parameters
-
Definition at line 681 of file class_rapav_declaration.php.
Referenced by Rapav_Declaration\add_child_account().
684 foreach (array(
'p_id',
'p_code',
'p_libelle',
'p_type',
'p_order',
'f_id',
't_id') as $e)
686 $this->param->$e = $p_array[$e];
688 $this->param->load();
Rapav_Declaration_Param::get_depending |
( |
| ) |
|
find depending accounting
Definition at line 816 of file class_rapav_declaration.php.
References $array, and $cn.
Referenced by Rapav_Declaration\add_child_account().
819 $accounting = $cn->get_value(
" select tmp_val
820 from rapport_advanced.formulaire_param_detail
821 where p_id=$1", array($this->param->p_id));
823 $array=$cn->get_array(
"select pcm_val,pcm_lib from tmp_pcmn where
824 pcm_val like $1||'%' order by pcm_val::text",array($accounting));
if(isset($_POST['remove'])) $array
Rapav_Declaration_Param::insert |
( |
| ) |
|
The documentation for this class was generated from the following file: