From da5409d941e9285a2e2a9e979f958f0549ed509d Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sun, 9 Oct 2022 00:31:06 +0200 Subject: [PATCH] WIP: don notification --- controle_don/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controle_don/main.py b/controle_don/main.py index 047542a..2272e20 100755 --- a/controle_don/main.py +++ b/controle_don/main.py @@ -85,19 +85,19 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg) -def notify_unpaid(donor): +def notify_unpaid(record): # Get infos name, surname, address, postal_code, city, email, amount, mode, truc = \ - get_file_content_all(WORKDIR+"/transition/"+donor).split("\n") + get_file_content_all(WORKDIR+"/transition/"+record).split("\n") pass - BUF.append("* {} {}, {} €".format(numero, name, amount)) + BUF.append("* {} {}, {} €".format(record, name, amount)) BUF.append(" NOTIFICATION DONATEUR") BUF.append("") mailtext = get_file_content_all(MODALITY_MAIL) + "\n" mailtext = mailtext.replace("NOM_DONNEUR", name) - mailtext = mailtext.replace("NUMERO_DON", str(numero)) + mailtext = mailtext.replace("NUMERO_DON", str(record)) mailtext = mailtext.replace("MONTANT_DON", amount) mailtext = mailtext.replace("MODE_DON", year) mailheaders = get_file_content_all(MODALITY_MAIL_HEADERS) + "\n"