reglement = new Reglement(); } public function index() { $idReglement = $_SESSION['p_idReglement_C']; $numeroDecompte = $_SESSION['p_numeroDecompte_C']; $reglement = $this->reglement->getreglement($idReglement); $pdf = new FPDF_Protection(); $pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES'); $userPassword = ''; $ownerPassword = null; $pdf->SetProtection(['print'], $userPassword, $ownerPassword); $pdf->AliasNbPages(); $pdf->AddPage(); $ht=10; $lg=60; $pdf->SetMargins(10, 10, 10) ; $pdf->SetFont('Arial','B', 15); $pdf->SetY(30); $pdf->Cell(0,10,convertirc($_SESSION['p_nomSociete']),1,1,'C',false); $pdf->Ln(10); $pdf->SetFont('Arial','BU', 15); $pdf->SetFontSize(12); $pdf->Cell(0,10,convertirc(_("DEMANDE DE REGLEMENT POUR DECOMPTE") . " No ".$reglement['numeroDecompte']),0,1,'C',false); $pdf->Ln(10); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc(_("PRESTATAIRE")),0,0,'L',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc(': '.$reglement['prestataire']),0,1,'L'); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc(_("MONTANT EN CHIFFRES")),0,0,'L',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,": ".format_N($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc(_("MONTANT EN LETTRES")),0,0,'L',false); $pdf->SetFont('Arial','I',12); // $pdf->Cell(0,10,": ".asLetters($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->Cell(0,10,": ".convetirEnLettre($reglement['montantApayer'], $_SESSION['p_lang'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc("SERVICE DEMANDEUR"),0,0,'L',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc(": DIRECTION SANTE"),0,1,'L'); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc("A VERSER AU COMPTE No"),0,0,'L',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc(":"),0,1,'L'); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc("SUR"),0,0,'L',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc(":"),0,1,'L'); $pdf->Ln(10); $pdf->Cell(0,10,convertirc('Fait à '.$_SESSION['p_villeSociete'].', le ').heureCourante(),0,1,'C',false); $pdf->Ln(10); $pdf->SetFont('Arial','B', 12); $pdf->Cell($lg,10,convertirc("VISA DIRECTION SANTE"),0,0,'L',false); $pdf->Cell(0,10,convertirc("VISA DAF"),0,1,'R'); $pdf->Ln(20); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc("Chèque No :"),0,1,'L'); $pdf->Cell(0,10,convertirc("Sur :"),0,1,'L'); $pdf->SetFont('Arial','BU', 15); $pdf->SetFontSize(12); $pdf->Cell(0,20,convertirc("REMISE CHEQUE"),0,1,'C',false); $pdf->SetFont('Arial','I',12); $pdf->Cell(0,10,convertirc("Nom et Prénoms :"),0,1,'L'); $pdf->Cell(0,10,convertirc("Carte d'identité No :"),0,1,'L'); $pdf->Cell(0,10,convertirc("Délivrée à :"),0,1,'L'); $pdf->Cell(0,10,convertirc("Siganture :"),0,1,'L'); $fichier="Temp/demande_regelement"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='
reglement->getreglement($idReglement); $codeTypePrestataire = $reglement['codeTypePrestataire']; if($codeTypePrestataire=="CSO" || $codeTypePrestataire=="DEN" || $codeTypePrestataire=="POC" || $codeTypePrestataire=="HPC" || $codeTypePrestataire=="HPP" || $codeTypePrestataire=="CME") { $factures = $this->reglement->getdetaildecompteexportcso($numeroDecompte); } elseif($codeTypePrestataire=="PHA") { $factures = $this->reglement->getdetaildecompteexportpha($numeroDecompte); } elseif($codeTypePrestataire=="OPT") { $factures = $this->reglement->getdetaildecompteexportopt($numeroDecompte); } elseif($codeTypePrestataire=="LAB") { $factures = $this->reglement->getdetaildecompteexportlab($numeroDecompte); } elseif($codeTypePrestataire=="SEA") { $factures = $this->reglement->getdetaildecompteexportsea($numeroDecompte); } else { $factures = $this->reglement->getdetaildecompteexportcso($numeroDecompte); } $pdf = new FPDF_Protection('L'); $pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES'); $userPassword = ''; $ownerPassword = null; $pdf->SetProtection(['print'], $userPassword, $ownerPassword); $pdf->AliasNbPages(); $pdf->AddPage(); $ht=4; $pdf->SetMargins(10, 10, 10) ; $pdf->Image($_SESSION['p_lienLogo'],10,6,30); //$pdf->Ln(50); $pdf->SetFont('Arial','I',7); //Numéro de page $pdf->Cell(0,$ht,'Page '.$pdf->PageNo().'/{nb}',0,0,'C'); $pdf->SetFont('Arial','', 7); $pdf->Cell(0,$ht,convertirc('Edité le : '.heureCourante()),0,0,'R',false); $pdf->Ln(5); //$pdf->SetFont('Arial','BI', 7); //$pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete']),0,0,'L',false); //$pdf->Cell(0,$ht,convertirc("BORDERAU POUR DECOMPTE No ".$reglement['numeroDecompte']." => "."PRESTATAIRE ".$reglement['prestataire']),0,1,'R',false); // Police Arial gras 15 $pdf->SetFont('Arial','B',15); // Décalage à droite $pdf->Cell(90); $pdf->SetFillColor(217,237,247); // bleu // Titre $pdf->Cell(120,10,convertirc(_("BORDERAU POUR DECOMPTE") . " No ".$reglement['numeroDecompte']),1,0,'C',true); $pdf->Ln(15); $pdf->Cell(20); $pdf->SetFont('Arial','BU',13); $pdf->Cell(0,$ht,convertirc($reglement['prestataire']),0,0,'C',false); // Saut de ligne $pdf->Ln(10); $pdf->SetFont('Arial','B', 11); //$pdf->Cell(60,$ht,convertirc('Edité le : '.heureCourante()),0,0,'L',false); $pdf->Cell(20); $pdf->SetFont('Arial','B', 11); // $pdf->Cell(60,$ht,convertirc("PERIODE : ".$reglement['periode']),0,0,'C',false); if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") { $pdf->Cell(0,$ht,convertirc("PERIODE : ".$reglement['periodeEng']),0,0,'C',false); } else { $pdf->Cell(0,$ht,convertirc("PERIODE : ".$reglement['periode']),0,0,'C',false); } $pdf->Ln(5); $pdf->Cell(0,$ht,convertirc("Etat : ".$reglement['etatdecompte']),0,0,'L',false); $pdf->Cell(0,$ht,convertirc('No Lot : '.$reglement['numeroLotDecompte']),0,1,'R',false); $pdf->Ln(3); $pdf->SetFont('Arial','B', 8); $pdf->SetFillColor(217,237,247); $pdf->Cell(7,$ht,convertirc("No"),1,0,'C',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(7,$ht,convertirc("Jour"),1,0,'C',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(14,$ht,convertirc("Police"),1,0,'C',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(36,$ht,convertirc("Souscripteur"),1,0,'L',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(44,$ht,convertirc("Adhérent"),1,0,'L',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(14,$ht,convertirc("No Benef"),1,0,'C',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(44,$ht,convertirc("Bénéficiaire"),1,0,'L',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(14,$ht,convertirc("Bon No"),1,0,'C',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(17,$ht,convertirc("Actes Méd"),1,0,'R',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(17,$ht,convertirc("Méd & cons"),1,0,'R',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(17,$ht,convertirc("Coût"),1,0,'R',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(12,$ht,convertirc("TM"),1,0,'R',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(17,$ht,convertirc("Charge"),1,0,'R',true); $pdf->SetFillColor(217,237,247); $pdf->Cell(17,$ht,convertirc("Retenu"),1,1,'R',true); $pdf->SetFont('Arial','', 6); $ordre = "0"; $fraisReel_acte_med = "0"; $fraisReel_phar_cons = "0"; $fraisReel = "0"; $montantTm = "0"; $montantArembourser = "0"; $montantApayer = "0"; foreach ($factures as $facture) { $ordre++; $pdf->Cell(7,$ht,$ordre,1,0,'C',false); $pdf->Cell(7,$ht,$facture['jourFacture'],1,0,'C',false); $pdf->Cell(14,$ht,convertirc($facture['numeroPolice']),1,0,'C',false); $pdf->Cell(36,$ht,convertirc(substr($facture['souscripteur'], 0, 25)),1,0,'L',false); // $pdf->Cell(44,$ht,convertirc(substr($facture['adherent'], 0, 30)),1,0,'L',false); $pdf->Cell(44,$ht,substr($facture['adherent'], 0, 30),1,0,'L',false); $pdf->Cell(14,$ht,convertirc($facture['numeroBeneficiaire']),1,0,'C',false); // $pdf->Cell(44,$ht,convertirc(substr($facture['beneficiaire'], 0, 30)),1,0,'L',false); $pdf->Cell(44,$ht,substr($facture['beneficiaire'], 0, 30),1,0,'L',false); $pdf->Cell(14,$ht,convertirc($facture['numeroBon']),1,0,'C',false); $pdf->Cell(17,$ht,format_N($facture['fraisReel_acte_med']),1,0,'R',false); $pdf->Cell(17,$ht,format_N($facture['fraisReel_phar_cons']),1,0,'R',false); $pdf->Cell(17,$ht,format_N($facture['fraisReel']),1,0,'R',false); $pdf->Cell(12,$ht,format_N($facture['montantTm']),1,0,'R',false); $pdf->Cell(17,$ht,format_N($facture['montantArembourser']),1,0,'R',false); $pdf->Cell(17,$ht,format_N($facture['montantApayer']),1,1,'R',false); $fraisReel_acte_med += $facture['fraisReel_acte_med']; $fraisReel_phar_cons += $facture['fraisReel_phar_cons']; $fraisReel += $facture['fraisReel']; $montantTm += $facture['montantTm']; $montantArembourser += $facture['montantArembourser']; $montantApayer += $facture['montantApayer']; } $pdf->SetFont('Arial','B', 8); $pdf->Cell(180,$ht,convertirc("TOTAUX : "),1,0,'C',false); $pdf->Cell(17,$ht,format_N($fraisReel_acte_med),1,0,'R',false); $pdf->Cell(17,$ht,format_N($fraisReel_phar_cons),1,0,'R',false); $pdf->Cell(17,$ht,format_N($fraisReel),1,0,'R',false); $pdf->Cell(12,$ht,format_N($montantTm),1,0,'R',false); $pdf->Cell(17,$ht,format_N($montantArembourser),1,0,'R',false); $pdf->Cell(17,$ht,format_N($montantApayer),1,1,'R',false); $pdf->Ln(3); $pdf->SetFontSize(8); $pdf->Cell(0,6,convertirc('Imprimé par le prestataire / Printed by the provider'),0,1,'C',false); $fichier="Temp/borderau_decompte"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='
reglement->getreglement($idReglement); $pdf = new FPDF_Protection(); $pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES'); $userPassword = ''; $ownerPassword = null; $pdf->SetProtection(['print'], $userPassword, $ownerPassword); $pdf->AliasNbPages(); $pdf->AddPage(); $ht=10; $lg=60; $pdf->SetMargins(10, 10, 10) ; $pdf->SetFont('Arial','B', 15); $pdf->SetY(25); $pdf->Cell(0,10,convertirc($_SESSION['p_nomSociete']),1,1,'C',false); $pdf->Ln(5); $pdf->SetFont('Arial','BU', 15); $pdf->SetFontSize(12); $pdf->Cell(0,10,convertirc("DECOMPTE DE REGLEMENT"),0,1,'C',false); $pdf->Ln(5); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("PRESTATAIRE"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,convertirc(': '.$reglement['prestataire']),0,1,'L'); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("PERIODE"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,convertirc(': '.$reglement['periode']),0,1,'L'); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("MONTANT FACTURE"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,": ".format_N($reglement['montantPrestataire'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("MONTANT A PAYER"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,": ".format_N($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("DIFFERENCES"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,": ".format_N($reglement['difference'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->SetFont('Arial','B', 11); $pdf->Cell($lg,10,convertirc("MONTANT PAYE"),0,0,'L',false); $pdf->SetFont('Arial','I',11); $pdf->Cell(0,10,": ".format_N($reglement['montantPaye'])." ".$_SESSION['p_devise_C'],0,1,'L'); $pdf->Ln(5); $pdf->Cell(0,10,convertirc('APPROUVE, LE ').dateheureFr($reglement['heureValidationDecompte'])." par ".$reglement['userValidationDecompte'],0,1,'C',false); $pdf->Ln(5); $pdf->SetFont('Arial','B', 11); $pdf->Cell(0,10,convertirc('Fait à '.$_SESSION['p_villeSociete'].', le ').heureCourante(),0,1,'C',false); $pdf->Ln(5); $pdf->SetFont('Arial','B', 11); $pdf->Cell(0,10,convertirc("Accord du Prestataire"),0,1,'C'); $fichier="Temp/TMP_ACCORD_PREST_DECOMPTE"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='