'; echo "here". $form; echo ''; } // We want to see the encoded invoice if ( isset ($_POST["view_invoice"])) { $nb_number=$_POST["nb_item"]; $form=FormVenteView($cn,$g_jrn,$g_user,$HTTP_POST_VARS,$nb_number); // Check failed : invalid date or quantity if ( $form== null) { echo_error("Cannot validate "); $form=FormVente($cn,$g_jrn,$g_user,$HTTP_POST_VARS,false,$nb_number); } echo '
'; echo $form; echo '
'; } // We want a blank form if ( $blank==1) { echo_debug(__FILE__,__LINE__,"Blank form"); // Show an empty form of invoice $form=FormVente($cn,$g_jrn,$g_user,null,false); echo '
'; echo $form; echo '
'; } } // Save the invoice if ( isset($_POST["record_invoice"])) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) != 2 ) { NoAccess(); exit -1; } // echo "RECORD INVOICE"; RecordInvoice($cn,$HTTP_POST_VARS,$g_user,$g_jrn); } if (isset ($_POST['correct_new_invoice'])) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) != 2 ) { NoAccess(); exit -1; } $nb=$_POST['nb_item']; $form=FormVente($cn,$g_jrn,$g_user,$HTTP_POST_VARS,false,$nb); echo '
'; echo $form; echo '
'; } // Save and print the invoice if ( isset($_POST["record_and_print_invoice"])) { // Check privilege if ( CheckJrn($g_dossier,$g_user,$g_jrn) != 2 ) { NoAccess(); exit -1; } // echo "RECORD AND PRINT INVOICE"; $comment=RecordInvoice($cn,$HTTP_POST_VARS,$g_user,$g_jrn); $nb_number=$_POST["nb_item"]; $form=FormVenteView($cn,$g_jrn,$g_user,$HTTP_POST_VARS,$nb_number,'noform',$comment); echo '
'; echo $form; 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 '
'; } // if ( $action == 'impress' ) { // // Print list of sell or print the current invoice // } //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"); ?>