menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Pharmacien'); $this->prescription = new Prescription_temp(); $this->detailprescription = new Detailprescription(); $this->prestation = new Prestationactes(); $this->beneficiaire = new Beneficiaire(); viderContexte(); $_SESSION['okId'] = "-1"; $this->finger = new Finger(); $_SESSION['codeTypeFacture_C'] = "PHAR"; } public function index() { $garantieadherent_temp = null; $codePrestataire = $_SESSION['codePrestataire_C']; $numeroBonOrdonnance = $_SESSION['numeroBonOrdonnance_C']; if($numeroBonOrdonnance=="-1") { // $this->genererVue(); $this->genererVue(); } else { $resultat = $this->beneficiaire->getBeneficiaireOrdonnancePha($numeroBonOrdonnance); $idBeneficiaire = $resultat['idBeneficiaire']; $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); $this->prescription->initpharmacie_pha($numeroBonOrdonnance); $numeroPrescription = $_SESSION['numeroPrescription_C']; $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); $detailnonlivres = $this->prescription->getdetailnonlivre(); // $detaillivres = $this->prescription->getdetaillivre(); $detaillivres = $this->prescription->getdetaillivrepha(); $factures = $this->prescription->getfactures_ordonnance($numeroBonOrdonnance); $factures_toal = $this->prescription->getfactures_total_ordonnance($numeroBonOrdonnance); $user_id = $_SESSION['user_id_C']; $this->finger->vider_finger_temp($user_id); $idPrestationactes = $prescription['idPrestationactes']; $remplace = $prescription['remplace']; $numeroRemplace = $prescription['numeroRemplace']; $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; $numeroPrescription = $prescription['numeroPrescription']; $facturable=($numeroRemplace != $numeroBonOrdonnance); $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); // if($idPrestationactes==0) // if($idPrestationactes==0 && $facturable) if($facturable) { $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_pha($numeroFeuilleMaladie, $codePrestataire); } $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'factures' => $factures, 'factures_toal' => $factures_toal)); } } }