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_List_Assujetti::choose_periode |
( |
|
$by_year = false | ) |
|
|
staticinherited |
Ext_List_Assujetti::compute |
( |
| ) |
|
|
inherited |
Definition at line 183 of file class_ext_list_assujetti.php.
References $a, $amount, $array, $fiche, $sql, and Listing\find_tva_code().
185 $code_customer=
new Acc_Parm_Code($this->db);
186 $code_customer->p_code=
'CUSTOMER';
187 $code_customer->load();
189 if (trim(
$a)==
'')
$a=-1;
191 select sum(j_montant) as amount,j_qcode
193 where j_grpt in (select distinct j_grpt from quant_sold join jrnx using (j_id) where qs_vat_code in (
$a) )
194 and j_poste::text like $1||'%'
195 and (j_date >= to_date($2,'DD.MM.YYYY') and j_date <= to_date($3,'DD.MM.YYYY'))
199 $all=$this->db->get_array(
$sql,array($code_customer->p_value,
200 $this->start_periode,
207 for ($i=0;$i<count($all);$i++){
211 $child->set_parameter(
'qcode',$all[$i][
'j_qcode']);
212 $fiche=
new Fiche($this->db);
213 $fiche->get_by_qcode($all[$i][
'j_qcode'],
false);
214 $num_tva=
$fiche->strAttribut(ATTR_DEF_NUMTVA);
215 $child->set_parameter(
'tva_num',$num_tva);
216 $sq=
"select sum(qs_vat) from quant_sold
217 where qs_client = $1 and j_id in (select distinct j_id from jrnx where j_date >= to_date($2,'DD.MM.YYYY')
218 and j_date <= to_date($3,'DD.MM.YYYY')
220 and qs_vat_code in ($a)
224 $exclude=
"select coalesce(sum(qs_price),0) from quant_sold
225 where qs_client = $1 and j_id in (select distinct j_id from jrnx where j_date >= to_date($2,'DD.MM.YYYY')
226 and j_date <= to_date($3,'DD.MM.YYYY')
228 and qs_vat_code not in ($a)
230 $excl=$this->db->get_value($exclude,array(
$fiche->id,
231 $this->start_periode,
232 $this->end_periode));
233 $amount_vat=$this->db->get_value($sq,array(
$fiche->id,
234 $this->start_periode,
235 $this->end_periode));
236 $amount=$all[$i][
'amount']-$amount_vat-$excl;
237 $child->set_parameter(
'amount',
$amount);
238 $child->set_parameter(
'amount_vat',$amount_vat);
240 $child->set_parameter(
'name_child',
$fiche->strAttribut(ATTR_DEF_NAME));
if(isset($_POST['remove'])) $array
Ext_List_Assujetti::display |
( |
| ) |
|
|
inherited |
Definition at line 101 of file class_ext_list_assujetti.php.
References $_REQUEST, $r, a_id, Ext_List_Assujetti\display_declaration_amount(), Ext_Tva_Gen\display_info(), and id.
102 $r=
'<form class="print" id="readonly">';
103 $r.=HtmlInput::request_to_hidden(array(
'ac'));
107 $js_remove=sprintf(
"onclick=\"if ( confirm('%s')){remove_form('%s',%d,%d,'lc');}\"",
108 "Vous confirmez vouloir effacer ?",
112 $r.=HtmlInput::button(
'Effacer',
'Effacer',$js_remove);
114 $r.= create_script(
"$('readonly').disable();");
display_info()
display the information about the company
display_declaration_amount($readonly=false)
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_amount from amortissement amortissement_histo where a_id
Ext_List_Assujetti::display_declaration_amount |
( |
|
$readonly = false | ) |
|
|
inherited |
- Todo:
- finish it
Definition at line 249 of file class_ext_list_assujetti.php.
References $a, $amount, $r, $res, and Ext_Tva_Gen\get_parameter().
Referenced by Ext_List_Assujetti\display().
250 $res=
'<fieldset><legend>Listing</legend>';
251 $res.=
'<table id="tb_dsp" class="result" style="width:80%;">';
252 $clean=
new IButton(
'rm_b');
253 $clean->label=
'Efface ligne';
254 $clean->javascript=
"deleteRow('tb_dsp',this);";
259 $r.=th(
'Code Pays et numéro de TVA');
260 $r.=th(
'montant CA');
261 $r.=th(
'montant TVA');
265 for ($i=0;$i<count($this->aChild);$i++) {
267 $b=
new IText(
'name_child[]',$this->aChild[$i]->
get_parameter(
'name_child'));
268 $c=
new IText(
'tva_num_child[]',$this->aChild[$i]->
get_parameter(
'tva_num'));
269 $e=
new INum(
'amount[]',$this->aChild[$i]->
get_parameter(
'amount'));
270 $d=
new INum(
'amount_vat[]',$this->aChild[$i]->
get_parameter(
'amount_vat'));
273 $amount_vat+=round($this->aChild[$i]->
get_parameter(
'amount_vat'),2);
279 if (! $readonly)
$r.=td($clean->input());
289 $r.=td(hb(sprintf(
'%.02f',$amount_vat)));
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_Assujetti::from_array |
( |
|
$p_array | ) |
|
|
inherited |
Definition at line 67 of file class_ext_list_assujetti.php.
References $amount, $array, and $name.
68 if ( isset($p_array[
'name_child'])) {
69 $name=$p_array[
'name_child'];
70 $qcode=$p_array[
'qcode'];
71 $code=$p_array[
'plugin_code'];
72 $tva_num=$p_array[
'tva_num_child'];
74 $amount_vat=$p_array[
'amount_vat'];
77 for ($i=0;$i<count(
$name);$i++){
79 $child->set_parameter(
'amount',
$amount[$i]);
80 $child->set_parameter(
'amount_vat',$amount_vat[$i]);
81 $child->set_parameter(
'qcode',$qcode[$i]);
82 $child->set_parameter(
'name_child',
$name[$i]);
83 $child->set_parameter(
'tva_num',$tva_num[$i]);
89 $this->aChild=array();
91 $this->start_periode=$p_array[
'start_periode'];
92 $this->end_periode=$p_array[
'end_periode'];
93 $this->flag_periode=$p_array[
'flag_periode'];
94 $this->tva_name=$p_array[
'name'];
95 $this->num_tva=$p_array[
'num_tva'];
96 $this->adress=$p_array[
'adress'];
97 $this->country=$p_array[
'country'];
98 $this->periode_dec=$p_array[
'periode_dec'];
99 $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_Assujetti_Child::insert |
( |
| ) |
|
Definition at line 297 of file class_ext_list_assujetti.php.
302 "tva_num"=>
"ac_tvanum",
303 "amount"=>
"ac_amount",
304 "amount_vat"=>
"ac_vat",
307 "name_child"=>
'ac_name'
312 INSERT INTO tva_belge.assujetti_chld(
313 a_id, ac_tvanum, ac_amount, ac_vat, ac_qcode,
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_amount from amortissement amortissement_histo where a_id
Ext_List_Assujetti::load |
( |
| ) |
|
|
inherited |
Definition at line 117 of file class_ext_list_assujetti.php.
References $array, $res, $sql, and a_id.
118 $sql=
"select * from tva_belge.assujetti where a_id=$1";
120 $res=$this->db->get_array(
124 if ( $this->db->count() == 0 )
return 0;
125 foreach (
$res[0] as $idx=>$value) { $this->$idx=$value; }
127 $sql=
"select * from tva_belge.assujetti_chld where a_id=$1";
128 $res=$this->db->get_array(
132 $nb=$this->db->count();
135 for ($i=0;$i<$nb;$i++){
137 foreach (
$res[$i] as $idx=>$value){
if(isset($_POST['remove'])) $array
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_amount from amortissement amortissement_histo where a_id
Ext_Tva_Gen::set_parameter |
( |
|
$p_string, |
|
|
|
$p_value |
|
) |
| |
|
inherited |
Ext_List_Assujetti::update |
( |
| ) |
|
|
inherited |
Ext_List_Assujetti::verify |
( |
| ) |
|
|
inherited |
Ext_List_Assujetti_Child::$variable |
|
protected |
Initial value:=array(
"id"=>"ac_id",
"tva_num"=>"ac_tvanum",
"amount"=>"ac_amount",
"amount_vat"=>"ac_vat",
"depend"=>"a_id",
"qcode"=>"ac_qcode",
"name_child"=>'ac_name'
)
Definition at line 288 of file class_ext_list_assujetti.php.
The documentation for this class was generated from the following file: