From 76a369d3515490374c245dc813748953c89904bd Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 17 Feb 2020 07:43:24 +0100 Subject: [PATCH 1/2] NEW: Donation - Update FR CERFA to 11580*04 --- htdocs/core/modules/dons/html_cerfafr.html | 40 +++++++++++++------ .../modules/dons/html_cerfafr.modules.php | 20 +++++----- htdocs/core/modules/modDon.class.php | 4 +- htdocs/don/admin/donation.php | 10 ++--- .../install/mysql/migration/11.0.0-12.0.0.sql | 1 + 5 files changed, 45 insertions(+), 30 deletions(-) diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 31bf444c63b..75e046bf565 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -3,21 +3,35 @@ Reçu au titre des dons à certains organismes d’intérêt général + +
- - @@ -217,7 +231,7 @@ - +
+
- N° 11580*03
+ N° 11580*04
DGFIP
Reçu au titre des dons
à certains organismes d’intérêt général

- Articles 200, 238 bis et 885-0 V bis A du code général des impôts (CGI) + Articles 200, 238 bis et 978 du code général des impôts (CGI)
Numéro d'ordre du reçu
@@ -46,13 +60,13 @@ __MAIN_INFO_SOCIETE_NOM__
Adresse :
__MAIN_INFO_SOCIETE_ADDRESS__
- Code postal __MAIN_INFO_SOCIETE_ZIP__ Commune __MAIN_INFO_SOCIETE_TOWN__
+ Code postal __MAIN_INFO_SOCIETE_ZIP__ Commune __MAIN_INFO_SOCIETE_TOWN__
Objet:
__MAIN_INFO_SOCIETE_OBJECT__
+
Cochez la case concernée (1) :
@@ -90,7 +104,7 @@ - + @@ -138,7 +152,7 @@ - +
Association cultuelle ou de bienfaisance et établissement public des cultes reconnus d'Alsace-MoselleAssociation cultuelle ou de bienfaisance et établissement public reconnus d'Alsace-Moselle
Autre organisme : ………………………………………………………………………………………………Autres organisme : ………………………………………………………………………………………………
__ARTICLE200__ __ARTICLE238____ARTICLE885____ARTICLE978__

@@ -251,7 +265,7 @@ - - @@ -274,10 +288,10 @@
(3) + L’organisme bénéficiaire peut cocher une ou plusieurs cases.
L’organisme bénéficiaire peut, en application de l’article L. 80 C du livre des procédures fiscales, demander à l’administration s’il relève de l’une des catégories d’organismes mentionnées aux articles 200 et 238 bis du code général des impôts.
@@ -262,7 +276,7 @@
(4) + Notamment : abandon de revenus ou de produits ; frais engagés par les bénévoles, dont ils renoncent expressément au remboursement
- +
- - +
Date et signature

+
Date et signature
'; + $CodeDon = ''; } else { - $CodeDon = ''; + $CodeDon = ''; } */ @@ -204,7 +204,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__ModePaiement__', $ModePaiement, $form); $frencharticle=''; - if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencharticle='Article 200, 238 bis et 885-0 V bis A du code général des impôts (CGI)'; + if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencharticle='Article 200, 238 bis et 978 du code général des impôts (CGI)'; $form = str_replace('__FrenchArticle__', $frencharticle, $form); $frencheligibility=''; @@ -237,18 +237,18 @@ class html_cerfafr extends ModeleDon } $form = str_replace('__ARTICLE238__', $art238, $form); - $art885=''; + $art978=''; if (preg_match('/fr/i', $outputlangs->defaultlang)) { - if ($conf->global->DONATION_ART885 >= 1) + if ($conf->global->DONATION_ART978 >= 1) { - $art885='885-0 V bis du CGI'; + $art978='978 du CGI'; } else { - $art885='885-0 V bis du CGI'; + $art978='978 du CGI'; } } - $form = str_replace('__ARTICLE885__', $art885, $form); + $form = str_replace('__ARTICLE978__', $art978, $form); // Save file on disk dol_syslog("html_cerfafr::write_file $file"); diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 42b4a8ef2b2..f4999f309c2 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -91,10 +91,10 @@ class modDon extends DolibarrModules $this->const[$r][4] = 0; $r++; - $this->const[$r][0] = "DONATION_ART885"; + $this->const[$r][0] = "DONATION_ART978"; $this->const[$r][1] = "yesno"; $this->const[$r][2] = "0"; - $this->const[$r][3] = 'Option Française - Eligibilité Art885-0 V bis du CGI'; + $this->const[$r][3] = 'Option Française - Eligibilité Art978 du CGI'; $this->const[$r][4] = 0; $r++; diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 9387c1a099d..e8e7fa4f5b9 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -2,9 +2,9 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2012-2015 Juanjo Menent * Copyright (C) 2013-2017 Philippe Grand - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2020 Alexandre Spangaro * Copyright (C) 2015 Benoit Bruchard - * Copyright (C) 2019 Thibault FOUCART + * Copyright (C) 2019 Thibault FOUCART * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -431,13 +431,13 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY)) print ''; print ''; - print ''; + print ''; print ''; print "
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index bcda35459f6..01ebd673041 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2006 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Marcos García - * Copyright (C) 2014-2015 Alexandre Spangaro + * Copyright (C) 2014-2020 Alexandre Spangaro * Copyright (C) 2015 Benoit Bruchard * * This program is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ class html_cerfafr extends ModeleDon $this->db = $db; $this->name = "cerfafr"; - $this->description = $langs->trans('DonationsReceiptModel').' - fr_FR - Cerfa 11580*03'; + $this->description = $langs->trans('DonationsReceiptModel').' - fr_FR - Cerfa 11580*04'; // Dimension page for size A4 $this->type = 'html'; @@ -150,11 +150,11 @@ class html_cerfafr extends ModeleDon /* if (empty($don->societe)) { - $CodeDon = ' 200 du CGI 238 bis du CGI 885-0 V bis A du CGI 200 du CGI 238 bis du CGI 978 du CGI 200 du CGI 238 bis du CGI 885-0 V bis A du CGI 200 du CGI 238 bis du CGI 978 du CGI
'.$langs->trans("DONATION_ART885").''.$langs->trans("DONATION_ART978").''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('DONATION_ART885'); + print ajax_constantonoff('DONATION_ART978'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("DONATION_ART885", $arrval, $conf->global->DONATION_ART885); + print $form->selectarray("DONATION_ART978", $arrval, $conf->global->DONATION_ART978); } print '
\n"; diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index d13e4a19d00..fe0c74e6e85 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -161,3 +161,4 @@ INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, desc INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL); INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL); +DELETE FROM llx_const WHERE name = __ENCRYPT('DONATION_ART885')__; \ No newline at end of file From aa9d00c62e84a672e4de2713050dfc72d894a259 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 17 Feb 2020 07:47:08 +0100 Subject: [PATCH 2/2] FIX --- htdocs/core/modules/dons/html_cerfafr.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 75e046bf565..4c5b69aadb8 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -22,7 +22,7 @@
- - +
+
N° 11580*04
DGFIP @@ -152,7 +152,7 @@
Autres organisme : ………………………………………………………………………………………………Autres organismes : ………………………………………………………………………………………………