'; // add a one-line calculator $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,null,false); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; echo "
"; } // Add an item if ( isset ($_POST['add_item'])) { // Add a line $nb_number=$_POST["nb_item"]; $nb_number++; // submit button in the form $submit=' '; $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; echo "
"; } // Correct it if ( isset ($_POST['correct'])) { // Get number of lines $nb_number=$_POST["nb_item"]; // submit button in the form $submit=' '; $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; echo "
"; } // View the charge and show a submit button to save it if ( isset ($_POST['view_invoice']) ) { $nb_number=$_POST["nb_item"]; $submit=''; $submit.=''; $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,$nb_number); // if something goes wrong correct it if ( $r == null ) { // submit button in the form $submit=' '; $r=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false, $nb_number); } echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; echo "
"; } // Save the charge into database if ( isset($_POST['save'] )) { $r=RecordFin($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_SESSION['g_jrn']); // Get number of lines $nb_number=$_POST["nb_item"]; // submit button in the form $submit='

Recorded

'; $r.=FormFin($cn,$_SESSION['g_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true, $nb_number,true); echo '
'; echo $r; echo "
"; } } ////////////////////////////////////////////////////////////////////// // see jrn ////////////////////////////////////////////////////////////////////// if ( $action == 'voir_jrn' ) { // Check privilege if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) < 1 ) { NoAccess(); exit -1; } ?>
GetPeriode(); $w->selected=$current; echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); ?>
'; } ////////////////////////////////////////////////////////////////////// // balance ////////////////////////////////////////////////////////////////////// if ( $action == 'solde' ) { require_once("poste.php"); // find the bank account $accountSql="select distinct pcm_val::text,pcm_lib from tmp_pcmn where pcm_val like '550%' or pcm_val='58' order by pcm_val::text"; $ResAccount=ExecSql($cn,$accountSql); echo '
'; echo ""; for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) { $l=pg_fetch_array($ResAccount,$i); echo ""; echo "". ""."".""; }// for echo "
". $l['pcm_val']. "". $l['pcm_lib']. "". GetSolde($cn,$l['pcm_val']). "
"; echo "
"; } ////////////////////////////////////////////////////////////////////// include("user_update.php"); ?>