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 //----------------------------- echo JS_AJAX_OP; $a=new Anc_Operation($cn); echo '
'; echo dossier::hidden(); $hid=new widget("hidden"); $hid->name="p_action"; $hid->value="ca_od"; echo $hid->IOValue(); $hid->name="see"; $hid->value=""; echo $hid->IOValue(); $w=new widget("select"); $w->name="p_periode"; // filter on the current year $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->value=$periode_start; $w->selected=$current; echo $w->IOValue(); echo 'Période '.widget::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); echo JS_CAOD_COMPUTE; $wSubmit=new widget('hidden',"p_action","ca_od"); $wSubmit->table=0; echo '
'; echo '
'; echo dossier::hidden(); echo $wSubmit->IOValue(); echo $a->form(); echo widget::submit("save","Sauver"); echo '
'; echo '
Débit = Crédit = Difference =
'; echo '
'; exit(); } ?>