Plugins  LAST
 All Data Structures Files Functions Variables Pages
list_assujetti.inc.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of NOALYSS.
4  *
5  * NOALYSS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * NOALYSS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with NOALYSS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 /* $Revision$ */
20 
21 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
22 
23 /*!\file
24  * \brief listing intracom
25  */
26 echo '<div class="content" style="width:80%;margin-left:10%">';
27 require_once('class_ext_list_assujetti.php');
28 // verify the year
29 if ( isset($_REQUEST['year']) && (trim(strlen($_REQUEST['year'])) < 4 || isNumber($_REQUEST['year'] ) == 0 ||$_REQUEST['year'] < 2000||$_REQUEST['year']>2100)) {
30  alert(j(_('Année invalide'.' ['.$_REQUEST['year'].']')));
32  echo '</div>';
33  exit;
34 }
35 
36 // if the periode is not set we have to ask it
37 if ( ! isset($_REQUEST['decl']) ){
39  echo '</div>';
40  exit;
41 }
42 
43 $cn=Dossier::connect();
44 if (isset($_POST['save'] )) {
46  $save->from_array($_POST);
47  $save->insert();
48  echo h2info(_('Déclaration sauvée'));
49  echo $save->display();
50 
51  /**
52  *@todo add a div for the button generate, get_xml, create ODS, print...
53  */
54 // echo '<div style="position:absolute;z-index:14;top:25%;right:30" class="noprint">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>';
55  echo '</div>';
56  exit;
57 }
58 
60 
63 $str_year=$_GET['year'];
67 $by_year=true;
68 $tva->blank($_REQUEST['year'],1,3);
69 
70 
71 try {
72  $r=$tva->compute();
73 } catch (Exception $e) {
74 
76  echo '</div>';
77  return;
78  }
79 require_once('form_periode.php');
80 echo '<form class="print" method="post">';
81 echo dossier::hidden();
82 echo HtmlInput::extension();
83 echo HtmlInput::hidden('start_periode',$tva->start_periode);
84 echo HtmlInput::hidden('end_periode',$tva->end_periode);
85 echo HtmlInput::hidden('flag_periode',$tva->flag_periode);
86 echo HtmlInput::hidden('name',$tva->tva_name);
87 echo HtmlInput::hidden('num_tva',$tva->num_tva);
88 echo HtmlInput::hidden('adress',$tva->adress);
89 echo HtmlInput::hidden('country',$tva->country);
90 echo HtmlInput::hidden('periode_dec',$tva->periode_dec);
91 echo HtmlInput::hidden('exercice',$tva->exercice);
92 echo $tva->display_info();
93 echo $r;
94 echo $tva->display_declaration_amount();
95 echo HtmlInput::submit('save',_('Sauvegarde'));
96 echo '</form>';
97 echo '</div>';
98 
static choose_periode($by_year=false)
$r
$_REQUEST['sb']
Definition: am_print.php:39
if(isset($_REQUEST['year'])&&(trim(strlen($_REQUEST['year']))< 4||isNumber($_REQUEST['year'])==0||$_REQUEST['year']< 2000||$_REQUEST['year']>2100)) if(!isset($_REQUEST['decl'])) $cn
if(isset($_POST['save'])) $tva