noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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/**
21 * \file
22 * \brief included file for customizing with the vat (account,rate...)
23 */
24if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
25
26$cn=Dossier::connect();
28
29echo '<div class="content">';
30if ($own->MY_TVA_USE == 'N')
31{
32 echo '<h2 class="error">'._("Vous n'êtes pas assujetti à la TVA").'</h2>';
33 return;
34}
35
37
39
40$manage_table->set_callback("ajax_misc.php");
41$manage_table->add_json_param("op", "tva_parameter");
42$manage_table->create_js_script();
43$manage_table->display_table();
44echo '</div>';
45?>
46<div class="row">
47 <div class="col-3 offset-3" >
48 <p class="notice" style="padding: 1rem">
49 <span class="font-weight-bold">Attention :</span> ajouter les codes TVA nécessaires à votre déclaration TVA et adapter en fonction
50 les rapports avancés ou le module de TVA.
51 </p>
52 </div>
53</div>
54<script>
55 <?=$manage_table->get_object_name()?>.afterSaveFct=function(p_param,p_xmltext) {
56
57 try {
58
59 var xml = p_xmltext.responseXML;
60 var old_tva_id=getNodeText(xml.getElementsByTagName("previous_id")[0]);
61 if (old_tva_id != p_param.getAttribute("ctl_pk_id")) {
62 var ctl_row=getNodeText(xml.getElementsByTagName("ctl")[0])+"_"+old_tva_id;
63 $(ctl_row).remove();
64 }
65
66 } catch (e) {
67 console.error(e.message);
68 }
69}
70</script>
span($p_string, $p_extra='')
Definition ac_common.php:43
p($p_string)
Definition ac_common.php:39
$manage_table
$opd_description style
catch(Exception $e) $tva_rate
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.