From 60c946181e6e14192afeb81429c26453596a3d47 Mon Sep 17 00:00:00 2001 From: engel <> Date: Fri, 25 Feb 2022 17:24:24 +0000 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20des=20fichiers=20du=20plugin?= =?UTF-8?q?=20dans=20un=20sous-r=C3=A9pertoire=20src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FossilOrigin-Name: 8fde9575104fbd8db6ada4f6120cccd9dfb06459ea79349b677cb387795d2b7e --- lib/RecusPDF.php | 196 ------------------ COPYING => src/COPYING | 0 config.json => src/config.json | 0 {data => src/data}/default_signature.png | Bin .../garradin_plugin.ini | 0 install.php => src/install.php | 0 {lib => src/lib}/Activite.php | 0 {lib => src/lib}/Personne.php | 0 {lib => src/lib}/RecusHTML.php | 0 {lib => src/lib}/Tarif.php | 0 {lib => src/lib}/Utils.php | 0 {lib => src/lib}/Versement.php | 0 {lib => src/lib}/pdf.css | 0 {templates => src/templates}/_nav.tpl | 0 {templates => src/templates}/config.tpl | 0 {templates => src/templates}/index.tpl | 0 {templates => src/templates}/upload.tpl | 0 .../templates}/versements_activites.tpl | 0 .../templates}/versements_personnes.tpl | 0 {www => src/www}/admin/action.php | 0 {www => src/www}/admin/config.php | 0 {www => src/www}/admin/generer_activites.php | 0 {www => src/www}/admin/generer_personnes.php | 0 {www => src/www}/admin/index.php | 0 {www => src/www}/admin/script.js | 0 {www => src/www}/admin/style.css | 0 {www => src/www}/admin/upload.php | 0 .../www}/admin/versements_activites.php | 0 .../www}/admin/versements_personnes.php | 0 29 files changed, 196 deletions(-) delete mode 100644 lib/RecusPDF.php rename COPYING => src/COPYING (100%) rename config.json => src/config.json (100%) rename {data => src/data}/default_signature.png (100%) rename garradin_plugin.ini => src/garradin_plugin.ini (100%) rename install.php => src/install.php (100%) rename {lib => src/lib}/Activite.php (100%) rename {lib => src/lib}/Personne.php (100%) rename {lib => src/lib}/RecusHTML.php (100%) rename {lib => src/lib}/Tarif.php (100%) rename {lib => src/lib}/Utils.php (100%) rename {lib => src/lib}/Versement.php (100%) rename {lib => src/lib}/pdf.css (100%) rename {templates => src/templates}/_nav.tpl (100%) rename {templates => src/templates}/config.tpl (100%) rename {templates => src/templates}/index.tpl (100%) rename {templates => src/templates}/upload.tpl (100%) rename {templates => src/templates}/versements_activites.tpl (100%) rename {templates => src/templates}/versements_personnes.tpl (100%) rename {www => src/www}/admin/action.php (100%) rename {www => src/www}/admin/config.php (100%) rename {www => src/www}/admin/generer_activites.php (100%) rename {www => src/www}/admin/generer_personnes.php (100%) rename {www => src/www}/admin/index.php (100%) rename {www => src/www}/admin/script.js (100%) rename {www => src/www}/admin/style.css (100%) rename {www => src/www}/admin/upload.php (100%) rename {www => src/www}/admin/versements_activites.php (100%) rename {www => src/www}/admin/versements_personnes.php (100%) 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 diff --git a/COPYING b/src/COPYING similarity index 100% rename from COPYING rename to src/COPYING diff --git a/config.json b/src/config.json similarity index 100% rename from config.json rename to src/config.json diff --git a/data/default_signature.png b/src/data/default_signature.png similarity index 100% rename from data/default_signature.png rename to src/data/default_signature.png diff --git a/garradin_plugin.ini b/src/garradin_plugin.ini similarity index 100% rename from garradin_plugin.ini rename to src/garradin_plugin.ini diff --git a/install.php b/src/install.php similarity index 100% rename from install.php rename to src/install.php diff --git a/lib/Activite.php b/src/lib/Activite.php similarity index 100% rename from lib/Activite.php rename to src/lib/Activite.php diff --git a/lib/Personne.php b/src/lib/Personne.php similarity index 100% rename from lib/Personne.php rename to src/lib/Personne.php diff --git a/lib/RecusHTML.php b/src/lib/RecusHTML.php similarity index 100% rename from lib/RecusHTML.php rename to src/lib/RecusHTML.php diff --git a/lib/Tarif.php b/src/lib/Tarif.php similarity index 100% rename from lib/Tarif.php rename to src/lib/Tarif.php diff --git a/lib/Utils.php b/src/lib/Utils.php similarity index 100% rename from lib/Utils.php rename to src/lib/Utils.php diff --git a/lib/Versement.php b/src/lib/Versement.php similarity index 100% rename from lib/Versement.php rename to src/lib/Versement.php diff --git a/lib/pdf.css b/src/lib/pdf.css similarity index 100% rename from lib/pdf.css rename to src/lib/pdf.css diff --git a/templates/_nav.tpl b/src/templates/_nav.tpl similarity index 100% rename from templates/_nav.tpl rename to src/templates/_nav.tpl diff --git a/templates/config.tpl b/src/templates/config.tpl similarity index 100% rename from templates/config.tpl rename to src/templates/config.tpl diff --git a/templates/index.tpl b/src/templates/index.tpl similarity index 100% rename from templates/index.tpl rename to src/templates/index.tpl diff --git a/templates/upload.tpl b/src/templates/upload.tpl similarity index 100% rename from templates/upload.tpl rename to src/templates/upload.tpl diff --git a/templates/versements_activites.tpl b/src/templates/versements_activites.tpl similarity index 100% rename from templates/versements_activites.tpl rename to src/templates/versements_activites.tpl diff --git a/templates/versements_personnes.tpl b/src/templates/versements_personnes.tpl similarity index 100% rename from templates/versements_personnes.tpl rename to src/templates/versements_personnes.tpl diff --git a/www/admin/action.php b/src/www/admin/action.php similarity index 100% rename from www/admin/action.php rename to src/www/admin/action.php diff --git a/www/admin/config.php b/src/www/admin/config.php similarity index 100% rename from www/admin/config.php rename to src/www/admin/config.php diff --git a/www/admin/generer_activites.php b/src/www/admin/generer_activites.php similarity index 100% rename from www/admin/generer_activites.php rename to src/www/admin/generer_activites.php diff --git a/www/admin/generer_personnes.php b/src/www/admin/generer_personnes.php similarity index 100% rename from www/admin/generer_personnes.php rename to src/www/admin/generer_personnes.php diff --git a/www/admin/index.php b/src/www/admin/index.php similarity index 100% rename from www/admin/index.php rename to src/www/admin/index.php diff --git a/www/admin/script.js b/src/www/admin/script.js similarity index 100% rename from www/admin/script.js rename to src/www/admin/script.js diff --git a/www/admin/style.css b/src/www/admin/style.css similarity index 100% rename from www/admin/style.css rename to src/www/admin/style.css diff --git a/www/admin/upload.php b/src/www/admin/upload.php similarity index 100% rename from www/admin/upload.php rename to src/www/admin/upload.php diff --git a/www/admin/versements_activites.php b/src/www/admin/versements_activites.php similarity index 100% rename from www/admin/versements_activites.php rename to src/www/admin/versements_activites.php diff --git a/www/admin/versements_personnes.php b/src/www/admin/versements_personnes.php similarity index 100% rename from www/admin/versements_personnes.php rename to src/www/admin/versements_personnes.php