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

Public Member Functions

 find_tva_code ($p_array)
 
 get_parameter ($p_string)
 
 set_parameter ($p_string, $p_value)
 
 get_info ()
 
 save ()
 
 blank ($p_year, $p_periode, $p_flag_quaterly)
 
 display_info ()
 display the information about the company More...
 

Static Public Member Functions

static choose_periode ($by_year=false)
 

Detailed Description

Definition at line 28 of file class_listing.php.

Member Function Documentation

Ext_Tva_Gen::blank (   $p_year,
  $p_periode,
  $p_flag_quaterly 
)
inherited

Definition at line 132 of file class_ext_tvagen.php.

References $GLOBALS, $p_year, and Ext_Tva_Gen\set_parameter().

132  {
133  // load parameter from myown
134  $own=new Own($this->db);
135  $this->set_parameter("name",$own->MY_NAME);
136  $this->set_parameter("num_tva",$own->MY_TVA);
137  $this->set_parameter('adress',$own->MY_STREET.",".$own->MY_NUMBER);
138  $this->set_parameter('country',$own->MY_COUNTRY." ".$own->MY_CP." ".$own->MY_COMMUNE);
139  $this->set_parameter('flag_periode',$p_flag_quaterly);
140  $this->set_parameter('periode_dec',$p_periode);
141  $this->set_parameter('exercice',$p_year);
142 
143  try {
144  $this->verify() ;
145  } catch ( Exception $e) {
146  echo $e->getMessage();
147  throw $e;
148  }
149  // by month
150  if ( $p_flag_quaterly == 1) {
151  // start periode = 01 to 31, $p_periode contains the month
152  $per_start="01.".$p_periode.".".$p_year;
153  $day=31;
154  $per_end="31".".".$p_periode.".".$p_year;
155  while ( checkdate($p_periode,$day,$p_year) == false && $day > 25) {
156  $day--;
157  $per_end=$day.".".$p_periode.".".$p_year;
158  }
159  if ($day < 28 ) { echo __FILE__.__LINE__." Erreur de date $day"; exit;}
160  }
161 
162  if ( $p_flag_quaterly == 2 ) {
163  // compute start periode
164  $per_start=$GLOBALS['quaterly_limit'][$p_periode][0].".".$p_year;
165  $per_end=$GLOBALS['quaterly_limit'][$p_periode][1].".".$p_year;
166 
167  }
168  if ( $p_flag_quaterly == 3 ) {
169  // compute start periode
170  $per_start='01.01.'.$p_year;
171  $per_end='31.12.'.$p_year;
172  }
173 
174  $this->set_parameter('start_periode',$per_start);
175  $this->set_parameter('end_periode',$per_end);
176 
177  }
$GLOBALS['quaterly_limit']
set_parameter($p_string, $p_value)
static Ext_Tva_Gen::choose_periode (   $by_year = false)
staticinherited

Definition at line 82 of file class_ext_tvagen.php.

References $_REQUEST, $array, $by_year, $r, $str_byyear, $str_hidden, $str_month, $str_monthly, $str_quater, $str_quaterly, $str_submit, $str_year, and $year.

82  {
83  require_once NOALYSS_INCLUDE.'/lib/class_iradio.php';
84  $monthly=new IRadio('periodic');
85  $monthly->value=1;
86 
87  // month
88  $month=new ISelect('bymonth');
89  $array=array ();
90  for ($i=0;$i<12;$i++) {
91  $array[$i]['value']=$i+1; $array[$i]['label']=sprintf('%02d',($i+1));
92  }
93  $month->value=$array;
94  $monthly->selected=true;
95  $str_monthly=$monthly->input();
96  $str_month=$month->input();
97  // year
98  $year = new IText('year');
99  $year->size=4;
100  $str_year=$year->input();
101 
102  // Tri
103  $quater=new ISelect('byquaterly');
104  $array=array();
105  for ($i=0;$i<4;$i++) {
106  $array[$i]['value']=$i+1; $array[$i]['label']=sprintf('%02d',($i+1));
107  }
108  $quater->value=$array;
109  $quaterly=new IRadio('periodic');
110  $quaterly->value=2;
111  $str_quaterly=$quaterly->input();
112  $str_quater=$quater->input();
113 
114  $str_submit=HtmlInput::submit('decl',_('Afficher'));
115  $str_hidden=HtmlInput::extension().dossier::hidden();
116  if (isset($_REQUEST['sa']))
117  $str_hidden.=HtmlInput::hidden('sa',$_REQUEST['sa']);
118  $str_hidden.=HtmlInput::request_to_hidden(array('ac'));
119  $str_byyear='';
120  if ( $by_year == true ) {
121  $yearly=new IRadio('periodic');
122  $yearly->value=3;
123  $str_byyear=$yearly->input();
124  }
125  ob_start();
126  require_once('form_periode.php');
127  $r=ob_get_contents();
128  ob_end_clean();
129  return $r;
130  }
$r
if(isset($_POST['remove'])) $array
$_REQUEST['sb']
Definition: am_print.php:39
Ext_Tva_Gen::display_info ( )
inherited

