From 71c915f5f7768c614daa4c0c65cfaf5dca853e9f Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 14 May 2020 09:22:52 +0200 Subject: [PATCH] Fix incorrect foreign currency total on invoices --- src/pretix/base/invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/invoice.py b/src/pretix/base/invoice.py index da0b7ad4c1..6b44cd537c 100644 --- a/src/pretix/base/invoice.py +++ b/src/pretix/base/invoice.py @@ -672,6 +672,7 @@ class ClassicInvoiceRenderer(BaseReportlabInvoiceRenderer): table ])) elif self.invoice.foreign_currency_display and self.invoice.foreign_currency_rate: + foreign_total = round_decimal(total * self.invoice.foreign_currency_rate) story.append(Spacer(1, 5 * mm)) story.append(Paragraph( pgettext( @@ -679,7 +680,7 @@ class ClassicInvoiceRenderer(BaseReportlabInvoiceRenderer): '{date}, the invoice total corresponds to {total}.' ).format(rate=localize(self.invoice.foreign_currency_rate), date=date_format(self.invoice.foreign_currency_rate_date, "SHORT_DATE_FORMAT"), - total=fmt(total)), + total=fmt(foreign_total)), self.stylesheet['Fineprint'] ))