diff --git a/Controleur/ControleurAjaxprixseancesea.php b/Controleur/ControleurAjaxprixseancesea.php
index ee0301a..7958d75 100755
--- a/Controleur/ControleurAjaxprixseancesea.php
+++ b/Controleur/ControleurAjaxprixseancesea.php
@@ -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");
+ }
+
+
}
\ No newline at end of file
diff --git a/Vue/Ajaxprixseancesea/index.php b/Vue/Ajaxprixseancesea/index.php
index adec94f..579257b 100755
--- a/Vue/Ajaxprixseancesea/index.php
+++ b/Vue/Ajaxprixseancesea/index.php
@@ -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']);
diff --git a/Vue/Ajaxprixseancesea/raffraichir.php b/Vue/Ajaxprixseancesea/raffraichir.php
new file mode 100755
index 0000000..25ad554
--- /dev/null
+++ b/Vue/Ajaxprixseancesea/raffraichir.php
@@ -0,0 +1,216 @@
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ " />
+
+ = $messageOtp ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+