From 106adaa3b7a502803f102fbfe57aed779dc4259b Mon Sep 17 00:00:00 2001 From: engel <> Date: Fri, 11 Mar 2022 10:51:28 +0000 Subject: [PATCH] suppression lib/RecusPDF.php FossilOrigin-Name: 154973f4d2ddf3e0c4d83d250da237c4cb038000e4a99c779ae8e20b1e4c1590 --- lib/RecusPDF.php | 196 ----------------------------------------------- 1 file changed, 196 deletions(-) delete mode 100644 lib/RecusPDF.php diff --git a/lib/RecusPDF.php b/lib/RecusPDF.php deleted file mode 100644 index 9891cc2..0000000 --- a/lib/RecusPDF.php +++ /dev/null @@ -1,196 +0,0 @@ -AddFont($family, - '', - $family.$style.".ttf", - true); - // bold - $this->AddFont($family, - 'B', - $family.$style."-Bold.ttf", - true); - $this->nomAsso = $nomAsso; - $this->adresseAsso = $adresseAsso; - $this->logoCerfa = $logo; - $this->signature = $signature; - } - - // Header - function Header() - { - parent::Header(); - // Logo - $this->Image($this->logoCerfa, 10, 6, 30); - - // document title - $this->SetTextColor(0, 0, 0); - $this->SetFont('DejaVu','B',12); - $titre = "Reçu au titre des dons à certains organismes d'intérêt général"; - $this->SetXY(50, 10); - // Titre - $this->MultiCell(100, - 6, - $titre, - 0, - 'C'); - - // numéro de Cerfa - $cerfa = "N° 11580*3"; - $this->SetFont('DejaVu', 'B', 10); - $this->SetXY(10, 25); - $this->Cell(100, 0, $cerfa); - - // Articles - $this->SetFont('DejaVu', '', 9); - $this->SetXY(50, 25); - $this->Cell(100, 0, 'Article 200, 238 bis et 885-0 V bis A du code général des impôts'); - } - - // imprimer les informations du bénéficiaire - function imprimer_beneficiaire($nom, $adresse) - { - $this->titre_rubrique("Bénéficiaire des versements"); - $this->SetFont('DejaVu', 'B', 11); - $this->Cell(0, 6, 'Association « ' . $nom . ' »', 'LR', 1); - $this->Cell(0, 6, str_replace(array("\r\n", "\n", "\r"), " ", $adresse), 'LR', 1); - $this->imprimer_description("Objet : ", - "célébrer le culte protestant évangélique et pourvoir aux frais et besoins de ce culte."); - $this->Cell(0, 6, "", 'LRB', 1); - } - - // imprimer un libellé précédé de son titre en gras - function imprimer_description($titre, $libelle) - { - $this->SetFont('DejaVu', 'B', 11); - $this->Cell($this->GetStringWidth($titre), 6, $titre, 'L', 0); - $this->SetFont('DejaVu', '', 11); - $this->Cell(0, 6, $libelle, 'R', 1); - } - - // imprimer le montant de la réduction et un libellé - function imprimer_montant($texte, $montant, $libelle = "") - { - $this->SetFont('DejaVu'); - $this->Cell($this->GetStringWidth($texte), - 6, - $texte, - 'L', - 0); - $this->SetFont('DejaVu','B'); - $valeur = number_format($montant, 2, "," , "") . " euros"; - $this->Cell($this->GetStringWidth($valeur), - 6, - $valeur, - '', - 0); - $this->SetFont('DejaVu'); - if ($libelle != "") - { - $this->Cell(0, - 6, - " : " . $libelle, - 'R', - 1); - } - else - { - $this->Cell(0, 6, "", 'R', 1); - } - } - - function titre_rubrique($texte) - { - $this->SetFont('DejaVu','B',12); - $largeur_texte = $this->GetStringWidth($texte); - $this->setX(10); - $this->SetFillColor(0, 255, 255); - $this->Cell(0, 6, $texte, 'LTR', 1, 'C', true); - $this->Cell(0, 6, "", 'LR', 1); - } - - // imprimer le reçu - function imprimer_recu($annee_recu, - $numero, - $nom, - $lesMontants, - $adresse, - $code_postal, - $ville) - { - - $this->AddPage(); - // Numéro de reçu - $this->SetFont('DejaVu', 'B', 11); - $this->MultiCell(0, 20, 'Reçu numéro ' . $annee_recu . '/' . $numero); - - // bénéficiaire - $this->imprimer_beneficiaire($this->nomAsso, $this->adresseAsso); - - // donateur - $this->Ln(10); - $this->titre_rubrique("Donateur"); - $this->SetFont('DejaVu', 'B', 11); - $this->Cell(0, 6, $nom, 'LR', 1); - $this->Cell(0, 6, $adresse, 'LR', 1); - $this->Cell(0, 6, $code_postal . " " . $ville, 'LR', 1); - $this->Cell(0, 6, "", 'LRB', 1); - - // Montant et autres informations - $this->Ln(10); - $this->SetFont('DejaVu', '', 11); - $this->Cell(0, - 6, - "Le bénéficiaire reconnaît avoir reçu au titre des dons et versements ouvrant droit à réduction d'impôt :", - 'LTR', - 1); - foreach ($lesMontants as $taux => $montant) - { - $this->imprimer_montant(" - la somme de ", $montant, Utils::getLigneReduction($taux)); - } - $this->Cell(0, 3, "", 'LR', 1); - $this->imprimer_description('Date des versements : ', - 'année ' . $annee_recu); - $this->Cell(0, 3, "", 'LR', 1); - $this->MultiCell(0, 6, - "Le bénéficiaire certifie sur l’honneur que les dons et versements qu’il reçoit ouvrent droit à la réduction -d'impôt prévue à l’article 200 du CGI", - 'LR'); - $this->Cell(0, 3, "", 'LR', 1); - $this->imprimer_description("Forme du don : ", "Autre"); - $this->Cell(0, 3, "", 'LR', 1); - $this->imprimer_description("Nature du don : ", "Numéraire"); - $this->Cell(0, 3, "", 'LR', 1); - $this->imprimer_description("Mode de versement : ", "chèque et/ou virement"); - $this->Cell(0, 0, "", 'LRB', 1); - - // cartouche final - $this->Ln(10); - $this->Cell(0, 6, "", 'LRT', 1); - $this->Cell(0, 6, "Rennes le " . date("j/m/Y"), 'LR', 1, 'R'); - $this->Cell(0, 36, "", 'LR', 1); - $this->Cell(0, 0, "", 'LBR', 1); - $this->SetXY(100, 220); - $this->Image($this->signature, null, null, 50); - } -} // class RecusPDF