noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
tax_summary.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
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
21// Copyright Author Dany De Bontridder danydb@noalyss.eu
22/**
23 * @file
24 * @brief display summary of tax (VAT) possible parameter is time range
25 *
26 */
28$limit = $g_user->get_limit_current_exercice();
29
30$start = $http->request("start_date", "date", $limit[0]);
31$end = $http->request("end_date", "date", $limit[1]);
32
33$start_periode = new IDate("start_date", $start);
34$end_periode = new IDate("end_date", $end);
35echo '<div class="content">';
36echo '<FORM METHOD="GET">';
37echo HtmlInput::array_to_hidden(['gDossier','ac'],$_GET);
38echo HtmlInput::hidden("do","display");
39$select_tva=new ISelect("tva_type");
40$select_tva->value=array(
41 array("value"=>'O',"label"=>_("Opération")),
42 array("value"=>'P',"label"=>_("Paiement")),
43 array("value"=>'T',"label"=>_("TVA"))
44);
45$select_tva->selected=$http->get('tva_type','string','O');
46printf(_("Calcul d'après la date"));
47echo $select_tva->input();
48printf(_("Période du %s au %s"),
49 $start_periode->input(),
50 $end_periode->input());
51
52echo HtmlInput::submit("show_tax_summary",_("Afficher"));
53echo '</FORM>';
54echo '<hr>';
55if ( $http->get("do","string","no") == "display")
56{
58 $tax_summary->set_tva_type($select_tva->selected);
59 try {
60 try {
61 $tax_summary->check();
62 }catch (Exception $e)
63 {
64 echo '<span class="warning">';
65 echo $e->getMessage();
66 echo '</span>';
67
68 }
69 echo '<ul class="aligned-block">';
70 echo '<li>';
71 echo $tax_summary->form_export_csv();
72 echo '</li>';
73 echo '<li>';
74 echo $tax_summary->form_export_pdf();
75 echo '</li>';
76 echo '</ul>';
77 $tax_summary->display();
78 echo '<ul class="aligned-block">';
79 echo '<li>';
80 echo $tax_summary->form_export_csv();
81 echo '</li>';
82 echo '<li>';
83 echo $tax_summary->form_export_pdf();
84 echo '</li>';
85 echo '</ul>';
86
87 } catch (Exception $e) {
88 echo '<span class="warning">';
89 echo $e->getMessage();
90 echo '</span>';
91 }
92}
93echo '</div>';
global $g_user
if no group available , then stop
_("actif, passif,charge,...")
$_GET['qcode']
manage the http input (get , post, request) and extract from an array
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Compute , display and export the tax summary.
$start_periode
$select_tva
$end_periode