From 9b8683692bd5d79fd16d1b8402be14dde42e613b Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Tue, 17 Jul 2018 15:06:08 +0200 Subject: [PATCH] activity_type is included on printable voucher --- smash/web/models/mail_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smash/web/models/mail_template.py b/smash/web/models/mail_template.py index 4a7b0ff5..333537ae 100644 --- a/smash/web/models/mail_template.py +++ b/smash/web/models/mail_template.py @@ -293,11 +293,11 @@ class MailTemplate(models.Model): if voucher is not None: voucher_type = voucher.voucher_type.description if voucher.activity_type != '': - voucher_type += ' ' + voucher.activity_type + voucher_type += ' (' + voucher.activity_type + ")" return { "##C_NUMBER##": voucher.number, "##C_PATIENT_NAME##": voucher.study_subject.subject.first_name + ' ' + voucher.study_subject.subject.last_name, - "##C_VOUCHER_TYPE##": voucher.voucher_type.description, + "##C_VOUCHER_TYPE##": voucher_type, "##C_ISSUE_DATE_SHORT##": voucher.issue_date.strftime(DATE_FORMAT_SHORT).decode(date_format_encoding()), "##C_EXPIRY_START_SHORT##": voucher.expiry_date.strftime(DATE_FORMAT_SHORT).decode( date_format_encoding()), -- GitLab