get_list(); if ( ! $m ) { echo '

'._('Aucun plan analytique défini').'

'; exit(); } //---------------------------------------------------------------------- // show the left menu //---------------------------------------------------------------------- echo '
'; //---------------------------------------------------------------------- // the pa_id is set // //---------------------------------------------------------------------- if ( isset($_GET['see'])) { // Show the list for the period // and exit //----------------------------- $a=new Anc_Operation($cn); echo '
'; echo dossier::hidden(); $hid=new IHidden(); $hid->name="ac"; $hid->value=$_REQUEST['ac']; echo $hid->input(); $hid->name="see"; $hid->value=""; echo $hid->input(); $w=new ISelect(); $w->name="p_periode"; // filter on the current year $filter_year=" where p_exercice='".$g_user->get_exercice()."'"; $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $g_user=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$g_user->get_periode(); $w->value=$periode_start; $w->selected=$current; echo $w->input(); echo 'Période '.HtmlInput::submit('gl_submit','Valider').'
'; echo '
'; echo $a->html_table($current); echo '
'; exit(); } if ( isset($_POST['save'])) { // record the operation and exit // and exit //----------------------------- echo '
'. _('Opération sauvée'); $a=new Anc_Group_Operation($cn); $a->get_from_array($_POST); $a->save(); echo $a->show(); echo '
'; exit(); } if ( isset($_GET['new'])) { //show the form for entering a new Anc_Operation //------------------------------------------ $a=new Anc_Group_Operation($cn); $wSubmit=new IHidden("p_action","ca_od"); $wSubmit->table=0; echo '
'; echo '
'; echo dossier::hidden(); echo $wSubmit->input(); echo $a->form(); echo HtmlInput::submit("save","Sauver"); echo '
'; echo '
Débit = Crédit = Difference =
'; echo '
'; exit(); } ?>