} else { $db->rollback(); setEventMessage($object->error, 'errors'); $action = 'create'; } } else { $action = 'create'; } } else { header("Location: ./fiscalyear.php"); exit; } } else { if ($action == 'update') { if (!GETPOST('cancel', 'alpha')) { $result = $object->fetch($id); $object->date_start = empty($_POST["fiscalyear"]) ? '' : $date_start; $object->date_end = empty($_POST["fiscalyearend"]) ? '' : $date_end; $object->label = GETPOST('label', 'alpha'); $object->statut = GETPOST('statut', 'int'); $result = $object->update($user); if ($result > 0) { header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else { setEventMessage($object->error, 'errors'); } } else { header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; }
*/ /** * \file htdocs/accountancy/admin/fiscalyear_card.php * \brief Page to show info of a fiscal year */ 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'; $langs->load("admin"); $langs->load("compta"); // Security check if (!$user->admin) { accessforbidden(); } $id = GETPOST('id', 'int'); // View llxHeader(); if ($id) { $object = new Fiscalyear($db); $object->fetch($id); $object->info($id); $head = fiscalyear_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("FiscalYearCard"), 0, 'cron'); print '<table width="100%"><tr><td>'; dol_print_object_info($object); print '</td></tr></table>'; print '</div>'; } llxFooter(); $db->close();