'; $cn=Dossier::connect(); //----------------------------------------------------- // Periode //----------------------------------------------------- require_once NOALYSS_INCLUDE."/class/periode.class.php"; require_once NOALYSS_INCLUDE."/class/periode_ledger.class.php"; $http=new HttpInput(); $p_ledger_id=$http->request("jrn_def_id", "number", 0); ?> post("p_exercice", "number"); $p_year=$http->post("p_year", "number"); $nb_month=$http->post("nb_month", "number"); $from_month=$http->post("from_month", "number"); $day_opening=$http->post("day_opening", "string", 0); $day_closing=$http->post("day_closing", "string", 0); $exercice=new Periode($cn); $exercice->insert_exercice($p_exercice, $p_year, $from_month, $nb_month, $day_opening, $day_closing); } catch (Exception $ex) { echo_warning($ex->getMessage()); } } //------------------------------------------------------------------- // Select a ledger or global //------------------------------------------------------------------- echo '
"; // display a filter by exercice echo _("Montrer l'exercice"); $max_exercice=$cn->get_value("select max(p_exercice) from parm_periode"); $p_exercice=$http->request("p_exercice","string",$max_exercice); Periode::filter_exercice($p_exercice); $js_close_selected="jsper.close_selected()"; echo HtmlInput::button_action(_("Fermer les périodes sélectionnées"), $js_close_selected); /* * Display all the periode for all ledgers */ if ($p_ledger_id==0) { echo HtmlInput::button_action(_("Ajout exercice"), "\$('exercice_add').show()"); //------------------------------------------------------------------- // Add a new Exercice //------------------------------------------------------------------- echo ' '; //------------------------------------------------------------------- // Add a new Periode //------------------------------------------------------------------- echo HtmlInput::button_action(_("Ajout période"), "\$('periode_add').show()"); echo ' '; //------------------------------------------------------------------- // List of Periode //------------------------------------------------------------------- $periode=new Parm_Periode_SQL($cn); Periode::display_periode_global("jsper"); } else { echo ''._("Pour ajouter, effacer ou modifier une période, il faut choisir global").'
'; $ledger=new Acc_Ledger($cn, $p_ledger_id); echo h2($ledger->get_name()); $periode_ledger=new Periode_Ledger_Table(0); $ret=$periode_ledger->get_resource_periode_ledger($p_ledger_id); $periode_ledger->display_table($ret, "jsper"); } echo ''; ?>