/** * @brief * check if the current ledger is closed * \return 1 for yes, otherwise 0 * \see Periode::is_closed */ function is_closed($p_periode) { $per = new Periode($this->db); $per->set_jrn($this->id); $per->set_periode($p_periode); $ret = $per->is_closed(); return $ret; }
} else { $count = $cn->get_value("select count(*) from parm_periode;"); if ($count > 1) { $Res = $cn->exec_sql("delete from parm_periode where p_id={$p_per}"); } else { alert(' Désolé mais vous devez avoir au moins une période'); } } $choose = "yes"; } if ($action == 'reopen') { $jrn_def_id = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0; $per = new Periode($cn); $jrn_def_id = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0; $per->set_jrn($jrn_def_id); $per->set_periode($_GET['p_per']); $per->reopen(); $choose = "yes"; } if ($choose == "yes") { echo '<p>'; echo HtmlInput::button_anchor('Autre Journal ?', '?choose=no&ac=' . $_REQUEST['ac'] . '&gDossier=' . dossier::id()); echo '</p>'; $per = new Periode($cn); $jrn = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0; $per->set_jrn($jrn); $per->display_form_periode(); $nb_exercice = new ISelect("nb_exercice"); $nb_exercice->value = array(array('value' => 12, 'label' => "12 périodes"), array('value' => 13, 'label' => "13 périodes")); require_once NOALYSS_INCLUDE . '/template/periode_add_exercice.php'; } else {