Plugins  LAST
 All Data Structures Files Functions Variables Pages
Public Member Functions | Static Public Member Functions
RAPAV_Formula Class Reference
Inheritance diagram for RAPAV_Formula:
Inheritance graph
Collaboration diagram for RAPAV_Formula:
Collaboration graph

Public Member Functions

 display_row ()
 
 input ()
 
 verify ()
 
 input_new ($p_id)
 
 input_new_child ($p_id)
 
 button_delete ()
 
 button_modify ()
 
 input_ledger ()
 display a choice of ledger cn More...
 
 input_date_paiement ()
 Display a select for the date. More...
 

Static Public Member Functions

static new_row ()
 

Detailed Description

Definition at line 110 of file class_formulaire_param_detail.php.

Member Function Documentation

Formulaire_Param_Detail::button_delete ( )
inherited

Definition at line 53 of file class_formulaire_param_detail.php.

References $_REQUEST, $html, and p_id.

54  {
55  $html='<td id="del_' . $this->fp_id . '">';
56  $html.=HtmlInput::anchor("Effacer", "", sprintf("onclick=\"delete_param_detail('%s','%s','%s','%s','%s','%s')\""
57  , $_REQUEST['plugin_code'], $_REQUEST['ac'], $_REQUEST['gDossier'], $this->fp_id,$this->p_id,$this->type_detail));
58  $html.= '</td>';
59  return $html;
60  }
$html
Definition: ajax.php:32
$oPeriode p_id
$_REQUEST['sb']
Definition: am_print.php:39
Formulaire_Param_Detail::button_modify ( )
inherited

Definition at line 61 of file class_formulaire_param_detail.php.

References $_REQUEST, and $html.

62  {
63  $html='<td id="mod_' . $this->fp_id . '">';
64  $html.=HtmlInput::anchor("Modifier", "", sprintf("onclick=\"modify_param_detail('%s','%s','%s','%s')\""
65  , $_REQUEST['plugin_code'], $_REQUEST['ac'], $_REQUEST['gDossier'], $this->fp_id));
66  $html.= '</td>';
67  return $html;
68  }
$html
Definition: ajax.php:32
$_REQUEST['sb']
Definition: am_print.php:39
RAPAV_Formula::display_row ( )

Definition at line 113 of file class_formulaire_param_detail.php.

References $ledger, RAPAV\get_ledger_name(), and RAPAV\str_date_type().

114  {
115  $ledger = RAPAV::get_ledger_name($this->jrn_def_id);
116  $paid = RAPAV::str_date_type($this->date_paid);
117  printf("Résultat de la formule %s utilisant $ledger %s", $this->fp_formula, $paid);
118  }
static str_date_type($p_type)
Compute the string to display for date.
Definition: class_rapav.php:58
static get_ledger_name($p_jrn)
Return the ledger's name of p_jrn.
Definition: class_rapav.php:35
RAPAV_Formula::input ( )

Definition at line 120 of file class_formulaire_param_detail.php.

References id, Formulaire_Param_Detail\input_date_paiement(), and Formulaire_Param_Detail\input_ledger().

121  {
122  $account = new IPoste("formula_new", "", "form_id");
123  if ($this->fp_id != -1)
124  {
125  $account->value=$this->fp_formula;
126  }
127  $account->size = 50;
128  $account->label = _("Recherche poste");
129  $account->set_attribute('gDossier', dossier::id());
130  $account->set_attribute('bracket', 1);
131  $account->set_attribute('no_overwrite', 1);
132  $account->set_attribute('noquery', 1);
133  $account->set_attribute('account', $account->id);
134  echo $account->input();
135  $this->input_date_paiement();
136  $this->input_ledger();
137  }
$select_type id
input_date_paiement()
Display a select for the date.
input_ledger()
display a choice of ledger cn
Formulaire_Param_Detail::input_date_paiement ( )
inherited

Display a select for the date.

Definition at line 91 of file class_formulaire_param_detail.php.

Referenced by input(), RAPAV_Account_Tva\input(), and RAPAV_Account\input().

92  {
93  $s_date = new ISelect('p_paid');
94  $s_date->value = array();
95  $s_date->value[] = array("value" => 0, "label" => 'Date d\'opération');
96  $s_date->value[] = array("value" => 1, "label" => 'Date de paiement');
97  $s_date->value[] = array("value" => 2, "label" => 'Date d\'échéance');
98  echo '<p> Si la date donnée concerne la date de paiement ou d\'écheance, cela limitera la recherche aux journaux VEN et ACH ';
99  echo HtmlInput::infobulle(36);
100  if ( $this->fp_id != -1)
101  {
102  $s_date->selected=$this->date_paid;
103  }
104  echo $s_date->input();
105  echo '</p>';
106  }
Formulaire_Param_Detail::input_ledger ( )
inherited

display a choice of ledger cn

Definition at line 73 of file class_formulaire_param_detail.php.

References $cn, and $select.

Referenced by input(), RAPAV_Account_Tva\input(), RAPAV_Account\input(), and RAPAV_Reconcile\input().

74  {
75  global $cn;
76  $select = new ISelect('p_ledger');
77  $a_ledger = $cn->make_array('select jrn_def_id,jrn_def_name from jrn_def order by 2', 1);
78  $a_ledger[0]['label'] = '-- Tous les journaux -- ';
79  $select->value = $a_ledger;
80  if ( $this->fp_id != -1)
81  {
82  $select->selected=$this->jrn_def_id;
83  }
84 
85  echo '<p> Filtrage par journal ' . $select->input() . '</p>';
86  }
global $cn
Formulaire_Param_Detail::input_new (   $p_id)
inherited

Definition at line 36 of file class_formulaire_param_detail.php.

References $cn.

37  {
38  global $cn;
39  $parent = new Formulaire_Param($p_id);
40  echo HtmlInput::title_box('Formule', 'param_detail_div');
41  echo '<h2>' . $parent->p_code . " " . $parent->p_libelle . '</h2>';
42 
43  require_once 'template/param_detail_new.php';
44  }
manage the table rapport_avance.formulaire_param
global $cn
Formulaire_Param_Detail::input_new_child (   $p_id)
inherited

Definition at line 45 of file class_formulaire_param_detail.php.

References $cn.

45  {
46  global $cn;
47  $parent = new Formulaire_Param($p_id);
48  echo HtmlInput::title_box('Formule', 'param_detail_div');
49  echo '<h2>' . $parent->p_code . " " . $parent->p_libelle . '</h2>';
50 
51  require_once 'template/param_detail_new_child.php';
52  }
manage the table rapport_avance.formulaire_param
global $cn
static RAPAV_Formula::new_row ( )
static

Definition at line 138 of file class_formulaire_param_detail.php.

References $obj.

139  {
140  $obj=new RAPAV_Formula();
141  $obj->input();
142  }
RAPAV_Formula::verify ( )

Definition at line 143 of file class_formulaire_param_detail.php.

References $errcode, $ret, and RAPAV\verify_compute().

144  {
145  global $errcode;
146  $ret = RAPAV::verify_compute($this->fp_formula);
147  $this->errcode = $errcode;
148  return $ret;
149  }
$ret
static verify_compute($p_formula)
check if the formula is valid, return 1 for an error and set errcode to the error msg errcode is glob...

The documentation for this class was generated from the following file: