Plugins  LAST
 All Data Structures Files Functions Variables Pages
Public Member Functions | Static Public Member Functions
RAPAV_Account_Tva Class Reference
Inheritance diagram for RAPAV_Account_Tva:
Inheritance graph
Collaboration diagram for RAPAV_Account_Tva:
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 153 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_Account_Tva::display_row ( )

Definition at line 156 of file class_formulaire_param_detail.php.

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

157  {
158  global $cn;
159  $ledger = RAPAV::get_ledger_name($this->jrn_def_id);
160  $type_total = $cn->get_value("select tt_label from rapport_advanced.total_type where tt_id=$1", array($this->tt_id));
161  $paid = RAPAV::str_date_type($this->date_paid);
162  printf("Poste comptable %s avec le code tva %s (%s) dans le journal de type %s [ %s ] $ledger %s", $this->tmp_val, $this->tva_id, $this->tva_id, $this->jrn_def_type, $type_total, $paid);
163  }
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
global $cn
RAPAV_Account_Tva::input ( )

Definition at line 165 of file class_formulaire_param_detail.php.

References $cn, $select, $tva, $tva_id, id, Formulaire_Param_Detail\input_date_paiement(), and Formulaire_Param_Detail\input_ledger().

166  {
167  global $cn;
168  $account = new IPoste("formtva", "", "formtva_id");
169  $account->size = 20;
170  $account->label = _("Recherche poste");
171  $account->set_attribute('gDossier', dossier::id());
172  $account->set_attribute('noquery', 1);
173  $account->set_attribute('account', $account->id);
174  $account->value=$this->tmp_val;
175 
176  $tva = new ITva_Popup("code_tva");
177  $tva->id = HtmlInput::generate_id("code_tva");
178  $tva->set_attribute('gDossier', dossier::id());
179  $tva->value=$this->tva_id;
180  // Jrn type
181  $select = new ISelect('code_jrn');
182  $select->value = array(
183  array('value' => 'VEN', 'label' => 'journaux Vente'),
184  array('value' => 'ACH', 'label' => 'journaux Achat')
185  );
186  $select->selected=$this->jrn_def_type;
187  echo '<table>';
188  echo '<tr><td>Poste comptable</td>';
189  echo td($account->input());
190  echo '</tr>';
191  echo td('TVA') . td($tva->input());
192  echo '</tr>';
193  echo td(_('Choix du type de journal ')) . td($select->input());
194  // Base or VAT
195  echo '</tr>';
196  $code_base = new ISelect('code_base');
197  $code_base->value = $cn->make_array("select tt_id,tt_label from rapport_advanced.total_type order by 2");
198  $code_base->selected=$this->tt_id;
199  echo td("Type de total");
200  echo td($code_base->input());
201  echo '</tr>';
202  echo '</table>';
203  $this->input_date_paiement();
204  $this->input_ledger();
205  }
$select_type id
input_date_paiement()
Display a select for the date.
input_ledger()
display a choice of ledger cn
if(isset($_POST['save'])) $tva
global $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 RAPAV_Formula\input(), 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 RAPAV_Formula\input(), 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_Account_Tva::new_row ( )
static

Definition at line 206 of file class_formulaire_param_detail.php.

References $obj.

207  {
208  $obj=new RAPAV_Account_Tva();
209  $obj->input();
210  }
RAPAV_Account_Tva::verify ( )

Definition at line 211 of file class_formulaire_param_detail.php.

References $cn.

212  {
213  global $cn;
214  if (trim($this->tmp_val) == "")
215  {
216  $this->errcode = 'Poste comptable est vide';
217  return 1;
218  }
219  $count = $cn->get_value("select count(*) from tva_rate where tva_id=$1", array($this->tva_id));
220  if ($count == 0)
221  {
222  $this->errcode = 'Code TVA inexistant';
223  return 1;
224  }
225  }
global $cn

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