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->beneficiaire = new Beneficiaire(); viderContexte(); $_SESSION['okId'] = "-1"; $this->finger = new Finger(); $_SESSION['codeTypeFacture_C'] = "OPT"; } public function index() { // $id0 = $this->requete->getParametre("id"); $id0 = $this->requete->getParametreFormulaire("id"); if($id0=="0") { // throw new Exception("id0 : ".$id0); $_SESSION['numeroBonOptique_C'] = "-1"; } $garantieadherent_temp = null; $codePrestataire = $_SESSION['codePrestataire_C']; $numeroBonOptique = $_SESSION['numeroBonOptique_C']; if($numeroBonOptique=="-1") { $this->genererVue(); } else { $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceOpt($numeroBonOptique); $idBeneficiaire = $resultat['idBeneficiaire']; $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); $this->prescription->initoptique_opt(); $numeroOptique = $_SESSION['numeroOptique_C']; $prescription = $this->prescription->getoptique_opt($numeroBonOptique); $detailprescriptions = $this->detailprescription->getdetailoptique_opt($numeroBonOptique); $detailnonlivres = $this->prescription->getdetailnonlivre(); $detaillivres = $this->prescription->getdetaillivre(); $user_id = $_SESSION['user_id_C']; $this->finger->vider_finger_temp($user_id); $idPrestationactes = $prescription['idPrestationactes']; $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; $numeroOptique = $prescription['numeroOptique']; $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); if($idPrestationactes==0) { $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_opt($numeroFeuilleMaladie, $codePrestataire); } $acte = $this->acte->getverrespossibles(); $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'acte' => $acte)); } } }