From 04369ff4f11e7b1f0c9bcb44176d9bbaef4848eb Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sun, 22 Jan 2017 17:28:56 +0100 Subject: [PATCH] Fix word-wrapping in invoices --- src/pretix/base/__init__.py | 2 +- src/pretix/base/services/invoices.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/__init__.py b/src/pretix/base/__init__.py index f6807b768b..d30036e03f 100644 --- a/src/pretix/base/__init__.py +++ b/src/pretix/base/__init__.py @@ -19,6 +19,6 @@ class PretixBaseConfig(AppConfig): default_app_config = 'pretix.base.PretixBaseConfig' try: - import pretix.celery_app as celery # NOQA + import pretix.celery_app as celery # NOQA except ImportError: pass diff --git a/src/pretix/base/services/invoices.py b/src/pretix/base/services/invoices.py index cdf4970389..dc070b6d8e 100644 --- a/src/pretix/base/services/invoices.py +++ b/src/pretix/base/services/invoices.py @@ -314,6 +314,7 @@ def _invoice_generate_german(invoice, f): tstyledata = [ ('ALIGN', (1, 0), (-1, -1), 'RIGHT'), + ('VALIGN', (0, 0), (-1, -1), 'TOP'), ('FONTNAME', (0, 0), (-1, 0), 'OpenSansBd'), ('FONTNAME', (0, -1), (-1, -1), 'OpenSansBd'), ('LEFTPADDING', (0, 0), (0, -1), 0), @@ -328,7 +329,7 @@ def _invoice_generate_german(invoice, f): total = Decimal('0.00') for line in invoice.lines.all(): tdata.append(( - line.description, + Paragraph(line.description, styles['Normal']), lformat("%.2f", line.tax_rate) + " %", lformat("%.2f", line.net_value) + " " + invoice.event.currency, lformat("%.2f", line.gross_value) + " " + invoice.event.currency,