diff --git a/Controleur/ControleurAjaxmouvementassurevalider.php b/Controleur/ControleurAjaxmouvementassurevalider.php
index 56c866c0..a0a3e8cd 100644
--- a/Controleur/ControleurAjaxmouvementassurevalider.php
+++ b/Controleur/ControleurAjaxmouvementassurevalider.php
@@ -1,11 +1,13 @@
mouvementassure = new Mouvementassure();
+ $this->ouinoncorrection = (new Ouinon())->getListe();
}
public function index()
@@ -41,5 +43,35 @@ class ControleurAjaxmouvementassurevalider extends Controleur {
{
$this->mouvementassure->valider_mouvements_rh();
}
+
+ public function selectionrejet()
+ {
+ $idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
+ $rejet = $this->requete->getParametreFormulaire("rejet");
+
+ $this->mouvementassure->selectionner_rejet_rh($idMvtTemp, $rejet);
+ }
+
+ public function ouvremotif()
+ {
+ $idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
+
+ $mouvementassure = $this->mouvementassure->getMouvementassureID($idMvtTemp);
+
+ $this->genererVueAjax(array(
+ 'idMvtTemp' => $idMvtTemp,
+ 'mouvementassure' => $mouvementassure,
+ 'ouinoncorrection' => $this->ouinoncorrection
+ ));
+ }
+
+ public function savemotif()
+ {
+ $idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
+ $motif = $this->requete->getParametreFormulaire("motif");
+ $aCorriger = $this->requete->getParametreFormulaire("aCorriger");
+
+ $this->mouvementassure->enregistrer_motif_rejet_rh($idMvtTemp, $motif, $aCorriger);
+ }
}
\ No newline at end of file
diff --git a/Js/fonctions.js b/Js/fonctions.js
index e83e90c4..b5def04f 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -43935,6 +43935,7 @@ function selectionner_mouvement_rh(idMvtTemp, choix)
error: function(data) {
},
complete: function() {
+ liste_mouvemements_rh_valider();
}
});
}
@@ -43973,19 +43974,27 @@ function valider_mouvement_rh()
{
v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/valider/";
- $.ajax({
- url: v_url,
- type: 'POST',
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Mouvementsrh/");
- }
- });
+ v_msg="Confirmez-vous cette validation ?";
+ v_msgEng="Do you confirm this validation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ success: function(data) {
+ // alert(data);
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Mouvementsrh/");
+ }
+ });
+ }
+
+
}
function activer_extranet_client(idClient, choix)
@@ -45386,4 +45395,96 @@ function retirer_un_menu_vue_profil(codeMenu)
afficher_menu_vue_profil();
}
});
+}
+
+function selectionner_rejet_rh(idMvtTemp, rejet)
+{
+ donnees = 'idMvtTemp='+idMvtTemp+'&rejet='+rejet;
+ v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/selectionrejet/";
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // alert(data);
+ // $('#div_test_gabarit').html(data);
+ liste_mouvemements_rh_valider();
+
+ setTimeout(function() {
+ if((rejet=="1")){
+ ouvre_motif_rejet_rh(idMvtTemp);
+ }
+ }, 150);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function ouvre_motif_rejet_rh(idMvtTemp)
+{
+ donnees = 'idMvtTemp='+idMvtTemp;
+
+ $("#div_patienter").html('
' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementassurevalider/ouvremotif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $("#div_patienter").html('');
+
+ $('#div_observation_rh').html(data);
+ $('#div_observation_rh').modal("show");
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function enregistrer_motif_rejet(idMvtTemp)
+{
+ motif = $("#motif").val();
+ aCorriger = $("#aCorriger").val();
+
+ if (motif<=" ")
+ {
+ v_msg="Veuillez entrer le motif du rejet !";
+ v_msgEng="Please enter the reason for rejection!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motif").focus();
+ return;
+ }
+
+ donnees = 'idMvtTemp='+idMvtTemp+'&motif='+motif+'&aCorriger='+aCorriger;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementassurevalider/savemotif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ v_msg="Le motif du rejet a été bien enregistré !";
+ v_msgEng="The reason for the rejection has been properly recorded!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $('#div_observation_rh').modal('hide');
+ },
+ complete: function() {
+
+ }
+ });
}
\ No newline at end of file
diff --git a/Modele/Mouvementassure.php b/Modele/Mouvementassure.php
index eafb4383..0fbb2467 100644
--- a/Modele/Mouvementassure.php
+++ b/Modele/Mouvementassure.php
@@ -97,7 +97,6 @@ class Mouvementassure extends Modele {
$sql = 'call sp_r_selectionner_mouvements_rh(?, ?)';
$this->executerRequete($sql, array($idMvtTemp, $choix));
}
-
public function valider_mouvements_rh()
{
@@ -109,4 +108,25 @@ class Mouvementassure extends Modele {
$this->executerRequete($sql, array($idPolice, $user));
}
+ public function selectionner_rejet_rh($idMvtTemp, $rejet)
+ {
+ $sql = 'call sp_r_rejet_mouvements_rh(?, ?)';
+ $this->executerRequete($sql, array($idMvtTemp, $rejet));
+ }
+
+ public function enregistrer_motif_rejet_rh($idMvtTemp, $motif, $aCorriger)
+ {
+ $sql = 'call sp_r_enregistrer_motif_rejet_rh(?, ?, ?)';
+
+ $this->executerRequete($sql, array($idMvtTemp, $motif, $aCorriger));
+ }
+
+ public function getMouvementassureID($idMvtTemp)
+ {
+ $sql = 'call sp_r_get_mouvementassures_rh_id(?)';
+
+ $resultat = $this->executerRequete($sql, array($idMvtTemp));
+
+ return $resultat->fetch(PDO::FETCH_ASSOC);
+ }
}
\ No newline at end of file
diff --git a/Vue/Ajaxmouvementassure/index.php b/Vue/Ajaxmouvementassure/index.php
index 8d7e3cd7..b4fc640d 100644
--- a/Vue/Ajaxmouvementassure/index.php
+++ b/Vue/Ajaxmouvementassure/index.php
@@ -51,7 +51,7 @@
- = dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?>
+ = dateheureLang($this->nettoyer($mvt['dateSysteme']), $_SESSION['lang']) ?>
= $this->nettoyer($mvt['codeUtilisateur']) ?>
|
diff --git a/Vue/Ajaxmouvementassurevalider/index.php b/Vue/Ajaxmouvementassurevalider/index.php
index daa06427..e83a0062 100644
--- a/Vue/Ajaxmouvementassurevalider/index.php
+++ b/Vue/Ajaxmouvementassurevalider/index.php
@@ -8,27 +8,30 @@
= _("Bénéficiaire / Matricule") ?> |
= _("Adhérent") ?> |
= _("Lien") ?> |
- = _("Consulter") ?> |
+ = _("GED") ?> |
= _("Saisie / Par") ?> |
= _("Prime Ttc") ?> |
- = _("Choix") ?> |
+ = _("Traitement") ?> |
-
+
|
" onClick="valider_mouvement_rh();">
|
-
+
|
-
+
|
+ = _('Rejet');?> |
+ = _('Motif');?> |
nettoyer($mvt['choix']);
+ $rejet = $this->nettoyer($mvt['rejet']);
$idMvtTemp = $this->nettoyer($mvt['id']);
$sensMvt = $mvt['sensMouvement'];
$libelleSensMouvement = est_anglophone() ? $mvt['libelleSensMouvementEng'] : $mvt['libelleSensMouvement'];
@@ -69,7 +72,7 @@
'0'): ?>
-
@@ -77,7 +80,7 @@
|
- = dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?>
+ = dateheureLang($this->nettoyer($mvt['dateSysteme']), $_SESSION['lang']) ?>
= $this->nettoyer($mvt['codeUtilisateur']) ?>
|
@@ -86,15 +89,24 @@
- '0'): ?>
-
- value="= $choix ?>"
- onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_mouvement_rh(= $idMvtTemp ?>, this.value);">
-
-
-
-
+
+ value="= $choix ?>"
+ onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_mouvement_rh(= $idMvtTemp ?>, this.value);"
+ >
+
+ |
+
+
+ value="= $rejet ?>"
+ onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_rejet_rh(= $idMvtTemp ?>, this.value);"
+ >
+
+ |
+
+
+
+
+
|
@@ -103,6 +115,7 @@
+
\ No newline at end of file
diff --git a/Vue/Mouvementsrh/index.php b/Vue/Mouvementsrh/index.php
index f5a40bb0..d0797e80 100644
--- a/Vue/Mouvementsrh/index.php
+++ b/Vue/Mouvementsrh/index.php
@@ -2,7 +2,7 @@
// var_dump(array("debutMois_C" => $_SESSION['debutMois_C'] ));
?>
-" readonly>
+" readonly>
diff --git a/Vue/gabarit.php b/Vue/gabarit.php
index 1037f13b..6aac4b8a 100644
--- a/Vue/gabarit.php
+++ b/Vue/gabarit.php
@@ -258,7 +258,7 @@
-
+
@@ -284,7 +284,6 @@
-