Plugins  LAST
 All Data Structures Files Functions Variables Pages
imd_parameter.inc.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of NOALYSS.
5  *
6  * NOALYSS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * NOALYSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with NOALYSS; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /* $Revision$ */
21 
22 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
23 
24 /**
25  * @file
26  * @brief Matching between code from Noalyss and TVA code from file
27  *
28  */
29 
30 require_once DIR_IMPORT_ACCOUNT."/include/class_impacc_tva.php";
31 
32 $tva = new Impacc_TVA();
33 // If some data are submitted we must save them before displaying the list
34 $save=HtmlInput::default_value_post("save", "#");
35 ////////////////////////////////////////////////////////////
36 // Save modification
37 ////////////////////////////////////////////////////////////
38 if ( $save != "#")
39 {
40  $id=HtmlInput::default_value_post("pt_id", "0");
41  $tva_code=HtmlInput::default_value_post("tva_code", "");
42  $tva_id=HtmlInput::default_value_post("tva_id", 0);
43  if ( $tva_id != 0 &&
44  $tva_code !=""&&
45  $id!=0
46  )
47  {
48  try
49  {
50 
51  if ($id < 0 ) $tva->insert($tva_id,$tva_code);
52  else
53  $tva->update($id,$tva_id,$tva_code);
54  }
55  catch (Exception $ex)
56  {
57  alert($ex->getMessage());
58  }
59  }
60 
61 }
62 
63 $tva->display_list();
64 
65 
66 ?>