detailsp = new Statistique(); } public function index() { $idPolice = $this->requete->getParametreFormulaire("idPolice"); $debutStat = $this->requete->getParametreDate("debutStat"); $finStat = $this->requete->getParametreDate("finStat"); $codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur"); if($idPolice== ''){ $idPolice = null; } $_SESSION['debutStat'] = $debutStat; $_SESSION['finStat'] = $finStat; $depenses = $this->requete->getParametreFormulaire("depenses","numerique"); $_SESSION['depenses'] = $depenses; $entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice); $p_datedebut = $_SESSION['debutStat']; $p_datefin =$_SESSION['finStat']; $p_garant = $codeGcAssureur; $p_limite =0; $p_limite = $_SESSION['depenses']; //highlight_string(""); $p_id_clients =null; $p_id_college =null; $p_id = $idPolice; $p_factures = $this->detailsp->depensesparfamilledactesetparprestataires($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin,$p_limite); $pdf = new FPDF_Protection(); $pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES'); $userPassword = ''; $ownerPassword = null; $pdf->SetProtection(['print'], $userPassword, $ownerPassword); $pdf->AliasNbPages(); $pdf->AddPage('L'); $pdf->SetMargins(10, 10, 10) ; $pdf->Image($_SESSION['lienLogo'],140,3,15); $pdf->SetFont('Arial','B',7); $pdf->Cell(0,5,convertirc(_('FICHE TECHNIQUE No 13')),0,1,'L',false); $pdf->SetY(10); $pdf->SetFont('Arial','',7); $pdf->Cell(0,5,convertirc(_('Edition du').': '.heureCouranteLang($_SESSION['lang'])),0,1,'R',false); $pdf->Ln(2); $pdf->SetFont('Arial','B',13); $pdf->SetFillColor(182,216,242); $pdf->Cell(0,8,convertirc(_("ETAT DES DEPENSES PAR FAMILLE D'ACTES ET PAR PRESTATATAIRES")),1,0,'C',true); $pdf->Ln(8); $pdf->SetFont('Arial', 'B', 11); $pdf->SetTextColor(0); $pdf->Ln(8); $pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE').': '.dateLang($debutStat, $_SESSION['lang']).' '._('AU').' '.dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false); if ($p_id!=null){ $pdf->Ln(8); $pdf->SetFont('Arial', 'BUI', 11); $pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false); $pdf->SetFont('Arial', 'BI', 11); $pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false); $pdf->SetFont('Arial', 'BUI', 11); $pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false); $pdf->SetFont('Arial', 'BI', 11); $pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false); $pdf->SetFont('Arial', 'BUI', 11); $pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false); $pdf->SetFont('Arial', 'BI', 11); $pdf->Cell(0, 8, convertirc($entete['numeroPolice'].' / '.$entete['libellePolice']), 0, 1, 'L', false); $pdf->SetFont('Arial', 'BUI', 11); $pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false); $pdf->SetFont('Arial', 'BI', 11); $pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false); }else{ $pdf->Ln(8); $pdf->SetFont('Arial', 'BUI', 11); $pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false); $pdf->SetFont('Arial', 'BI', 11); $pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false); } $pdf->Ln(4); $pdf->SetX(65); $pdf->Cell(170,6,convertirc(_('DEPENSES SUPERIEURES A').': '.format_N($p_limite).' '.$_SESSION['devise_C']),1,1,'C',false); $pdf->Ln(2); $hl=7; $pdf->SetFont('Arial','B',6); $pdf->SetFillColor(182,216,242); $pdf->Cell(62,$hl,convertirc(_("Prestataire")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_('Consultation')),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("Imagerie")),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("Biologie")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("Dentisterie")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("Optique")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("Hospitalisation")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("Pharmacie")),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("Maternité")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("# Autres.")),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("# Aux Med.")),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("Assistance")),1,0,'C',true); $pdf->Cell(16,$hl,convertirc(_("# Trans Med.")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("# Bilan.")),1,0,'C',true); $pdf->Cell(15,$hl,convertirc(_("Totaux")),1,1,'C',true); $total_CONSULTATION = $total_IMAGERIE = $total_BIOLOGIE = $total_DENTISTERIE = $total_OPTIQUE = $total_HOSPITALISATION = $total_PHARMACIE = $total_MATERNITE = $total_AUTRES_EXAMENS = $total_AUXILIAIRES_MEDICAUX = $total_ASSISTANCE = $total_TRANSPORT_MEDICALISE = $total_BILAN_DE_SANTE = $total_TOTAUX = 0; $pdf->SetFont('Arial','',6); foreach ($p_factures as $dep) { $pdf->Cell(62,$hl,convertirc(substr($dep['Prestataire'],1,47)),1,0,'L',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['CONSULTATION'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['IMAGERIE'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['BIOLOGIE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['DENTISTERIE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['OPTIQUE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['HOSPITALISATION'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['PHARMACIE'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['MATERNITE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['AUTRES EXAMENS'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['AUXILIAIRES MEDICAUX'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['ASSISTANCE'])),1,0,'C',false); $pdf->Cell(16,$hl,convertirc(format_N($dep['TRANSPORT MEDICALISE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['BILAN DE SANTE'])),1,0,'C',false); $pdf->Cell(15,$hl,convertirc(format_N($dep['TOTAUX'])),1,1,'C',false); $total_CONSULTATION = $total_CONSULTATION + $dep['CONSULTATION']; $total_IMAGERIE = $total_IMAGERIE + $dep['IMAGERIE']; $total_BIOLOGIE = $total_BIOLOGIE + $dep['BIOLOGIE']; $total_DENTISTERIE = $total_DENTISTERIE + $dep['DENTISTERIE']; $total_OPTIQUE = $total_OPTIQUE + $dep['OPTIQUE']; $total_HOSPITALISATION = $total_HOSPITALISATION + $dep['HOSPITALISATION']; $total_PHARMACIE = $total_PHARMACIE + $dep['PHARMACIE']; $total_MATERNITE = $total_MATERNITE + $dep['MATERNITE']; $total_AUTRES_EXAMENS = $total_AUTRES_EXAMENS + $dep['AUTRES EXAMENS']; $total_AUXILIAIRES_MEDICAUX = $total_AUXILIAIRES_MEDICAUX + $dep['AUXILIAIRES MEDICAUX']; $total_ASSISTANCE = $total_ASSISTANCE + $dep['ASSISTANCE']; $total_TRANSPORT_MEDICALISE = $total_TRANSPORT_MEDICALISE + $dep['TRANSPORT MEDICALISE']; $total_BILAN_DE_SANTE = $total_BILAN_DE_SANTE + $dep['BILAN DE SANTE']; $total_TOTAUX = $total_TOTAUX + $dep['TOTAUX']; } $pdf->SetFont('Arial','B',8); $pdf->SetFillColor(182,216,242); $pdf->Cell(62,$hl,convertirc("TOTAL GENERAL"),"1",0,'C',true); $pdf->Cell(15,$hl,format_N($total_CONSULTATION),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_IMAGERIE),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_BIOLOGIE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_DENTISTERIE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_OPTIQUE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_HOSPITALISATION),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_PHARMACIE),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_MATERNITE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_AUTRES_EXAMENS),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_AUXILIAIRES_MEDICAUX),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_ASSISTANCE),1,0,'C',true); $pdf->Cell(16,$hl,format_N($total_TRANSPORT_MEDICALISE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_BILAN_DE_SANTE),1,0,'C',true); $pdf->Cell(15,$hl,format_N($total_TOTAUX),1,1,'C',true); $pdf->Ln(8); $pdf->Cell(45,$hl,convertirc(_("# Autres. = Autres Examens")),0,0,'L',false); $pdf->Ln(5); $pdf->Cell(45,$hl,convertirc(_("# Aux Med. = Auxiliaire Médicaux")),0,0,'L',false); $pdf->Ln(5); $pdf->Cell(45,$hl,convertirc(_("# Trans Med. = Transport Medicalisé")),0,0,'L',false); $pdf->Ln(5); $pdf->Cell(45,$hl,convertirc(_("# Bilan. = Bilan de santé")),0,0,'L',false); $fichier="Temp/TMP_CUMUL_SP_FICHE13"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='