dolibarr/htdocs/accountancy/admin/fiscalyear_info.php

70 lines
1.9 KiB
PHP
Raw Normal View History

2014-07-05 08:47:01 +02:00
<?php
2019-01-28 21:39:22 +01:00
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
2014-07-05 08:47:01 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2014-07-05 08:47:01 +02:00
*/
/**
* \file htdocs/accountancy/admin/fiscalyear_info.php
* \ingroup Accountancy (Double entries)
* \brief Page to show info of a fiscal year
2014-07-05 08:47:01 +02:00
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
2014-07-05 08:47:01 +02:00
2018-05-26 23:52:52 +02:00
// Load translation files required by the page
$langs->loadLangs(array("admin", "compta"));
2014-07-05 08:47:01 +02:00
// Security check
2021-02-22 21:36:42 +01:00
if ($user->socid > 0) {
2016-09-06 22:42:15 +02:00
accessforbidden();
2021-02-22 21:36:42 +01:00
}
2021-10-23 07:13:08 +02:00
if (empty($user->rights->accounting->fiscalyear->write)) {
2016-02-01 15:07:12 +01:00
accessforbidden();
2021-02-22 21:36:42 +01:00
}
2014-07-05 08:47:01 +02:00
2016-02-01 15:07:12 +01:00
$id = GETPOST('id', 'int');
2014-07-05 08:47:01 +02:00
2014-07-05 08:47:01 +02:00
// View
$title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info");
$help_url = "EN:Module_Double_Entry_Accounting";
llxHeader('', $title, $help_url);
2014-07-05 08:47:01 +02:00
2016-02-01 15:07:12 +01:00
if ($id) {
2014-07-05 08:47:01 +02:00
$object = new Fiscalyear($db);
$object->fetch($id);
$object->info($id);
2016-09-06 22:42:15 +02:00
2014-07-05 08:47:01 +02:00
$head = fiscalyear_prepare_head($object);
2016-09-06 22:42:15 +02:00
2020-10-22 16:39:21 +02:00
print dol_get_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
2016-09-06 22:42:15 +02:00
2016-02-01 15:07:12 +01:00
print '<table width="100%"><tr><td>';
dol_print_object_info($object);
print '</td></tr></table>';
2016-09-06 22:42:15 +02:00
2016-02-01 15:07:12 +01:00
print '</div>';
2014-07-05 08:47:01 +02:00
}
2018-07-28 14:02:33 +02:00
// End of page
2014-07-05 08:47:01 +02:00
llxFooter();
$db->close();