Allow separate numbering schemes for invoices and cancellations

This commit is contained in:
Raphael Michel
2019-08-06 14:17:51 +02:00
parent 6dd1c927ef
commit 9a9de523e0
5 changed files with 27 additions and 3 deletions

View File

@@ -175,6 +175,8 @@ class Invoice(models.Model):
self.organizer = self.order.event.organizer
if not self.prefix:
self.prefix = self.event.settings.invoice_numbers_prefix or (self.event.slug.upper() + '-')
if self.is_cancellation:
self.prefix = self.event.settings.invoice_numbers_prefix_cancellations or self.prefix
if not self.invoice_no:
if self.order.testmode:
self.prefix += 'TEST-'