23if (!defined(
'ALLOWED'))
24 die(
'Appel direct ne sont pas permis');
26echo
'<div class="content">';
37 jsper.set_callback(
"ajax_misc.php");
38 jsper.set_js_obj_name(
"jsper");
39 jsper.set_dossier(
'<?php echo Dossier::id(); ?>');
46if ( isset(
$_POST[
'mod_exercice_label_bt'])) {
48 $p_exercice_label=
$http->post(
"p_exercice_label");
50 if (empty(trim($p_exercice_label))) {
51 echo_warning(_(
"Libellé exercice ne peut pas être vide"));
54 if (
$err == 0 &&
$cn->get_value(
"select count(*) from parm_periode where p_exercice_label=$1 and p_exercice <>$2",
57 echo_warning(_(
"Le même libellé ne peut pas être utilisé pour 2 exercices"));
73 $cn->exec_sql(
"alter table parm_periode disable trigger parm_periode_check_periode_trg");
74 $cn->exec_sql(
"update parm_periode set p_exercice_label=$1 where p_exercice=$2",
76 $cn->exec_sql(
"alter table parm_periode enable trigger parm_periode_check_periode_trg");
80 catch (Exception $exc)
83 error_log($exc->getTraceAsString());
99 $p_exercice_label=
$http->post(
"p_exercice_label",
"string");
100 $p_year=
$http->post(
"p_year",
"number");
101 $nb_month=
$http->post(
"nb_month",
"number");
102 $from_month=
$http->post(
"from_month",
"number");
103 $day_opening=
$http->post(
"day_opening",
"string", 0);
104 $day_closing=
$http->post(
"day_closing",
"string", 0);
107 $day_opening, $day_closing,$p_exercice_label);
109 catch (Exception
$ex)
117echo
'<form method="GET" >';
118echo dossier::hidden();
120 " jrn_def order by jrn_def_name");
121$sel_jrn[]=array(
'value'=>0,
'label'=>_(
'Global : periode pour tous les journaux'));
126echo _(
"Choisissez global ou uniquement le journal à fermer").$wSel->input();
129echo _(
"Montrer l'exercice");
147 "\$('exercice_add').show()");
151 echo
'<div id="exercice_add" style="display:none" class="inner_box">';
158 echo
'<div id="periode_add" style="display:none;width:auto" class="inner_box">';
165 echo
'<div id="exercice_label_div" style="display:none;width:60ch" class="inner_box">';
177 echo
'<p class="info">'._(
"Pour ajouter, effacer ou modifier une période, il faut choisir global").
'</p>';
190 activate_checkbox_range(
"sel_per_close_ck");
h2($p_string, $p_class="", $raw="")
echo_warning($p_string)
warns
catch(Exception $e) $exercice
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Display the periode per ledger: close : reopen ... the close , open must be done thanks Periode.
For the periode tables parm_periode and jrn_periode.
static form_exercice_add()
display a form (method POST) to input a new exercice variable in the FORM
static form_periode_add($p_js_var)
Display a form for the input of a new periode.
static form_exercice_label()
form to change the label of exercice
static filter_exercice($p_sel)
static display_periode_global($p_js)
Display a table with all the periode.