request("exercice","number",0); if ($exercice == 0 ){ $exercice=$g_user->get_exercice(); } bcscale(2); echo '
'; /* * Let you change the exercice */ echo '
'; echo _('Choisissez un autre exercice')." : "; $ex=new Exercice($cn); $js=sprintf("updatePeriode(%d,'%s','%s','%s',1)",Dossier::id(),'exercice','from_periode','to_periode'); $wex=$ex->select('exercice',$exercice,' onchange="'.$js.'"'); echo $wex->input(); echo dossier::hidden(); echo HtmlInput::get_to_hidden(array('ac','type')); // Show the form for period echo HtmlInput::get_to_hidden(array('ac')); echo HtmlInput::hidden('type','bal'); echo dossier::hidden(); // filter on the current year $from=$http->get("from_periode", "number",0); $input_from=new IPeriod("from_periode",$from,$exercice); $input_from->id="from_periode"; $input_from->show_end_date=false; $input_from->type=ALL; $input_from->cn=$cn; $input_from->filter_year=true; $input_from->user=$g_user; echo _('Depuis').' :'.$input_from->input(); // filter on the current year $to=$http->get("to_periode", "number",0); if( $to == 0) { $t_periode=new Periode($cn); list($per_max,$per_min)=$t_periode->get_limit($exercice); $to=$per_min->p_id; } $input_to=new IPeriod("to_periode",$to,$exercice); $input_to->id="to_periode"; $input_to->show_start_date=false; $input_to->filter_year=true; $input_to->type=ALL; $input_to->cn=$cn; $input_to->user=$g_user; echo " "._('jusque').' :'.$input_to->input(); echo '
'; echo HtmlInput::button_action(_('Avancé'), " if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}"); //------------------------------------------------- echo '
"; ?>