'; // add a one-line calculator $r=FormAch($cn,$g_jrn,$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=FormAch($cn,$g_jrn,$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=FormAch($cn,$g_jrn,$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=FormAch($cn,$g_jrn,$g_user,$submit,$HTTP_POST_VARS,true,$nb_number); // if something goes wrong, correct it if ( $r == null ) { $submit=' '; $r=FormAch($cn,$g_jrn,$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=RecordAchat($cn,$HTTP_POST_VARS,$g_user,$g_jrn); // Get number of lines $nb_number=$_POST["nb_item"]; // submit button in the form $submit='

Recorded

'; $r.=FormAch($cn,$g_jrn,$g_user,$submit,$HTTP_POST_VARS,true, $nb_number); echo '
'; echo $r; echo "
"; } } if ( $action == 'voir_jrn' ) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) < 1 ) { NoAccess(); exit -1; } ?>
GetPeriode(); $w->selected=$current; echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); ?>
'; } if ( $action == 'voir_jrn_non_paye' ) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) < 1 ) { NoAccess(); exit -1; } // Show list of unpaid sell // Date - date of payment - Customer - amount $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=$g_jrn " ; $list=ListJrn($cn,$g_jrn,$sql); $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=$g_jrn " ; $list2=ListJrn($cn,$g_jrn,$sql); echo '
'; echo '

Echeance dépassée

'; echo $list; echo '

Non Payée

'; echo $list2; echo '
'; } //Search if ( $action == 'search' ) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) < 1 ) { NoAccess(); exit -1; } // PhpSessid $sessid=(isset ($_POST['PHPSESSID']))?$_POST['PHPSESSID']:$_GET['PHPSESSID']; // display a search box $search_box=u_ShowMenuRecherche($cn,$g_jrn,$sessid,$HTTP_POST_VARS); echo '
'; echo $search_box; // if nofirst is set then show result if ( isset ($_GET['nofirst'] ) ) { $a=ListJrn($cn,$g_jrn,"",$HTTP_POST_VARS); echo $a; } echo '
'; } include("user_update.php"); ?>