dolibarr  7.0.0-beta
info.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
24 require '../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
28 
29 $langs->load("compta");
30 $langs->load("bills");
31 
32 $id=GETPOST('id','int');
33 $action=GETPOST('action','aZ09');
34 
35 // Security check
36 $socid = GETPOST('socid','int');
37 if ($user->societe_id) $socid=$user->societe_id;
38 $result = restrictedArea($user, 'tax', '', '', 'charges');
39 
40 
41 /*
42  * View
43  */
44 $title=$langs->trans("VAT") . " - " . $langs->trans("Info");
45 $help_url='';
46 llxHeader("",$title,$helpurl);
47 
48 $object = new Tva($db);
49 $object->fetch($id);
50 $object->info($id);
51 
52 $head = vat_prepare_head($object);
53 
54 dol_fiche_head($head, 'info', $langs->trans("VATPayment"), -1, 'payment');
55 
56 $linkback = '<a href="'.DOL_URL_ROOT.'/compta/tva/reglement.php">'.$langs->trans("BackToList").'</a>';
57 
58 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', '');
59 
60 print '<div class="fichecenter">';
61 print '<div class="underbanner clearboth"></div>';
62 
63 print '<table width="100%"><tr><td>';
64 dol_print_object_info($object);
65 print '</td></tr></table>';
66 
67 print '</div>';
68 
70 
71 llxFooter();
72 
73 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='')
Show tab header of a card.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
Put here description of your class.
Definition: tva.class.php:33
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($_POST["cancel"]==$langs->trans("Cancel")&&!$id) if($action== 'setdatev'&&$user->rights->tax->charges->creer) if($action== 'add'&&$_POST["cancel"]<> $langs->trans("Cancel")) if($action== 'delete') $title
Actions.
Definition: card.php:183
dol_fiche_end($notab=0)
Show tab footer of a card.
llxHeader()
Empty header.
Definition: wrapper.php:46
print
Draft customers invoices.
Definition: index.php:91
vat_prepare_head($object)
Prepare array with list of tabs.
Definition: vat.lib.php:31
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $objcanvas=null)
Check permissions of a user to show a page and an object.