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"