a
This commit is contained in:
parent
ed065511cb
commit
26d679190b
|
|
@ -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?"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
$actVisible = $_SESSION['p_actVisible'];
|
||||
|
||||
$token = $_SESSION['csrf_token_submieted'];
|
||||
|
||||
$activerOtp = $_SESSION['p_activerOtpFacturePrestations_C'];
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
@ -121,6 +123,51 @@
|
|||
|
||||
<div >
|
||||
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Facturation") ?>" readonly >
|
||||
|
||||
<!-- 26/07/2026 => DEBUT gérer les OTP ici -->
|
||||
<?php if($otpStatus=="-1" || $otpStatus=="1"): ?>
|
||||
<input style='font-size:10pt;' class="form-control btn btn-info" type="button" onclick="valider_pharmacie_pha()" value="<?= _("Facturer") ?>" />
|
||||
<?php else:
|
||||
switch ($otpStatus) {
|
||||
case 0:
|
||||
$messageOtp = "Veuillez envoyer un code de vérification à l'assuré!";
|
||||
break;
|
||||
case 2:
|
||||
$messageOtp = "Veuillez saisir le code de vérification reçu par l'assuré sur son téléphone portable ou son adresse e-mail!";
|
||||
break;
|
||||
case 9:
|
||||
$messageOtp = "Code incorrect, veuillez réessayer!";
|
||||
break;
|
||||
default:
|
||||
$messageOtp = "Veuillez envoyer un code de vérification à l'assuré!";
|
||||
}
|
||||
?>
|
||||
<h5 class="alert alert-danger" style="height:35px; padding:5px; text-align:center; margin-bottom:5px;"> <?= $messageOtp ?> </h5>
|
||||
|
||||
<?php if($otpStatus=='0') : ?>
|
||||
<form action="Laboratoire/envoyerotp" method="post">
|
||||
<?php else: ?>
|
||||
<form action="Laboratoire/confirmerotp" method="post">
|
||||
<?php endif; ?>
|
||||
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<?php if($otpStatus=='0') : ?>
|
||||
<td> <input style='font-size:10pt;' class="form-control btn btn-info" type="submit" name="submit" value="<?= _("Envoyer Code") ?>" /> </td>
|
||||
<?php elseif($otpStatus=='2'): ?>
|
||||
<td> <INPUT style='font-size:10pt; text-align:center;' class="form-control" type="text" id="otpValue" name="otpValue" required AUTOCOMPLETE="OFF" autofocus > </td>
|
||||
<td> <input style='font-size:10pt;' class="form-control btn btn-primary" type="submit" name="submit" value="<?= _("Vérifier Code") ?>" /> </td>
|
||||
<?php else: ?>
|
||||
<td> <INPUT style='font-size:10pt; text-align:center;' class="form-control" type="text" id="otpValue" name="otpValue" required AUTOCOMPLETE="OFF" autofocus > </td>
|
||||
<td> <input style='font-size:10pt;' class="form-control btn btn-warning" type="submit" name="submit" value="<?= _("Vérifier Code à nouveau") ?>" /> </td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<!-- 26/07/2026 => FIN gérer les OTP ici -->
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:11pt;">
|
||||
|
|
|
|||
|
|
@ -885,7 +885,7 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="Js/fonctions.js?ver=2026.07.27.03"></script>
|
||||
<script src="Js/fonctions.js?ver=2026.07.27.04"></script>
|
||||
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user