require_once NOALYSS_INCLUDE . '/class_user.php'; require_once NOALYSS_INCLUDE . '/user_menu.php'; require_once NOALYSS_INCLUDE . '/class_acc_ledger.php'; $gDossier = dossier::id(); global $cn; $show_menu = 1; $ledger = new Acc_Ledger($cn, -1); $sa = HtmlInput::default_value("sa", "", $_REQUEST); ////////////////////////////////////////////////////////////////////////// // Perform request action : update ////////////////////////////////////////////////////////////////////////// $action_frm = HtmlInput::default_value_post('action_frm', ''); if ($action_frm == 'update') { try { $ledger->id = $_POST['p_jrn']; if ($ledger->load() == -1) { throw new Exception(_('Journal inexistant')); } $ledger->verify_ledger($_POST); $ledger->update($_POST); $show_menu = 1; } catch (Exception $e) { alert($e->getMessage()); } } ////////////////////////////////////////////////////////////////////////// // Perform request action : delete ////////////////////////////////////////////////////////////////////////// if ($action_frm == 'delete') { $ledger->jrn_def_id = $_POST['p_jrn']; $ledger->id = $_POST['p_jrn'];