254 lines
8.7 KiB
PHP
254 lines
8.7 KiB
PHP
<?php
|
|
require_once 'Framework/Controleurrequete.php'; // OK
|
|
require_once 'Modele/Facture.php';
|
|
|
|
class ControleurAjaximprimerdemandereglementdc extends Controleurrequete
|
|
{
|
|
private $facture;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->facture = new Facture();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idDossierClassique = $_SESSION['idDossierClassique'];
|
|
|
|
$dossier = $this->facture->getdossierclassique($idDossierClassique);
|
|
|
|
$pdf = new FPDF();
|
|
$pdf->AliasNbPages();
|
|
$pdf->AddPage();
|
|
|
|
$ht=10;
|
|
|
|
$lg=60;
|
|
|
|
$pdf->SetMargins(10, 10, 10) ;
|
|
|
|
$pdf->SetFont('Arial','B', 15);
|
|
|
|
$pdf->SetY(20);
|
|
|
|
$pdf->Cell(0,10,convertirc($_SESSION['nomSociete'] ),1,1,'C',false);
|
|
|
|
$pdf->Ln(10);
|
|
|
|
$pdf->SetFont('Arial','BU', 15);
|
|
|
|
$pdf->SetFontSize(12);
|
|
|
|
$pdf->Cell(0,10,convertirc(_("DEMANDE DE REGLEMENT")." No ".$dossier['numeroDemandeReglement']),0,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_('NOMS ET PRENOMS')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$dossier['beneficiaireReglement']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_("No Lot")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$dossier['numeroLotDecompte']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_('Police')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$dossier['numeroPolice']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_("Souscripteur")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$dossier['souscripteur']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_('MONTANT EN CHIFFRES')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,": ".format_N($dossier['montantApayer'])." ".$_SESSION['devise_C'],0,1,'L');
|
|
$pdf->Cell(0,10, convetirEnLettre($dossier['montantApayer'], $_SESSION['lang'])." ".$_SESSION['devise_C'],1,1,'C');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_("MOTIF (Rembourser soins de )")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(": ".$dossier['beneficiaire']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_('A VERSER AU COMPTE')).' No',0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',11);
|
|
if($dossier['banqueBeneficiaire']>" ")
|
|
{
|
|
$pdf->Cell(0,10,convertirc(': '.$dossier['numeroCompteBeneficiaire'].' SUR : '.$dossier['banqueBeneficiaire']),0,1,'L');
|
|
}
|
|
else
|
|
{
|
|
$pdf->Cell(0,10,convertirc(': '),0,1,'L');
|
|
}
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->Cell(0,10,convertirc(_('Fait à')).' '.$_SESSION['villeSociete'].' '._('le').' '.heureCouranteLang($_SESSION['lang']),0,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
$pdf->Cell($lg,10,convertirc(_("SERVICE DEMANDEUR")),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','I',11);
|
|
$pdf->Cell(0,10,convertirc(": .........................................."),0,1,'L');
|
|
|
|
$pdf->Ln(15);
|
|
|
|
$pdf->SetFont('Arial','B', 11);
|
|
/*
|
|
$pdf->Cell($lg,10,convertirc(_("VISA DIRECTION SANTE")),0,0,'L',false);
|
|
$pdf->Cell(0,10,convertirc(_("VISA DAF")." "),0,1,'R');
|
|
*/
|
|
|
|
$pdf->Cell($lg,10,convertirc((isset($_SESSION['affichagedynamique']['VISA DIRECTION SANTE'])) ? _($_SESSION['affichagedynamique']['VISA DIRECTION SANTE']) : _("VISA DIRECTION SANTE")),0,0,'L',false);
|
|
$pdf->Cell(0,10,convertirc((isset($_SESSION['affichagedynamique']['VISA DAF'])) ? _($_SESSION['affichagedynamique']['VISA DAF']) : _("VISA DAF")),0,1,'R');
|
|
|
|
$pdf->Ln(30);
|
|
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,10,convertirc(_("Chèque").' / '._('OP')." No : _______________________________________"),0,1,'R');
|
|
$pdf->Cell(0,10,convertirc(_("Sur")." : _______________________________________"),0,1,'R');
|
|
$pdf->Cell(0,10,convertirc("Date : _______________________________________"),0,1,'R');
|
|
|
|
$fichier="Temp/TMP_DMDE_REGT_REMB_CLASS"."_".uniqid().".pdf";
|
|
$pdf->Output($fichier,"F");
|
|
|
|
$t_html =' <div id ="div_export_demande_reglement" class="alert alert-info"> ';
|
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
|
|
$t_html .=' </div ';
|
|
echo $t_html;
|
|
}
|
|
|
|
// RELEVE
|
|
public function imprimerreleve()
|
|
{
|
|
$idDossierClassique = $_SESSION['idDossierClassique'];
|
|
|
|
$dossier = $this->facture->getdossierclassique($idDossierClassique);
|
|
|
|
$factures = $this->facture->getfacturesdossierclassique($idDossierClassique);
|
|
|
|
$pdf = new FPDF();
|
|
$pdf->AliasNbPages();
|
|
$pdf->AddPage();
|
|
|
|
$ht=10;
|
|
|
|
$lg=60;
|
|
|
|
$pdf->SetMargins(10, 10, 10) ;
|
|
|
|
$pdf->SetFont('Arial','B', 15);
|
|
|
|
$pdf->SetY(25);
|
|
|
|
$pdf->Cell(0,7,convertirc($_SESSION['nomSociete'] ),1,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','BU', 15);
|
|
|
|
$pdf->SetFontSize(12);
|
|
|
|
$pdf->Cell(0,7,convertirc(_('RELEVE REMBOURSEMENT HORS TIERS PAYANT')),0,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_('BENEFICIAIRE DU PAIEMENT')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['beneficiaireReglement']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_("No Lot")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['numeroLotDecompte']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_('Police')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['numeroPolice']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_("Souscripteur")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['souscripteur']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_("ADHERENT")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['adherent']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_("No BENEFICIAIRE")),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['numeroBeneficiaire']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc(_('BENEFICIAIRE DES SOINS')),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,convertirc(': '.$dossier['beneficiaire']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','B', 10);
|
|
$pdf->Cell($lg,7,convertirc("TOTAL"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','I',10);
|
|
$pdf->Cell(0,7,": ".format_N($dossier['montantApayer'])." ".$_SESSION['devise_C'],0,1,'L');
|
|
$pdf->Cell(0,7, convetirEnLettre($dossier['montantApayer'], $_SESSION['lang'])." ".$_SESSION['devise_C'],1,1,'C');
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','BIU', 10);
|
|
|
|
$pdf->Cell(0,7,convertirc(_('Liste des Factures du Dossier')),0,1,'C',false);
|
|
|
|
$pdf->Ln(2);
|
|
|
|
$pdf->SetFont('Arial','BI', 7);
|
|
|
|
$ht=7;
|
|
|
|
$pdf->Cell(20,$ht,convertirc("Date"),1,0,'C',false);
|
|
$pdf->Cell(25,$ht,convertirc(_('Saisie')),1,0,'C',false);
|
|
$pdf->Cell(50,$ht,convertirc(_("Prestataire")),1,0,'C',false);
|
|
$pdf->Cell(25,$ht,convertirc(_('No Fact')),1,0,'C',false);
|
|
$pdf->Cell(20,$ht,convertirc(_("Frais")),1,0,'C',false);
|
|
$pdf->Cell(15,$ht,convertirc(_('T M')),1,0,'C',false);
|
|
$pdf->Cell(15,$ht,convertirc(_('Dépassement')),1,0,'C',false);
|
|
$pdf->Cell(20,$ht,convertirc(_('Retenu')),1,1,'C',false);
|
|
|
|
$pdf->SetFont('Arial','I', 7);
|
|
|
|
foreach ($factures as $facture)
|
|
{
|
|
$pdf->Cell(20,$ht,dateFr($facture['dateFacture']),1,0,'C',false);
|
|
$pdf->Cell(25,$ht,dateheureFr($facture['dateSysteme_f']),1,0,'C',false);
|
|
$pdf->Cell(50,$ht,convertirc($facture['prestataire']),1,0,'C',false);
|
|
$pdf->Cell(25,$ht,$facture['numeroFacture'],1,0,'C',false);
|
|
$pdf->Cell(20,$ht,format_N($facture['fraisReel']),1,0,'C',false);
|
|
$pdf->Cell(15,$ht,format_N($facture['montantTm']),1,0,'C',false);
|
|
$pdf->Cell(15,$ht,format_N($facture['fraisExclu']),1,0,'C',false);
|
|
$pdf->Cell(20,$ht,format_N($facture['fraisRetenu']),1,1,'C',false);
|
|
}
|
|
|
|
// ajouté le 21/11/2018
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->Cell(0,10,convertirc(_('Fait à')).' '.$_SESSION['villeSociete'].', '._('le').' '.heureCouranteLang($_SESSION['lang']),0,1,'C',false);
|
|
|
|
$fichier="Temp/TMP_RELEVE_REMB_CLASS"."_".uniqid().".pdf";
|
|
$pdf->Output($fichier,"F");
|
|
|
|
$t_html =' <div id ="div_export_demande_reglement" class="alert alert-info"> ';
|
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
|
|
$t_html .=' </div ';
|
|
echo $t_html;
|
|
|
|
}
|
|
|
|
} |