dolibarr  16.0.5
fiscalyear_info.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
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 <https://www.gnu.org/licenses/>.
16  */
17 
24 require '../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
28 
29 // Load translation files required by the page
30 $langs->loadLangs(array("admin", "compta"));
31 
32 // Security check
33 if ($user->socid > 0) {
35 }
36 if (empty($user->rights->accounting->fiscalyear->write)) {
38 }
39 
40 $id = GETPOST('id', 'int');
41 
42 
43 // View
44 
45 $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info");
46 
47 $help_url = "EN:Module_Double_Entry_Accounting";
48 
49 llxHeader('', $title, $help_url);
50 
51 if ($id) {
52  $object = new Fiscalyear($db);
53  $object->fetch($id);
54  $object->info($id);
55 
56  $head = fiscalyear_prepare_head($object);
57 
58  print dol_get_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
59 
60  print '<table width="100%"><tr><td>';
61  dol_print_object_info($object);
62  print '</td></tr></table>';
63 
64  print '</div>';
65 }
66 
67 // End of page
68 llxFooter();
69 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
fiscalyear_prepare_head
fiscalyear_prepare_head(Fiscalyear $object)
Prepare array with list of tabs.
Definition: fiscalyear.lib.php:30
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
Fiscalyear
Class to manage fiscal year.
Definition: fiscalyear.class.php:31
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
dol_print_object_info
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
Definition: functions2.lib.php:205
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59