detailsp = new Statistique(); } public function index() { $idAdherent = $this->requete->getParametreFormulaire("idAdherent"); $entete = $this->detailsp->detailrapportspadhperiodepdfentete($idAdherent); $detailsps = $this->detailsp->detailrapportspgarantieadhperiode($idAdherent); // Excel $headerXLS = array ( _('Matricule'), _('Beneficiaire'), _('Date'), _('Prestataire'), _('No Fact'), _('Garantie'), _('Montant') ); $dataXLS = array(); foreach ($detailsps as $detailsp) { $dataXLS[]=$detailsp; } $classeur = new Spreadsheet(); $classeur->getProperties()->setCreator("INTER-SANTE"); $classeur->setActiveSheetIndex(0); $feuille=$classeur->getActiveSheet(); $feuille->setTitle(_('DETAIL GARANTIES FAMILLE')); $feuille->setCellValue('A1', convertirc($entete['nomAssureur'])); $feuille->setCellValue('B1', convertirc(_("RAPPORT SINISTRE A PRIME PAR FAMILLE"))); $feuille->setCellValue('A2', convertirc(_('Garant').' : ')); $feuille->setCellValue('B2', convertirc($entete['garant'])); $feuille->setCellValue('A3', convertirc(_('Souscripteur').' : ')); $feuille->setCellValue('B3', convertirc($entete['souscripteur'])); $feuille->setCellValue('A4', convertirc(_('Police').' No: ')); $feuille->setCellValue('B4', convertirc($entete['numeroPolice']).' / '.$entete['libellePolice']); $feuille->setCellValue('A5', convertirc(_('Adherent').' Mle: ')); $feuille->setCellValue('B5', convertirc($entete['numeroAdherent']).' / '.$entete['adherent']); $feuille->setCellValue('A6', convertirc(_('Couverture').' : ')); $feuille->setCellValue('B6', convertirc($entete['dateEffetAdherent']." To ".$entete['dateFinAdherent'])); $feuille->setCellValue('A7', convertirc(_('Periode').' : ')); $feuille->setCellValue('B7', convertirc($entete['debutAnalyse']." To ".$entete['finAnalyse'])); $feuille->fromArray($headerXLS, NULL, 'A9', true); $feuille->fromArray($dataXLS, NULL, 'A10', true); $fichier = 'Temp/DETAIL_GARANTIES_FAMILLE'."_".uniqid().".xlsx"; $writer = new Xlsx($classeur); $writer->save($fichier); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='