diff --git a/controle_cotisation/main.py b/controle_cotisation/main.py index 163a25f..6415503 100755 --- a/controle_cotisation/main.py +++ b/controle_cotisation/main.py @@ -239,12 +239,22 @@ def renotify_unpaid(member): # Get member infos name, numero, email = get_member_infos(member) - amount = gestion_get_amount(member) + amount = "{},{}".format(str(gestion_get_amount(member))[:-2], + str(gestion_get_amount(member))[-2:]) + year = gestion_get_year(member)[:4] - BUF.append("* {} (numero {}), {}, {}".format(member, numero, name, amount)) - BUF.append(" RENOTIFICATION MEMBRE") + BUF.append("* {} (numero {}), {}, {} €".format(member, numero, name, amount)) + BUF.append(" NOTIFICATION MEMBRE") BUF.append("") - pass + + mailtext = get_file_content_all(MODALITY_MAIL) + "\n" + mailtext = mailtext.replace("NOM_COTISANT", name) + mailtext = mailtext.replace("NUMERO_MEMBRE", numero) + mailtext = mailtext.replace("MONTANT_COTISATION", amount) + mailheaders = get_file_content_all(MODALITY_MAIL_HEADERS).replace("ANNEE_CIVILE", year) + mailheaders = mailheaders.replace("COURRIEL-COTISANT", email) + + sendmail(mailheaders, mailtext) def check_expired_unpaid(): expired_members = gestion_get_expired()