GetName(); $Jrn->GetRow( $_POST['from_periode'], $_POST['to_periode'], $p_cent); $rep=""; $submit=new widget(); $hid=new widget("hidden"); echo '
'; echo '

'.$Jrn->name.'

'; echo ""; echo ''; echo '"; echo '"; echo '"; echo ""; echo "
'. $submit->Submit('bt_other',"Autre journal"). $hid->IOValue("type","jrn")."
'. $submit->Submit('bt_pdf',"Export PDF"). $hid->IOValue("type","jrn"). $hid->IOValue("central",$p_cent). $hid->IOValue("jrn_id",$Jrn->id). $hid->IOValue("from_periode",$_POST['from_periode']). $hid->IOValue("to_periode",$_POST['to_periode']); echo "
'. $submit->Submit('bt_csv',"Export CSV"). $hid->IOValue("type","jrn"). $hid->IOValue("central",$p_cent). $hid->IOValue("jrn_id",$Jrn->id). $hid->IOValue("from_periode",$_POST['from_periode']). $hid->IOValue("to_periode",$_POST['to_periode']); echo "
"; if ( count($Jrn->row ) == 0 ) exit; echo ""; foreach ( $Jrn->row as $op ) { echo ""; // centralized if ( $p_cent == 'on') { echo ""; } echo "". "". "". "". "". "". ""; } echo "
".$op['j_id']."".$op['internal']."".$op['j_date']."".$op['poste']."".$op['description']."".$op['deb_montant']."".$op['cred_montant']."
"; echo "
"; exit; } //////////////////////////////////////////////////////////////////////////////// // Show the jrn and date //////////////////////////////////////////////////////////////////////////////// include_once('form_input.php'); include_once("postgres.php"); if ( $User->Admin() ==0) { $ret=make_array($cn,"select jrn_def_id,jrn_def_name from jrn_def join jrn_type on jrn_def_type=jrn_type_id join user_sec_jrn on uj_jrn_id=jrn_def_id where uj_login='$User->id' and uj_priv !='X' "); } else { $ret=make_array($cn,"select jrn_def_id,jrn_def_name from jrn_def join jrn_type on jrn_def_type=jrn_type_id"); } // Count the forbidden journaux $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, jrn_deb_max_line,jrn_cred_max_line from jrn_def join jrn_type on jrn_def_type=jrn_type_id join user_sec_jrn on uj_jrn_id=jrn_def_id where uj_login='$User->id' and uj_priv ='X' "); // Pour voir tout les journal ? if ( $NoPriv == 0 ) { $a=count($ret); $all=array('value'=>0,'label'=>'Grand Livre'); $ret[$a]=$all; } if ( count($ret) < 1 ) NoAccess(); //////////////////////////////////////////////////////////////////////////////// // Form //////////////////////////////////////////////////////////////////////////////// echo '
'; echo '
'; echo ''; $w=new widget("select"); $w->table=1; $w->label="Choississez le journal"; print $w->IOValue("jrn_id",$ret); print ''; print ''; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id"); $w->label="Depuis"; print $w->IOValue('from_periode',$periode_start); $w->label=" jusqu'à "; $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id"); print $w->IOValue('to_periode',$periode_end); print ""; $centralise=new widget("checkbox"); $centralise->label="Depuis les journaux centralisés"; $centralise->table=1; print $centralise->IOValue('cent'); print ""; echo '
'; print $w->Submit('bt_html','Impression'); echo '
'; echo '
'; ?>