forked from CGM_Public/pretix_original
Fix word-wrapping in invoices
This commit is contained in:
@@ -19,6 +19,6 @@ class PretixBaseConfig(AppConfig):
|
|||||||
|
|
||||||
default_app_config = 'pretix.base.PretixBaseConfig'
|
default_app_config = 'pretix.base.PretixBaseConfig'
|
||||||
try:
|
try:
|
||||||
import pretix.celery_app as celery # NOQA
|
import pretix.celery_app as celery # NOQA
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ def _invoice_generate_german(invoice, f):
|
|||||||
|
|
||||||
tstyledata = [
|
tstyledata = [
|
||||||
('ALIGN', (1, 0), (-1, -1), 'RIGHT'),
|
('ALIGN', (1, 0), (-1, -1), 'RIGHT'),
|
||||||
|
('VALIGN', (0, 0), (-1, -1), 'TOP'),
|
||||||
('FONTNAME', (0, 0), (-1, 0), 'OpenSansBd'),
|
('FONTNAME', (0, 0), (-1, 0), 'OpenSansBd'),
|
||||||
('FONTNAME', (0, -1), (-1, -1), 'OpenSansBd'),
|
('FONTNAME', (0, -1), (-1, -1), 'OpenSansBd'),
|
||||||
('LEFTPADDING', (0, 0), (0, -1), 0),
|
('LEFTPADDING', (0, 0), (0, -1), 0),
|
||||||
@@ -328,7 +329,7 @@ def _invoice_generate_german(invoice, f):
|
|||||||
total = Decimal('0.00')
|
total = Decimal('0.00')
|
||||||
for line in invoice.lines.all():
|
for line in invoice.lines.all():
|
||||||
tdata.append((
|
tdata.append((
|
||||||
line.description,
|
Paragraph(line.description, styles['Normal']),
|
||||||
lformat("%.2f", line.tax_rate) + " %",
|
lformat("%.2f", line.tax_rate) + " %",
|
||||||
lformat("%.2f", line.net_value) + " " + invoice.event.currency,
|
lformat("%.2f", line.net_value) + " " + invoice.event.currency,
|
||||||
lformat("%.2f", line.gross_value) + " " + invoice.event.currency,
|
lformat("%.2f", line.gross_value) + " " + invoice.event.currency,
|
||||||
|
|||||||
Reference in New Issue
Block a user