acte = new Detailtarifacte(); $this->garantie = new Garantiesbaremepriseencharge(); } public function index() { $codeActe = $this->requete->getParametreFormulaire("codeActe"); $datePrestation = $this->requete->getParametreDate("datePrestation"); $codeGarantie = "CON"; $_SESSION['datePrestation'] = $datePrestation; $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; $this->garantie->getsourcebaremenew($idBeneficiaire, $codeActe, $datePrestation); $statut = $this->garantie->getstatutacte($idBeneficiaire,$codeActe,$codeGarantie); $baremesolde = $this->garantie->getbaremesoldeacte($idBeneficiaire,$codeActe,$codeGarantie,$datePrestation); $tMacte = $this->acte->ticketModerateurDefinitif($codeGarantie,$codeActe,$datePrestation); $codeTypeConsultation = $this->acte->gettype_consultation($codeActe); //09-01-2023 $tmDerogation = $this->acte->getTmDerogation($codeGarantie); //01-02-2023 $codeTypeRemboursement = $this->acte->getCodeTypeRemboursement($codeGarantie); if($tmDerogation == "1000"){ $tm = $tMacte; }else{ $tm = $tmDerogation; } $referencementpolice = $this->acte->getReferencementPolice($_SESSION['p_idPolice_C']); $avecReferencement = $referencementpolice['avecReferencement']; $tauxAvecReferencement = $referencementpolice['tauxAvecReferencement']; $tauxSansReferencement = $referencementpolice['tauxSansReferencement']; $dateFinDelaiCarenceActe = $_SESSION['p_bareme']['bareme_finDelaiCarence'];//$this->acte->getDateFinDelaiCarenceActe(); $infosActe = $this->acte->get_infos_acte($codeActe, $datePrestation); $prixBase = $infosActe['prixBase']; $prixActe = $infosActe['valeurActe']; $tarif = $infosActe['tarif']; if($codeActe==$_SESSION['p_codeActeConsultationGratuite']){ $acteExiste = $this->acte->acteExisteDansBareme($codeActe); $prixActeTarifPolicePrestataire = "0"; $prixActe = "0"; $prixBase = "0"; $depassement = "0"; } $soldeConsommation = $baremesolde['soldeConsommation']; $soldeNbreTransaction = $baremesolde['soldeNbreTransaction']; if($soldeConsommation < 0) { $soldeConsommation = 0; } if($soldeNbreTransaction < 0) { $soldeNbreTransaction = 0; } $forfaitTm = $_SESSION['p_bareme']['bareme_forfaitTm']; $fraisReel = $prixActe; $fraisReelBase = $prixBase; //$montantTm = round(($fraisReel*$tm)/100); // prise en compte du forfait TM du barème $montantTm = round(($fraisReel*$tm)/100)+$forfaitTm; $depassement = 0; $aRembourser = (($fraisReel-$montantTm)) > "0" ? ($fraisReel-$montantTm) : "0"; //var_dump($statut); if($statut != "1") { $aRembourser = "0"; $depassement = $fraisReel-$montantTm; $motif = $this->garantie->getlibellemotifdepassement($statut); } else { if($aRembourser > $baremesolde['soldeConsommation']) { $statut = "9"; $aRembourser = $baremesolde['soldeConsommation']; $depassement = $fraisReel-($montantTm+$aRembourser); $motif = $this->garantie->getlibellemotifdepassement($statut); }else{ $motif = array( 'libelle' => "", 'libelleEng' => "", 'codeDerogation' => "", 'codeMotifDepassement' => "" ); } } $this->genererVueAjax(array('prixActe' => $prixActe, 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'prixBase' => $prixBase, 'depassement' => $depassement, 'baremesolde' => $baremesolde, 'tarif' => $tarif, 'codeTypeConsultation' => $codeTypeConsultation, 'motif' => $motif )); } public function initialiser() { $this->genererVueAjax(); } }