diff --git a/html/annulation.php b/html/annulation.php index e545bfd58..ec3111a9b 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -93,7 +93,6 @@ soit par son écriture inverse ? - @@ -113,17 +112,7 @@ return; // Remove is confirmed if ( isset ($_POST['p_id'])) { $p_id=$_POST['p_id']; - // Get the date - $e_op_date=$_POST['op_date']; - - // Test if date is valid - if ( isDate ($e_op_date) == null ) { - $msg=' Date non valide'; - echo ""; - // set an incorrect pid to get out from here - $p_id=-1; - } if ($p_id != -1 ) { // A // userPref contient la periode par default $userPref=$User->get_periode($cn); @@ -174,12 +163,12 @@ if ($p_id != -1 ) { // A jr_date,jr_grpt_id,jr_internal ,jr_tech_per, jr_valid ) select $seq,jr_def_id,jr_montant,'Annulation '||jr_comment, - now(),$grp_new,'$p_internal', + to_date($1,'DD.MM.YYYY'),$grp_new,'$p_internal', $userPref, true from jrn - where jr_grpt_id=".$_POST['p_id']; - $Res=ExecSql($cn,$sql); + where jr_grpt_id=$2"; + $Res=ExecSqlParam($cn,$sql,array($l_date_start,$_POST['p_id'])); // Check return code if ( $Res == false) throw (new Exception(__FILE__.__LINE__."sql a echoue [ $sql ]")); @@ -392,13 +381,10 @@ echo '