dfg
This commit is contained in:
parent
8ae1dadfde
commit
68df32e440
|
|
@ -21,4 +21,13 @@ class ControleurAjaxrhvalidationrd extends Controleur {
|
|||
|
||||
}
|
||||
|
||||
public function enregistrer()
|
||||
{
|
||||
$idDemande = $this->requete->getParametreFormulaire("idDemande");
|
||||
$codeStatutPaiement = $this->requete->getParametreFormulaire("codeStatutPaiement");
|
||||
$motifRejetRh = $this->requete->getParametreFormulaire("motifRejetRh");
|
||||
|
||||
$this->remboursement->enregistrerrhvalidationrd($idDemande, $codeStatutPaiement, $motifRejetRh);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5700,3 +5700,48 @@ function valider_remboursement(idDemande){
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function enregistrer_validation_rd(idDemande){
|
||||
|
||||
let codeStatutPaiement = $("#codeStatutPaiement").val();
|
||||
let motifRejetRh = $("#motifRejetRh").val();
|
||||
|
||||
if(codeStatutPaiement=="2"){
|
||||
const msg = "Une décision de validation est obligatoire.";
|
||||
const msgEng = "A validation approval is required.";
|
||||
|
||||
alert_ebene(msg, msgEng);
|
||||
$("#codeStatutPaiement").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if(codeStatutPaiement=="9" && motifRejetRh <=" "){
|
||||
const msg = "Un motif est obligatoire en cas de refus.";
|
||||
const msgEng = "A reason is required in case of refusal.";
|
||||
|
||||
alert_ebene(msg, msgEng);
|
||||
$("#motifRejetRh").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
donnees = 'idDemande='+idDemande;
|
||||
donnees += '&codeStatutPaiement='+codeStatutPaiement;
|
||||
donnees += '&motifRejetRh='+motifRejetRh;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxrhvalidationrd/enregistrer/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData){
|
||||
alert("Erreur : "+errorData);
|
||||
},
|
||||
success: function(data) {
|
||||
//alert("Success : "+data);
|
||||
$('#div_validation').modal("hide");
|
||||
},
|
||||
complete: function() {
|
||||
listerremboursement();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -105,4 +105,13 @@ class Remboursement extends Modele {
|
|||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function enregistrerrhvalidationrd($idDemande, $codeStatutPaiement, $motifRejetRh)
|
||||
{
|
||||
$login = $_SESSION['login'];
|
||||
|
||||
$sql = 'call sp_c_validation_remboursement_rd_rh(?, ?, ?, ?)';
|
||||
|
||||
$this->executerRequete($sql, array($idDemande, $codeStatutPaiement, $motifRejetRh, $login));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -663,7 +663,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<!-- Application Scripts -->
|
||||
<script src="/Js/fonctions.js?ver=2026.01.22.05"></script>
|
||||
<script src="/Js/fonctions.js?ver=2026.01.22.06"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
raffraichier_gabarit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user