a
This commit is contained in:
parent
be80b21fad
commit
5f1ab805c5
|
|
@ -3,13 +3,16 @@ require_once 'Framework/Controleur.php';
|
|||
require_once 'Modele/Seance_temp.php';
|
||||
require_once 'Modele/Prestationactes.php';
|
||||
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
||||
require_once 'Modele/Feuillemaladie.php';
|
||||
|
||||
class ControleurAjaxprixseancesea extends Controleur {
|
||||
private $feuille;
|
||||
|
||||
public function __construct() {
|
||||
$this->prescription = new Seance_temp();
|
||||
$this->prestation = new Prestationactes();
|
||||
$this->garantie = new Garantiesbaremepriseencharge();
|
||||
$this->feuille = new Feuillemaladie();
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
|
@ -50,4 +53,56 @@ class ControleurAjaxprixseancesea extends Controleur {
|
|||
$this->genererVueAjax(array('prescription' => $prescription, 'garantieadherent_temp' => $garantieadherent_temp,
|
||||
'statut' => $statut, 'baremesolde' => $baremesolde, 'motifStatut' => $motifStatut));
|
||||
}
|
||||
|
||||
public function raffraichir() {
|
||||
$numeroBonKine = $_SESSION['p_numeroBonKine_C'];
|
||||
$prescription = $this->prescription->getprescription_sea($numeroBonKine);
|
||||
$numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie'];
|
||||
$idBeneficiaire = $prescription['idBeneficiaire'];
|
||||
$codeActe = $prescription['codeActeSeance'];
|
||||
$datePrestation = $this->prescription->getDateSurvenance($numeroFeuilleMaladie);
|
||||
$codeGarantie = $this->prestation->getGarantieActe($codeActe);
|
||||
$baremesolde = $this->garantie->getbaremesolde($idBeneficiaire,$codeActe,$codeGarantie,$numeroFeuilleMaladie);
|
||||
// $motifStatut = $this->garantie->getlibellemotifdepassement($statut);
|
||||
|
||||
// $this->genererVueAjax(array('prescription' => $prescription, 'statut' => $statut, 'baremesolde' => $baremesolde, 'motifStatut' => $motifStatut));
|
||||
$this->genererVueAjax(array('prescription' => $prescription, 'statut' => $statut, 'baremesolde' => $baremesolde));
|
||||
}
|
||||
|
||||
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->executerAction("raffraichir");
|
||||
}
|
||||
}
|
||||
|
||||
public function envoyerotp()
|
||||
{
|
||||
$codeTypeFacture = "SEA";
|
||||
$otpValue = mt_rand(100000, 999999);
|
||||
$this->feuille->envoyer_otp($codeTypeFacture, $otpValue);
|
||||
|
||||
$this->executerAction("raffraichir");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -18,13 +18,15 @@
|
|||
$motifEng = $this->nettoyer($prescription['motifEng']);
|
||||
|
||||
$tarif = $this->nettoyer($prescription['tarif']);
|
||||
|
||||
|
||||
/*
|
||||
$libelleMotif = $motifStatut['libelle'];
|
||||
|
||||
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
||||
{
|
||||
$libelleMotif = $motifStatut['libelleEng'];
|
||||
}
|
||||
*/
|
||||
|
||||
$prixActeModifiable = $_SESSION['p_prixActeModifiable'];
|
||||
$valeurActe = $this->nettoyer($prescription['valeurActeSeance']);
|
||||
|
|
|
|||
216
Vue/Ajaxprixseancesea/raffraichir.php
Executable file
216
Vue/Ajaxprixseancesea/raffraichir.php
Executable file
|
|
@ -0,0 +1,216 @@
|
|||
<?php
|
||||
$soldeConsommation = $baremesolde['soldeConsommation'];
|
||||
$soldeNbreTransaction = $baremesolde['soldeNbreTransaction'];
|
||||
|
||||
if($soldeConsommation < 0)
|
||||
{
|
||||
$soldeConsommation = 0;
|
||||
}
|
||||
|
||||
if($soldeNbreTransaction < 0)
|
||||
{
|
||||
$soldeNbreTransaction = 0;
|
||||
}
|
||||
|
||||
$codeMotifDepassement = $this->nettoyer($prescription['codeMotifDepassement']);
|
||||
|
||||
$motif = $this->nettoyer($prescription['motif']);
|
||||
$motifEng = $this->nettoyer($prescription['motifEng']);
|
||||
|
||||
$tarif = $this->nettoyer($prescription['tarif']);
|
||||
|
||||
/*
|
||||
$libelleMotif = $motifStatut['libelle'];
|
||||
|
||||
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
||||
{
|
||||
$libelleMotif = $motifStatut['libelleEng'];
|
||||
}
|
||||
*/
|
||||
|
||||
$prixActeModifiable = $_SESSION['p_prixActeModifiable'];
|
||||
$valeurActe = $this->nettoyer($prescription['valeurActeSeance']);
|
||||
$prixActe = $valeurActe;
|
||||
|
||||
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
||||
$otpStatus = $this->nettoyer($prescription['otpStatus']);
|
||||
|
||||
if($modeSaisieFacture=="1")
|
||||
{
|
||||
$otpStatus = -1; // Pas OTP en mode Décompte
|
||||
}
|
||||
?>
|
||||
|
||||
raffraichir => KANE
|
||||
|
||||
<input class="sr-only" type="text" id="statut" name="statut" value="<?= $statut ?>" >
|
||||
<input class="sr-only" type="number" id="prixBase" name="prixBase" value="<?= $this->nettoyer($prescription['prixBase']) ?>">
|
||||
<input class="sr-only" type="number" id="prixActe" name="prixActe" value="<?= $this->nettoyer($prescription['valeurActeSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="prixSaisi" name="prixSaisi" value="<?= $this->nettoyer($prescription['valeurActeSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="valeurActe" name="valeurActe" value="<?= $this->nettoyer($prescription['valeurActeSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="fraisReelBase" name="fraisReelBase" value="<?= $this->nettoyer($prescription['fraisReelBase']) ?>">
|
||||
<input class="sr-only" type="number" id="aRembourser" name="aRembourser" value="<?= $this->nettoyer($prescription['montantArembourserSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="totalActe" name="totalActe" value="<?= $this->nettoyer($prescription['fraisReelSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="fraisRetenuSeance" name="fraisRetenuSeance" value="<?= $this->nettoyer($prescription['fraisRetenuSeance']) ?>" >
|
||||
<input class="sr-only" type="text" id="cout" name="cout" value="<?= $this->nettoyer($prescription['fraisReelSeance']) ?>" >
|
||||
<input class="sr-only" type="number" id="montantTm" name="montantTm" value="<?= $this->nettoyer($prescription['montantTmSeance']) ?>" >
|
||||
<input class="sr-only" type="text" id="cout_f" name="cout_f" value="<?= format_N($this->nettoyer($prescription['fraisReelSeance'])) ?>" >
|
||||
<input class="sr-only" type="text" id="montantTm_f" name="montantTm_f" value="<?= format_N($this->nettoyer($prescription['montantTmSeance'])) ?>" >
|
||||
<input class="sr-only" type="number" id="depassement" name="depassement" value="<?= $this->nettoyer($prescription['depassement']) ?>">
|
||||
<input class="sr-only" type="number" id="depassementSeance" name="depassementSeance" value="<?= $this->nettoyer($prescription['depassementSeance']) ?>" >
|
||||
<input class="sr-only" id="otpStatus" name="otpStatus" type="text" value= "<?= $otpStatus ?>" >
|
||||
|
||||
<?php if($statut!="1" && $codeMotifDepassement!=''):?>
|
||||
<marquee behavior="scroll" direction="left" scrollamount="15" style="background-color:red;color:white; font-weight:bold; font-size:14pt">
|
||||
<?= $libelleMotif ?>
|
||||
</marquee>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="10%" align="center" > <?= _("Date Séance") ?> </td>
|
||||
|
||||
<td align="center">
|
||||
<INPUT class="form-control" TYPE="text" Value="<?= $_SESSION['p_dateFactureReellefr_C'] ?>" readonly style='font-size:10pt; text-align:center;' >
|
||||
</td>
|
||||
|
||||
<td align="center" width="15%">
|
||||
<?= _("Motif Dépassement") ?>
|
||||
</td>
|
||||
<?php if($codeMotifDepassement!=''): ?>
|
||||
<td align="center" width="15%">
|
||||
<button style="width:100%" type="button" class="btn btn-info" title="Voir le motif du dépassement..." onClick='javascript:alert_ebene("<?= $motif ?>","<?= $motifEng ?>");'>
|
||||
<?= $codeMotifDepassement ?>
|
||||
</button>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td width="15%">
|
||||
<INPUT class="form-control" TYPE="text" Value="" readonly style='font-size:10pt; text-align:center;' >
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td align="center" > <?= _("No Séance") ?> </td>
|
||||
<td align="center">
|
||||
<INPUT class="form-control" TYPE="text" Value="<?= $prescription['numeroBonSeance'] ?>" readonly style='font-size:10pt; text-align:center;' >
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="10%" >
|
||||
<input class="form-control" style="font-size:10pt; border: 0; background: transparent; text-align:center;" type="text" value="<?= _("Prix Unitaire") ?>" readonly>
|
||||
</td>
|
||||
|
||||
<td width="20%" >
|
||||
<?php if($prixActeModifiable=="1") : ?>
|
||||
<input style="font-size:10pt;" class="form-control" type="number" id="prixModifiable" name="prixModifiable" value="<?= $prixActe ?>" onchange="modifier_prix_seance_kine();" >
|
||||
<input id="prixActe_info" name="prixActe_info" class="sr-only" type="text" value="<?= format_N($prixActe) ?>" readonly>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
|
||||
<?= format_N($prixActe) ?>
|
||||
</button>
|
||||
|
||||
<input class="sr-only" type="number" id="prixModifiable" name="prixModifiable" value="<?= $prixActe ?>" >
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td width="15%" align="center" > <?= _("Nombre effectué") ?> </td>
|
||||
<td width="15%" >
|
||||
<input class="form-control" id="quantiteSeance" name="quantiteSeance"
|
||||
type="number" min="1" step="1"
|
||||
value="<?= $this->nettoyer($prescription['quantiteSeance']) ?>"
|
||||
style="text-align: center; font-size:10pt;"
|
||||
onchange="if(this.value < 1 || this.value === '') this.value = 1; ajaxprixseancesea();">
|
||||
</td>
|
||||
|
||||
<td width="10%" align="center"> <?= _("Montant Total") ?> </td>
|
||||
|
||||
<td width="25%" >
|
||||
<input class="form-control" style="background-color: rgb(190,190,190) !important;text-align: center; font-size:10pt;'" type="text" value="<?= format_N($this->nettoyer($prescription['fraisReelSeance'])) ?>" readonly >
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="center"> <?= _("Montant TM") ?> </td>
|
||||
<td> <input id="montantTm_info" name="montantTm_info" class="form-control" style="background-color: rgb(190,190,190) !important; text-align: center; font-size:10pt;'" type="text" value="<?= format_N($this->nettoyer($prescription['montantTmSeance'])) ?>" readonly ></td>
|
||||
|
||||
<td align="center" > <?= _("A Rembourser") ?> </td>
|
||||
<td > <input class="form-control" style="background-color: rgb(190,190,190) !important;text-align: center; font-size:10pt;'" type="text" value="<?= format_N($this->nettoyer($prescription['montantArembourserSeance'])) ?>" readonly ></td>
|
||||
|
||||
|
||||
<td align="center"> <?= _("Dépassement") ?> </td>
|
||||
<td> <input id="depassement_info" name="depassement_info" class="form-control" style="background-color:red !important;color:white;text-align: center; font-size:10pt;" type="text" value="<?= format_N($this->nettoyer($prescription['depassementSeance'])) ?>" readonly ></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 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_seance_sea_cso()" 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="Pharmacien/envoyerotp" method="post">
|
||||
<?php else: ?>
|
||||
<form action="Pharmacien/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 id="div_fraisExclu">
|
||||
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="div_solde">
|
||||
<table class="table table-responsive table-condensed" style='font-size:14pt;'>
|
||||
<tbody>
|
||||
<?php if($soldeConsommation <="0" || $soldeNbreTransaction <="0"):?>
|
||||
<tr>
|
||||
<td width="15%" align="center" > <?= _("Solde plafond") ?> </td>
|
||||
<td align="center" width="20%">
|
||||
<INPUT class="form-control" TYPE="text" Value="<?= format_N($soldeConsommation); ?>" readonly style='font-size:10pt; text-align:center;' >
|
||||
</td>
|
||||
<td width="15%" align="center" > <?= _("Solde nombre prestation") ?> </td>
|
||||
<td align="center" width="20%">
|
||||
<INPUT class="form-control" TYPE="text" Value="<?= $soldeNbreTransaction ?>" readonly style='font-size:10pt; text-align:center;' >
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user