diff --git a/apps/maarch_entreprise/actions/index_mlb.php b/apps/maarch_entreprise/actions/index_mlb.php index 4bd1356fc493fdd1f1ab048aa4c66f96e7bbbc82..081779b8ce0f9d35f79c8c30a3e07f5939ac290b 100644 --- a/apps/maarch_entreprise/actions/index_mlb.php +++ b/apps/maarch_entreprise/actions/index_mlb.php @@ -117,6 +117,7 @@ function get_form_txt($values, $pathManageAction, $actionId, $table, $module, $ //INITIALIZE $frmStr = ''; + $_SESSION['stockCheckbox']= ''; $_SESSION['req'] = "action"; $resId = $values[0]; $today = date('d-m-Y'); @@ -1845,9 +1846,10 @@ function manage_form($arrId, $history, $actionId, $label_action, $status, $collI if ($attach) { $idDoc = get_value_fields($formValues, 'res_id'); + $idDocTab = explode(',', $idDoc); for($i=0;$i<count($_SESSION['stockCheckbox']);$i++){ $queryLink = "INSERT INTO res_linked (res_parent, res_child, coll_id) VALUES(?, ?, ?)"; - $arrayPDO = array($_SESSION['stockCheckbox'][$i], $resId, $_SESSION['collection_id_choice']); + $arrayPDO = array($idDocTab[$i], $resId, $_SESSION['collection_id_choice']); $db->query($queryLink, $arrayPDO); } $hist2 = new history(); diff --git a/apps/maarch_entreprise/actions/process.php b/apps/maarch_entreprise/actions/process.php index 2bb4b5fdb6a09a47b12379946a20c4fffa4a08a0..e3dfcafc45ba07a06bd839137a3d6eb218318862 100644 --- a/apps/maarch_entreprise/actions/process.php +++ b/apps/maarch_entreprise/actions/process.php @@ -92,6 +92,7 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module //INITIALIZE $frm_str = ''; + $_SESSION['stockCheckbox']= ''; $_SESSION['req'] = "action"; $res_id = $values[0]; $doctypes = $type->getArrayTypes($coll_id); diff --git a/apps/maarch_entreprise/actions/validate_mail.php b/apps/maarch_entreprise/actions/validate_mail.php index 25571be5ff46f7765108905e4ad3ec6811fee66e..9e70b0e8c5269c28d2a6f49a8ab39a460ce43f8b 100644 --- a/apps/maarch_entreprise/actions/validate_mail.php +++ b/apps/maarch_entreprise/actions/validate_mail.php @@ -124,6 +124,7 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module //INITIALIZE $frm_str = ''; + $_SESSION['stockCheckbox']= ''; unset($_SESSION['m_admin']['contact']); $_SESSION['req'] = "action"; $res_id = $values[0]; diff --git a/apps/maarch_entreprise/js/functions.js b/apps/maarch_entreprise/js/functions.js index e416fbb8234452ac2a9d97fedd0197d6645e43be..5bd5046231b1cf37dc259780abfed42b9b187d7b 100644 --- a/apps/maarch_entreprise/js/functions.js +++ b/apps/maarch_entreprise/js/functions.js @@ -2360,8 +2360,7 @@ function valid_report_by_period(url) } } }); - } else - alert ("DEBU"); + } } /**