From be7714be1c1fa9371428072c375e0cc459fc4dff Mon Sep 17 00:00:00 2001 From: Bernard Saulme Date: Wed, 25 Nov 2020 18:11:36 +0100 Subject: [PATCH] Use email model option to joint file for subscription Allow the adherent subscription to use the email model option to join or no joint file. --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 611542b8ebc..d1dfd836696 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -333,7 +333,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && ! $listofpaths = array(); $listofnames = array(); $listofmimes = array(); - if (is_object($object->invoice)) { + if (is_object($object->invoice) && is_object($arraydefaultmessage) && intval($arraydefaultmessage->joinfiles)) { $invoicediroutput = $conf->facture->dir_output; $fileparams = dol_most_recent_file($invoicediroutput.'/'.$object->invoice->ref, preg_quote($object->invoice->ref, '/').'[^\-]+'); $file = $fileparams['fullname'];