From bf45ffd22373b3d4478b08385f1393a80cb5c6e6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 5 Jan 2024 11:18:02 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20erreur=20adresse=20et=20num=C3=A9r?= =?UTF-8?q?o=20t=C3=A9l=C3=A9phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/pdf.php | 21 ++++++++++++++++++++- templates/client.tpl | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/admin/pdf.php b/admin/pdf.php index 2c8ecb5..f26adb2 100644 --- a/admin/pdf.php +++ b/admin/pdf.php @@ -71,10 +71,29 @@ if ($f->type_facture != CERFA) break; } + // utiliser l'adresse configurée dans le plugin sinon celle de l'asso sinon rien ! + if ($plugin->getConfig('rue_asso') != null && + $plugin->getConfig('cp_asso') != null && + $plugin->getConfig('ville_asso') != null) + { + $adresse = + (($plugin->getConfig('numero_rue_asso') != null) ? $plugin->getConfig('numero_rue_asso') . " " : "") . + $plugin->getConfig('rue_asso') . "
" . + $plugin->getConfig('cp_asso') . " " . + $plugin->getConfig('ville_asso'); + } + else if ($config->get('org_address') != null) + { + $adresse = str_replace("\n", '
', $config->get('org_address')); + } + else { + $adresse = ""; + } + $asso = // 'Émis par :

'. ''.$config->get('org_name')."
". - str_replace("\n", '
', $config->get('org_address'))."
". + $adresse ."
". (($t = $plugin->getConfig('rna_asso'))?"RNA : $t
":''). (($t = $plugin->getConfig('siret_asso'))?"SIRET : $t
":''). (($t = $config->get('email_asso'))?"Email : $t
":''). diff --git a/templates/client.tpl b/templates/client.tpl index 08cb1d9..f1ad8ae 100644 --- a/templates/client.tpl +++ b/templates/client.tpl @@ -32,7 +32,7 @@ {if empty($client.telephone)} (Non renseigné) {else} - {$client.telephone|format_tel} + {$client.telephone} {/if}