This commit is contained in:
KANE LAZENI 2026-07-28 21:24:41 +00:00
parent 8c54adc363
commit 37ca19f7f2
4 changed files with 109 additions and 1 deletions

View File

@ -234,4 +234,39 @@ class ControleurKinecso extends Controleur {
'contestation' => $contestation, 'prixActeModifiable' => $prixActeModifiable));
}
}
public function confirmerotp()
{
if ($this->requete->existeParametre("otpValue"))
{
$login = $_SESSION['p_login'];
$otpValueSaisi = $this->requete->getParametre("otpValue");
$codeTypeFacture = "SEA";
$otpArray = $this->feuille->get_otp_value($codeTypeFacture);
$otpValueRequis = $otpArray['otpValue'];
$idOtpFacturePrestation = $otpArray['idOtpFacturePrestation'];
if ( (password_verify($otpValueSaisi, $otpValueRequis)) && (strlen($otpValueSaisi)=='6') )
{
$this->feuille->maj_otp($idOtpFacturePrestation, '1'); // validé
}
else
{
$this->feuille->maj_otp($idOtpFacturePrestation, '9'); // incorrect
}
$this->rediriger("Kinecso");
}
}
public function envoyerotp()
{
$codeTypeFacture = "SEA";
$otpValue = mt_rand(100000, 999999);
$this->feuille->envoyer_otp($codeTypeFacture, $otpValue);
$this->rediriger("Kinecso");
}
}

View File

@ -12022,6 +12022,35 @@ async function valider_seance_sea_cso() {
return;
}
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;
}
// Confirmation
const isConfirmed = await confirm_ebene_sweet(
"Confirmez-vous la facturation de ces séances?",
@ -12414,6 +12443,35 @@ async function valider_seance_sea() {
return;
}
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;
}
// Confirmation
const isConfirmed = await confirm_ebene_sweet(
"Confirmez-vous ces séances?",

View File

@ -19,6 +19,10 @@
$vueParent = $_SESSION['p_vueRetour'];
$prixActeModifiable = $_SESSION['p_prixActeModifiable'];
$activerOtp = $_SESSION['p_activerOtpFacturePrestations_C'];
$token = $_SESSION['csrf_token_submieted'];
?>
<script type="text/javascript">
@ -29,6 +33,8 @@
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
<input class="sr-only" type="text" id="nbBonsCons" name="nbBonsCons" Value="<?= $nbBonsCons ?>" >
<input type="hidden" id="csrf_token" name="csrf_token" value="<?= htmlspecialchars($token) ?>">
<INPUT class="sr-only" TYPE="text" id="vueParent" name="vueParent" value="<?= $vueParent ?>">
<legend><?= _("Gestion des séances") ?></legend>
@ -85,6 +91,14 @@
$nbFait = $compteSeance;
$nbFaitPrestataire = $compteSeancePrestataire;
$otpStatus = $this->nettoyer($prescription['otpStatus']);
if($modeSaisieFacture=="1")
{
$bonCaduc = "0";
$otpStatus = -1; // Pas OTP en mode Décompte
}
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
@ -105,6 +119,7 @@
?>
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "<?= $bonCaduc ?>" >
<input class="sr-only" id="otpStatus" name="otpStatus" type="text" value= "<?= $otpStatus ?>" >
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "<?= $codeActeSeance ?>">
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">

View File

@ -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.09"></script>
<script src="Js/fonctions.js?ver=2026.07.28.01"></script>
<script src="Bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>