70 |
</script> |
</script> |
71 |
<? |
<? |
72 |
if ( isset ($_POST['p_id'])) { |
if ( isset ($_POST['p_id'])) { |
|
// Get the current periode |
|
|
$period=GetUserPeriode($cn,$User->id); |
|
73 |
$p_id=$_POST['p_id']; |
$p_id=$_POST['p_id']; |
74 |
// Get the date |
// Get the date |
75 |
$e_op_date=$_POST['op_date']; |
$e_op_date=$_POST['op_date']; |
115 |
,jr_tech_per, jr_valid |
,jr_tech_per, jr_valid |
116 |
) select $seq,jr_def_id,jr_montant,'Annulation '||jr_comment, |
) select $seq,jr_def_id,jr_montant,'Annulation '||jr_comment, |
117 |
now(),$grp_new,'$p_internal', |
now(),$grp_new,'$p_internal', |
118 |
$period, true |
$userPref, true |
119 |
from |
from |
120 |
jrn |
jrn |
121 |
where jr_grpt_id=".$_POST['p_id']; |
where jr_grpt_id=".$_POST['p_id']; |
126 |
// Make also the change into jrnx |
// Make also the change into jrnx |
127 |
$sql= "insert into jrnx ( |
$sql= "insert into jrnx ( |
128 |
j_date,j_montant,j_poste,j_grpt, |
j_date,j_montant,j_poste,j_grpt, |
129 |
j_jrn_def,j_debit,j_text,j_internal,j_tech_user |
j_jrn_def,j_debit,j_text,j_internal,j_tech_user,j_tech_per |
130 |
) select now(),j_montant,j_poste,$grp_new, |
) select now(),j_montant,j_poste,$grp_new, |
131 |
j_jrn_def,not (j_debit),j_text,'$p_internal','".$User->id."' |
j_jrn_def,not (j_debit),j_text,'$p_internal','".$User->id."', |
132 |
|
$userPref |
133 |
from |
from |
134 |
jrnx |
jrnx |
135 |
where j_grpt=".$_POST['p_id']; |
where j_grpt=".$_POST['p_id']; |