diff --git a/src/pretix/base/services/invoices.py b/src/pretix/base/services/invoices.py index abab4ad6cf..981006731c 100644 --- a/src/pretix/base/services/invoices.py +++ b/src/pretix/base/services/invoices.py @@ -109,6 +109,8 @@ def build_invoice(invoice: Invoice) -> Invoice: desc += " - " + str(p.variation.value) if p.addon_to_id: desc = " + " + desc + if invoice.event.settings.invoice_attendee_name and p.attendee_name: + desc += "
" + pgettext("invoice", "Attendee: {name}").format(name=p.attendee_name) InvoiceLine.objects.create( position=i, invoice=invoice, description=desc, gross_value=p.price, tax_value=p.tax_value, diff --git a/src/pretix/base/settings.py b/src/pretix/base/settings.py index 283ffa42e1..62ce482b27 100644 --- a/src/pretix/base/settings.py +++ b/src/pretix/base/settings.py @@ -49,6 +49,10 @@ DEFAULTS = { 'default': 'False', 'type': bool, }, + 'invoice_attendee_name': { + 'default': 'True', + 'type': bool, + }, 'invoice_address_required': { 'default': 'False', 'type': bool, diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index 8d4fa45e8e..8abe13f613 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -547,6 +547,10 @@ class InvoiceSettingsForm(SettingsForm): ), help_text=_("Invoices will never be automatically generated for free orders.") ) + invoice_attendee_name = forms.BooleanField( + label=_("Show attendee names on invoices"), + required=False + ) invoice_email_attachment = forms.BooleanField( label=_("Attach invoices to emails"), help_text=_("If invoices are automatically generated for all orders, they will be attached to the order " diff --git a/src/pretix/control/templates/pretixcontrol/event/invoicing.html b/src/pretix/control/templates/pretixcontrol/event/invoicing.html index 371db824da..709ffcdf91 100644 --- a/src/pretix/control/templates/pretixcontrol/event/invoicing.html +++ b/src/pretix/control/templates/pretixcontrol/event/invoicing.html @@ -18,6 +18,7 @@ {% bootstrap_field form.invoice_renderer layout="control" %} {% bootstrap_field form.invoice_language layout="control" %} {% bootstrap_field form.invoice_include_free layout="control" %} + {% bootstrap_field form.invoice_attendee_name layout="control" %} {% bootstrap_field form.invoice_address_from layout="control" %} {% bootstrap_field form.invoice_introductory_text layout="control" %} {% bootstrap_field form.invoice_additional_text layout="control" %}