';
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='';
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='';
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"];
$r=form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$nb_number);
// if something goes wrong correct it
if ( $r == null )
{
// submit button in the form
$submit='';
echo $r;
echo "
On-line calculator
".JS_CALC_LINE."";
echo "
";
}
// Save the charge into database
if ( isset($_POST['save'] )) {
$r=RecordFin($cn,$_POST,$User,$_GET['p_jrn']);
// Get number of lines
$nb_number=$_POST["nb_item"];
// submit button in the form
$submit='