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
":'');