Definition at line 269 of file class_ext_list_intra.php.
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().
134 $own=
new Own($this->db);
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);
145 }
catch ( Exception $e) {
146 echo $e->getMessage();
150 if ( $p_flag_quaterly == 1) {
152 $per_start=
"01.".$p_periode.
".".
$p_year;
154 $per_end=
"31".
".".$p_periode.
".".
$p_year;
155 while ( checkdate($p_periode,$day,
$p_year) ==
false && $day > 25) {
157 $per_end=$day.
".".$p_periode.
".".
$p_year;
159 if ($day < 28 ) { echo __FILE__.__LINE__.
" Erreur de date $day"; exit;}
162 if ( $p_flag_quaterly == 2 ) {
168 if ( $p_flag_quaterly == 3 ) {
170 $per_start=
'01.01.'.$p_year;
171 $per_end=
'31.12.'.$p_year;
$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.
83 require_once NOALYSS_INCLUDE.
'/lib/class_iradio.php';
84 $monthly=
new IRadio(
'periodic');
88 $month=
new ISelect(
'bymonth');
90 for ($i=0;$i<12;$i++) {
91 $array[$i][
'value']=$i+1;
$array[$i][
'label']=sprintf(
'%02d',($i+1));
94 $monthly->selected=
true;
98 $year =
new IText(
'year');
103 $quater=
new ISelect(
'byquaterly');
105 for ($i=0;$i<4;$i++) {
106 $array[$i][
'value']=$i+1;
$array[$i][
'label']=sprintf(
'%02d',($i+1));
109 $quaterly=
new IRadio(
'periodic');
114 $str_submit=HtmlInput::submit(
'decl',_(
'Afficher'));
115 $str_hidden=HtmlInput::extension().dossier::hidden();
118 $str_hidden.=HtmlInput::request_to_hidden(array(
'ac'));
121 $yearly=
new IRadio(
'periodic');
126 require_once(
'form_periode.php');
127 $r=ob_get_contents();
if(isset($_POST['remove'])) $array
Ext_List_Intra::compute |
( |
| ) |
|
|
inherited |
Definition at line 166 of file class_ext_list_intra.php.
References $a, $array, $fiche, $sql, and Listing\find_tva_code().
168 $code_customer=
new Acc_Parm_Code($this->db);
169 $code_customer->p_code=
'CUSTOMER';
170 $code_customer->load();
173 if (trim(
$a)==
'')
$a=-1;
175 select sum(j_montant) as amount,j_qcode
177 where j_grpt in (select distinct j_grpt from quant_sold join jrnx using (j_id) where qs_vat_code in (
$a) )
178 and j_poste::text like $1||'%'
179 and (j_date >= to_date($2,'DD.MM.YYYY') and j_date <= to_date($3,'DD.MM.YYYY'))
183 $all=$this->db->get_array(
$sql,array($code_customer->p_value,
184 $this->start_periode,
191 for ($i=0;$i<count($all);$i++){
193 $child->set_parameter(
'amount',$all[$i][
'amount']);
194 switch ($this->flag_periode) {
197 $child->set_parameter(
'periode',sprintf(
'%02d%s',$this->periode_dec,$this->exercice));
201 $child->set_parameter(
'periode',sprintf(
'3%d%s',$this->periode_dec,$this->exercice));
205 $child->set_parameter(
'periode',sprintf(
'00%s',$this->periode_dec,$this->exercice));
209 $child->set_parameter(
'qcode',$all[$i][
'j_qcode']);
210 $fiche=
new Fiche($this->db);
211 $fiche->get_by_qcode($all[$i][
'j_qcode'],
false);
212 $num_tva=
$fiche->strAttribut(ATTR_DEF_NUMTVA);
214 if ( trim($num_tva) ===
"") {
continue;}
215 $child->set_parameter(
'tva_num',$num_tva);
217 $child->set_parameter(
'name_child',
$fiche->strAttribut(ATTR_DEF_NAME));
218 $child->set_parameter(
'code',
'L');
if(isset($_POST['remove'])) $array
Ext_List_Intra::display |
( |
| ) |
|
|
inherited |
Definition at line 84 of file class_ext_list_intra.php.
References $_REQUEST, $r, Ext_List_Intra\display_declaration_amount(), Ext_Tva_Gen\display_info(), and id.
85 $r=
'<form class="print" id="readonly">';
87 $r.=HtmlInput::request_to_hidden(array(
'ac'));
90 $js_remove=sprintf(
"onclick=\"if ( confirm('%s')){remove_form('%s',%d,%d,'li');}\"",
91 "Vous confirmez vouloir effacer ?",
96 $r.=HtmlInput::button(
'Effacer',
'Effacer',$js_remove);
97 $r.= create_script(
"$('readonly').disable();");
display_info()
display the information about the company
display_declaration_amount($p_readonly=false)
Ext_List_Intra::display_declaration_amount |
( |
|
$p_readonly = false | ) |
|
|
inherited |
- Todo:
- finish it
Definition at line 227 of file class_ext_list_intra.php.
References $a, $amount, $f, $r, $res, and Ext_Tva_Gen\get_parameter().
Referenced by Ext_List_Intra\display().
228 $res=
'<fieldset><legend>Listing</legend>';
230 $res.=
'<table id="tb_dsp" class="result" style="width:80%;">';
231 $clean=
new IButton();
232 $clean->label=
'Efface ligne';
233 $clean->javascript=
"deleteRow('tb_dsp',this);";
238 $r.=th(
'Code Pays et numéro de TVA');
239 $r.=th(
'Code Pays et numéro de TVA');
245 for ($i=0;$i<count($this->aChild);$i++) {
247 $b=
new IText(
'name_child[]',$this->aChild[$i]->
get_parameter(
'name_child'));
248 $c=
new IText(
'tva_num_child[]',$this->aChild[$i]->
get_parameter(
'tva_num'));
249 $d=
new IText(
'tvacode[]',$this->aChild[$i]->
get_parameter(
'code'));
250 $e=
new INum(
'amount[]',$this->aChild[$i]->
get_parameter(
'amount'));
260 if (! $p_readonly)
$r.=td($clean->input());
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().
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();
190 if (isset($this->date_decl)) { $idate=
new IText(
'date',format_date($this->date_decl));
$str_date=$idate->input();}
194 if ( isset($this->start_date) ){
195 $str_start=format_date($this->start_date);
196 $str_end=format_date($this->end_date);
201 require_once(
'form_decl_info.php');
202 $r=ob_get_contents();
switch($sep_field->selected) $str_date
Listing::find_tva_code |
( |
|
$p_array | ) |
|
|
inherited |
Ext_List_Intra::from_array |
( |
|
$p_array | ) |
|
|
inherited |
Definition at line 48 of file class_ext_list_intra.php.
References $amount, $array, $name, and $periode.
49 if( isset($p_array[
'name_child'])) {
50 $name=$p_array[
'name_child'];
51 $qcode=$p_array[
'qcode'];
52 $code=$p_array[
'tvacode'];
53 $tva_num=$p_array[
'tva_num_child'];
58 for ($i=0;$i<count(
$name);$i++){
60 $child->set_parameter(
'amount',
$amount[$i]);
61 $child->set_parameter(
'periode',
$periode[$i]);
62 $child->set_parameter(
'qcode',$qcode[$i]);
63 $child->set_parameter(
'code',$code[$i]);
64 $child->set_parameter(
'name_child',
$name[$i]);
65 $child->set_parameter(
'tva_num',$tva_num[$i]);
71 $this->aChild=array();
73 $this->start_periode=$p_array[
'start_periode'];
74 $this->end_periode=$p_array[
'end_periode'];
75 $this->flag_periode=$p_array[
'flag_periode'];
76 $this->tva_name=$p_array[
'name'];
77 $this->num_tva=$p_array[
'num_tva'];
78 $this->adress=$p_array[
'adress'];
79 $this->country=$p_array[
'country'];
80 $this->periode_dec=$p_array[
'periode_dec'];
81 $this->exercice=$p_array[
'exercice'];
if(isset($_POST['remove'])) $array
Ext_Tva_Gen::get_info |
( |
| ) |
|
|
inherited |
Ext_Tva_Gen::get_parameter |
( |
|
$p_string | ) |
|
|
inherited |
Ext_List_Intra_Child::insert |
( |
| ) |
|
Definition at line 280 of file class_ext_list_intra.php.
References $sql, and $variable.
284 "tva_num"=>
"ic_tvanum",
285 "amount"=>
"ic_amount",
287 "periode"=>
"ic_periode",
290 "name_child"=>
'ic_name'
294 INSERT INTO tva_belge.intracomm_chld(
295 i_id, ic_tvanum, ic_amount, ic_code, ic_periode, ic_qcode,
Definition at line 100 of file class_ext_list_intra.php.
References $array, $res, and $sql.
101 $sql=
"select * from tva_belge.intracomm where i_id=$1";
103 $res=$this->db->get_array(
107 if ( $this->db->count() == 0 )
return 0;
108 foreach (
$res[0] as $idx=>$value) { $this->$idx=$value; }
110 $sql=
"select * from tva_belge.intracomm_chld where i_id=$1";
111 $res=$this->db->get_array(
115 $nb=$this->db->count();
118 for ($i=0;$i<$nb;$i++){
120 foreach (
$res[$i] as $idx=>$value){
if(isset($_POST['remove'])) $array
Ext_Tva_Gen::set_parameter |
( |
|
$p_string, |
|
|
|
$p_value |
|
) |
| |
|
inherited |
Ext_List_Intra::update |
( |
| ) |
|
|
inherited |
Ext_List_Intra::verify |
( |
| ) |
|
|
inherited |
Ext_List_Intra_Child::$variable |
|
protected |
Initial value:=array(
"id"=>"ic_id",
"tva_num"=>"ic_tvanum",
"amount"=>"ic_amount",
"code"=>"ic_code",
"periode"=>"ic_periode",
"depend"=>"i_id",
"qcode"=>"ic_qcode",
"name_child"=>'ic_name'
)
Definition at line 270 of file class_ext_list_intra.php.
Referenced by insert().
The documentation for this class was generated from the following file: