fiscalyear_info.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. /**
  18. * \file htdocs/accountancy/admin/fiscalyear_info.php
  19. * \ingroup Accountancy (Double entries)
  20. * \brief Page to show info of a fiscal year
  21. */
  22. require '../../main.inc.php';
  23. require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
  26. // Load translation files required by the page
  27. $langs->loadLangs(array("admin", "compta"));
  28. // Security check
  29. if ($user->socid > 0)
  30. accessforbidden();
  31. if (!$user->rights->accounting->fiscalyear->write)
  32. accessforbidden();
  33. $id = GETPOST('id', 'int');
  34. // View
  35. $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info");
  36. $helpurl = "";
  37. llxHeader("", $title, $helpurl);
  38. if ($id) {
  39. $object = new Fiscalyear($db);
  40. $object->fetch($id);
  41. $object->info($id);
  42. $head = fiscalyear_prepare_head($object);
  43. dol_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
  44. print '<table width="100%"><tr><td>';
  45. dol_print_object_info($object);
  46. print '</td></tr></table>';
  47. print '</div>';
  48. }
  49. // End of page
  50. llxFooter();
  51. $db->close();