menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Opticien'); $this->prescription = new Optique_temp(); $this->detailprescription = new Detailoptique(); $this->prestation = new Prestationactes(); $this->acte = new Detailtarifoptique(); $this->oui_non = new Ouinon(); $this->beneficiaire = new Beneficiaire(); viderContexte(); $_SESSION['p_okId'] = "-1"; $this->finger = new Finger(); $_SESSION['p_codeTypeFacture_C'] = "OPT"; $this->detail = new Detailtarifacte(); $this->garantie = new Garantiesbaremepriseencharge(); $this->feuille = new Feuillemaladie(); $_SESSION["proforma"] = "0"; } public function index() { $_SESSION['p_nbActesVerres'] = "0"; $_SESSION['p_nbActesMonture'] = "0"; $garantieadherent_temp = null; $codePrestataire = $_SESSION['p_codePrestataire_C']; $numeroBonOptique = $_SESSION['p_numeroBonOptique_C']; if($numeroBonOptique=="-1") { $situationGarantie = null; $situationAnnuelle = null; $situationFamille = null; $_SESSION['datePrestation'] = null; $this->genererVue(array('situationGarantie' => $situationGarantie, 'situationAnnuelle' => $situationAnnuelle, 'situationFamille' => $situationFamille)); } else { $this->prescription->initoptique_opt(); $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceOpt($numeroBonOptique); $idBeneficiaire = $resultat['idBeneficiaire']; $_SESSION['p_idBeneficiaire_C'] = $idBeneficiaire; $codeGarantie = "OPT"; $numeroOptique = $_SESSION['p_numeroOptique_C']; $prescription = $this->prescription->getoptique_opt($numeroBonOptique); $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; $contestation = $this->feuille->getContestation($numeroFeuilleMaladie); $datePrestation = $this->prescription->getDatePrestation($numeroFeuilleMaladie); $_SESSION['datePrestation'] = $datePrestation; $initgarantieBareme = $this->acte->initGarantieBareme($idBeneficiaire, $codeGarantie, $numeroFeuilleMaladie); $this->garantie->getsourcebaremegarantienew($idBeneficiaire, $codeGarantie, $datePrestation); $statutGarantie = $this->garantie->getstatutgarantie($idBeneficiaire, $codeGarantie); $motifStatut = $this->garantie->getlibellemotifdepassement($statutGarantie); $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); $_SESSION['idOptique'] = $prescription['id']; //$tauxCouverture = $this->prescription->tauxCouverture(); $tm = $this->detail->ticketModerateurDefinitif($codeGarantie, "", $datePrestation); $tauxCouverture = (100-$tm)."%"; $_SESSION['p_tm_C'] = $tm; $detailprescriptions = $this->detailprescription->getdetailoptique_opt($numeroBonOptique); $detailnonlivres = $this->prescription->getdetailnonlivre(); $detaillivres = $this->prescription->getdetaillivre(); $user_id = $_SESSION['p_user_id_C']; $this->finger->vider_finger_temp($user_id); $idPrestationactes = $prescription['idPrestationactes']; $numeroOptique = $prescription['numeroOptique']; //var_dump($detailnonlivres); die(); $acte = $this->acte->getActeOptique($datePrestation); $doubleFoyer = $this->oui_non->getListe(); $progressif = $this->oui_non->getListe(); $teinteA = $this->oui_non->getListe(); $teinteAB = $this->oui_non->getListe(); $teinteB = $this->oui_non->getListe(); $teinteC = $this->oui_non->getListe(); $photogray = $this->oui_non->getListe(); $antireflet = $this->oui_non->getListe(); $photochromique = $this->oui_non->getListe(); $antiUV = $this->oui_non->getListe(); $transition = $this->oui_non->getListe(); $antiBuee = $this->oui_non->getListe(); $filtreBleu = $this->oui_non->getListe(); //$baremes = $this->acte->getActesGarantieOptique(); //$detail_total = $this->acte->getTotalDetailOptique(); $detail_total = $this->acte->getTotalDetailOptiqueTemp(); $numeroEntentePrealable = $this->detailprescription->getNumeroDemandeaccord($numeroBonOptique); $idDemandeAccord = $this->detailprescription->getIdDemanderaccord($numeroEntentePrealable); $codeReponseEntentePrealable = $this->detailprescription->getReponseDemande($idDemandeAccord); // ajout du 27/03/2025 $prescription = $this->prescription->getoptique_opt($numeroBonOptique); $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'acte' => $acte, 'tauxCouverture' => $tauxCouverture, /* 'optique' => $optique, 'baremes' => $baremes,*/ 'detail_total' => $detail_total, 'doubleFoyer' => $doubleFoyer, 'progressif' => $progressif, 'teinteA' => $teinteA, 'teinteAB' => $teinteAB, 'teinteB' => $teinteB, 'teinteC' => $teinteC, 'photogray' => $photogray, 'antireflet' => $antireflet, 'photochromique' => $photochromique, 'motifStatut' => $motifStatut, 'antiUV' => $antiUV, 'transition' => $transition, 'antiBuee' => $antiBuee, 'filtreBleu' => $filtreBleu, 'idDemandeAccord' => $idDemandeAccord, 'numeroEntentePrealable' => $numeroEntentePrealable, 'codeReponseEntentePrealable' => $codeReponseEntentePrealable, 'statutGarantie' => $statutGarantie, 'contestation' => $contestation)); } } }