mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Configurable invoice prefixes
This commit is contained in:
@@ -96,6 +96,7 @@ def generate_cancellation(invoice: Invoice):
|
||||
cancellation = copy.copy(invoice)
|
||||
cancellation.pk = None
|
||||
cancellation.invoice_no = None
|
||||
cancellation.prefix = None
|
||||
cancellation.refers = invoice
|
||||
cancellation.is_cancellation = True
|
||||
cancellation.date = timezone.now().date()
|
||||
@@ -125,6 +126,7 @@ def generate_invoice(order: Order):
|
||||
invoice = Invoice(
|
||||
order=order,
|
||||
event=order.event,
|
||||
organizer=order.event.organizer,
|
||||
date=timezone.now().date(),
|
||||
locale=locale
|
||||
)
|
||||
@@ -171,7 +173,7 @@ def build_preview_invoice_pdf(event):
|
||||
expires=timezone.now(), code="PREVIEW", total=119)
|
||||
invoice = Invoice(
|
||||
order=order, event=event, invoice_no="PREVIEW",
|
||||
date=timezone.now().date(), locale=locale
|
||||
date=timezone.now().date(), locale=locale, organizer=event.organizer
|
||||
)
|
||||
invoice.invoice_from = event.settings.get('invoice_address_from')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user