From 64dc0d541dc563c9de3e5eb93cdaf15b026ab312 Mon Sep 17 00:00:00 2001 From: Noizette Date: Sat, 24 Oct 2020 01:57:41 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20num=C3=A9ro=20RNA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/config.tpl | 2 ++ www/admin/config.php | 4 +++- www/admin/facture_pdf.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/config.tpl b/templates/config.tpl index d6ec887..bbcbb36 100644 --- a/templates/config.tpl +++ b/templates/config.tpl @@ -13,6 +13,8 @@
Configuration du plugin
+
+
diff --git a/www/admin/config.php b/www/admin/config.php index ff5870e..4cacb7c 100644 --- a/www/admin/config.php +++ b/www/admin/config.php @@ -9,7 +9,8 @@ $session->requireAccess('compta', Membres::DROIT_ADMIN); if (f('save') && $form->check('facturation_config')) { try { - $plugin->setConfig('siret_asso', f('siret_asso')); + $plugin->setConfig('rna_asso', trim(f('rna_asso'))); + $plugin->setConfig('siret_asso', trim(f('siret_asso'))); $plugin->setConfig('validate_cp', f('validate_cp')); $plugin->setConfig('unique_client_name', f('unique_name')); $plugin->setConfig('footer', f('footer')); @@ -24,6 +25,7 @@ if (f('save') && $form->check('facturation_config')) $tpl->assign('ok', qg('ok') !== null); +$tpl->assign('rna_asso', $plugin->getConfig('rna_asso') ?: ''); $tpl->assign('siret_asso', $plugin->getConfig('siret_asso') ?: ''); $tpl->assign('footer', $plugin->getConfig('footer') ?: ''); $tpl->assign('validate_cp', $plugin->getConfig('validate_cp') ? 'checked':''); diff --git a/www/admin/facture_pdf.php b/www/admin/facture_pdf.php index d063ce8..eaa4ee6 100644 --- a/www/admin/facture_pdf.php +++ b/www/admin/facture_pdf.php @@ -64,6 +64,7 @@ $asso = // 'Émis par :

'. ''.$config->get('nom_asso')."
". str_replace("\n", '
', $config->get('adresse_asso'))."
". + (($t = $plugin->getConfig('rna_asso'))?"RNA : $t
":''). (($t = $plugin->getConfig('siret_asso'))?"SIRET : $t
":''). (($t = $config->get('email_asso'))?"Email : $t
":''). (($t = $config->get('site_asso'))?"Site web : $t
":'');