diff --git a/cotisations/models.py b/cotisations/models.py index 006e8d69..8174e0bb 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -297,7 +297,8 @@ class Facture(BaseInvoice): if self.is_subscription() \ and not self.__original_control \ and self.control \ - and CotisationsOption.get_cached_value('send_voucher_mail'): + and CotisationsOption.get_cached_value('send_voucher_mail') \ + and self.user.is_adherent(): send_mail_voucher(self) def __str__(self): diff --git a/cotisations/templates/cotisations/email_subscription_accepted b/cotisations/templates/cotisations/email_subscription_accepted index 58027cec..bd1c7628 100644 --- a/cotisations/templates/cotisations/email_subscription_accepted +++ b/cotisations/templates/cotisations/email_subscription_accepted @@ -1,6 +1,6 @@ Bonjour {{name}} ! -Nous vous informons que votre cotisation auprès de {{asso_name}} a été acceptée. Vous voilà donc membre de l'association. +Nous vous informons que votre cotisation auprès de {{asso_name}} a été acceptée. Vous voilà donc membre de l'association jusqu'au {{ date_end|date:"d/m/Y" }}. Vous trouverez en pièce jointe un reçu. @@ -11,7 +11,7 @@ L'équipe de {{asso_name}}. --- -Your subscription to {{asso_name}} has just been accepted. You are now a full member of {{asso_name}}. +Your subscription to {{asso_name}} has just been accepted. You are now a full member of {{asso_name}} until {{ date_end|date:"d/m/Y" }}. You will find with this email a subscription voucher. diff --git a/cotisations/utils.py b/cotisations/utils.py index 4715338b..8b7ee2b0 100644 --- a/cotisations/utils.py +++ b/cotisations/utils.py @@ -117,7 +117,8 @@ def send_mail_voucher(invoice): invoice.user.surname ), 'asso_email': AssoOption.get_cached_value('contact'), - 'asso_name': AssoOption.get_cached_value('name') + 'asso_name': AssoOption.get_cached_value('name'), + 'date_end': invoice.get_subscription().latest('date_end').date_end, } mail = EmailMessage( diff --git a/re2o/contributors.py b/re2o/contributors.py index ac663d9c..e9f201c3 100644 --- a/re2o/contributors.py +++ b/re2o/contributors.py @@ -14,7 +14,6 @@ CONTRIBUTORS = [ 'Matthieu "Lebanni" Michelet', 'Arthur "Grizzly" Grisel-Davy', 'Simon "Rezatoune" Brélivet', - 'Sellem Lev-Arcady', 'David "5-1" Sinquin', 'Pierre "Redstorm" Cadart', 'Éloi "Goslig" Alain',