diff --git a/include/ajax_view_mod_stock.php b/include/ajax_view_mod_stock.php index ca0a0ba23..7b29f1468 100644 --- a/include/ajax_view_mod_stock.php +++ b/include/ajax_view_mod_stock.php @@ -43,3 +43,14 @@ for ($i=0;$iinput($p_array,true); ?> +
+ +

+ label= "Cochez pour confirmer effacement "; + echo $ck->input();?> +

+ + + +
\ No newline at end of file diff --git a/include/stock_inv_histo.inc.php b/include/stock_inv_histo.inc.php index 74410763f..6f76a6b0e 100644 --- a/include/stock_inv_histo.inc.php +++ b/include/stock_inv_histo.inc.php @@ -25,6 +25,24 @@ * @brief history of manuel change * */ +if ( isset($_POST['del'])) +{ + if (isset($_POST['ok'])) + { + if ($g_user->can_write_repo($_POST['r_id'])) + { + $cn->exec_sql('delete from stock_change where c_id=$1',array($_POST['c_id'])); + } + else + { + alert("Vous ne pouvez pas modifier ce dépôt"); + } + } + else + { + alert("Opération non effacée: vous n'avez pas confirmé"); + } +} $profile=$g_user->get_profile(); $a_change=$cn->get_array("select *,to_char(c_date,'DD.MM.YY') as str_date from stock_change as sc join stock_repository as sr on (sc.r_id=sr.r_id)