noalyss Version-9
tva.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// Copyright Author Dany De Bontridder danydb@aevalys.eu
20/** \file
21 * \brief included file for customizing with the vat (account,rate...)
22 */
23if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
24
27
28echo '<div class="content">';
29if ($own->MY_TVA_USE == 'N')
30{
31 echo '<h2 class="error">'._("Vous n'êtes pas assujetti à la TVA").'</h2>';
32 return;
33}
34
36
38
39$manage_table->set_callback("ajax_misc.php");
40$manage_table->add_json_param("op", "tva_parameter");
41$manage_table->create_js_script();
42$manage_table->display_table();
43echo '</div>';
44?>
45<script>
46 <?=$manage_table->get_object_name()?>.afterSaveFct=function(p_param,p_xmltext) {
47
48 try {
49
50 var xml = p_xmltext.responseXML;
51 var old_tva_id=getNodeText(xml.getElementsByTagName("previous_id")[0]);
52 if (old_tva_id != p_param.getAttribute("ctl_pk_id")) {
53 var ctl_row=getNodeText(xml.getElementsByTagName("ctl")[0])+"_"+old_tva_id;
54 $(ctl_row).remove();
55 }
56
57 } catch (e) {
58 console.error(e.message);
59 }
60}
61</script>
static connect()
Class to manage the company parameter (address, name...)
Configure the tva : code , rate, label ... When using Manage_Table_SQL.
ORM abstract of the view public.v_tva_rate.
$cn
Definition: tva.inc.php:25
$own
Definition: tva.inc.php:26
if($own->MY_TVA_USE=='N') $tva_rate
Definition: tva.inc.php:35
$manage_table
Definition: tva.inc.php:37