Fix word-wrapping in invoices

This commit is contained in:
Raphael Michel
2017-01-22 17:28:56 +01:00
parent e71691d4a5
commit 04369ff4f1
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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,