display the information about the company

Definition at line 182 of file class_ext_tvagen.php.

References $exercice, $r, and $str_date.

Referenced by Ext_List_Intra\display(), Ext_List_Assujetti\display(), and Ext_Tva\display().

182  {
183  $itva=new IText('num_tva',$this->num_tva);$str_tva=$itva->input();
184  $iname=new IText('name',$this->tva_name); $str_name=$iname->input();
185  $iadress=new IText('adress',$this->adress);$str_adress=$iadress->input();
186  $icountry=new IText('country',$this->country);$str_country=$icountry->input();
187 
188  /* date */
189 
190  if (isset($this->date_decl)) { $idate=new IText('date',format_date($this->date_decl));$str_date=$idate->input();}
191 
192  /* periode */
193 
194  if ( isset($this->start_date) ){
195  $str_start=format_date($this->start_date);
196  $str_end=format_date($this->end_date);
197 
198  }
199  $ianne=$this->exercice;
200  ob_start();
201  require_once('form_decl_info.php');
202  $r=ob_get_contents();
203  ob_end_clean();
204  return $r;
205  }
if(isset($_POST['save'])) $exercice
$r
switch($sep_field->selected) $str_date
Listing::find_tva_code (   $p_array)

Definition at line 29 of file class_listing.php.

References $array.

Referenced by Ext_List_Intra\compute(), and Ext_List_Assujetti\compute().

30  {
31  $array=$this->db->make_list("
32  select distinct tva_id from tva_belge.parameter_chld
33  where
34  pcode=$1",
35  array($p_array));
36 
37  return $array;
38  }
if(isset($_POST['remove'])) $array
Ext_Tva_Gen::get_info ( )
inherited

Definition at line 72 of file class_ext_tvagen.php.

72 { return var_export(self::$variable,true); }
Ext_Tva_Gen::get_parameter (   $p_string)
inherited

Definition at line 54 of file class_ext_tvagen.php.

Referenced by Ext_List_Intra\display_declaration_amount(), Ext_List_Assujetti\display_declaration_amount(), Ext_Tva\display_declaration_amount(), and Ext_Tva_Gen\save().

54  {
55  if ( array_key_exists($p_string,$this->variable) ) {
56  $idx=$this->variable[$p_string];
57  return $this->$idx;
58  }
59  else
60  throw new Exception (__FILE__.":".__LINE__.'Erreur attribut inexistant');
61  }
Ext_Tva_Gen::save ( )
inherited

Definition at line 74 of file class_ext_tvagen.php.

References Ext_Tva_Gen\get_parameter().

74  {
75  /* please adapt */
76  if ( $this->get_parameter("id") == 0 )
77  $this->insert();
78  else
79  $this->update();
80  }
get_parameter($p_string)
Ext_Tva_Gen::set_parameter (   $p_string,
  $p_value 
)
inherited

Definition at line 62 of file class_ext_tvagen.php.

Referenced by Ext_Tva_Gen\blank(), and Ext_Tva\compute().

62  {
63  if ( array_key_exists($p_string,$this->variable) ) {
64  $idx=$this->variable[$p_string];
65  $this->$idx=$p_value;
66  }
67  else
68  throw new Exception (__FILE__.":".__LINE__.'Erreur attribut inexistant');
69 
70 
71  }

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