diff --git a/Js/fonctions.js b/Js/fonctions.js
index bca5e83..fa772aa 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -10204,7 +10204,36 @@ async function valider_examen_lab() {
return;
}
- // Demande de confirmation à l'utilisateur
+ const otpStatus = Number($("#otpStatus").val());
+
+ // Gestion OTP facturation
+ let o_msg = "";
+ let o_msgEng = "";
+
+ switch (otpStatus) {
+ case 0:
+ o_msg = "Veuillez envoyer un code de vérification à l'assuré!";
+ o_msgEng = "Please send a verification code to the insured.!";
+ break;
+ case 2:
+ o_msg = "Veuillez saisir le code de vérification reçu par l'assuré sur son téléphone portable ou son adresse e-mail!";
+ o_msgEng = "Please enter the verification code received by the insured person on their mobile phone or at their email address!";
+ break;
+ case 9:
+ o_msg = "Code incorrect, veuillez réessayer!";
+ o_msgEng = "Incorrect code, please try again!";
+ break;
+ default:
+ o_msg = "Veuillez envoyer un code de vérification à l'assuré!";
+ o_msgEng = "Please send a verification code to the insured!";
+ }
+
+ if (otpStatus!=1 && otpStatus!=-1) {
+ alert_ebene(o_msg, o_msgEng);
+ return;
+ }
+
+ // Demande de confirmation à l'utilisateur
const isConfirmed = await confirm_ebene_sweet(
"Confirmez-vous ces actes?",
"Do you confirm those acts?"
diff --git a/Modele/Examen_temp.php b/Modele/Examen_temp.php
index 9c0213a..45e39c0 100755
--- a/Modele/Examen_temp.php
+++ b/Modele/Examen_temp.php
@@ -30,6 +30,7 @@ class Examen_temp extends Modele {
$_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen'];
$_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie'];
$_SESSION['p_idFacture_C'] = $ligne['idFacture'];
+ $_SESSION['p_activerOtpFacturePrestations_C'] = $ligne['activerOtpFacturePrestations'];
return $ligne;
}
diff --git a/Vue/Laboratoire/index.php b/Vue/Laboratoire/index.php
index bbf0104..4f3d92c 100755
--- a/Vue/Laboratoire/index.php
+++ b/Vue/Laboratoire/index.php
@@ -10,6 +10,8 @@
$actVisible = $_SESSION['p_actVisible'];
$token = $_SESSION['csrf_token_submieted'];
+
+ $activerOtp = $_SESSION['p_activerOtpFacturePrestations_C'];
?>
-
+