mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Improved invoice file names
This commit is contained in:
@@ -9,7 +9,7 @@ from django.db.models import Max
|
||||
|
||||
def invoice_filename(instance, filename: str) -> str:
|
||||
secret = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(14))
|
||||
return 'invoices/{org}/{ev}/{ev}-{no}-{code}-{secret}.pdf'.format(
|
||||
return 'invoices/{org}/{ev}/{ev}-{no:05d}-{code}-{secret}.pdf'.format(
|
||||
org=instance.event.organizer.slug, ev=instance.event.slug,
|
||||
no=instance.invoice_no, code=instance.order.code,
|
||||
secret=secret
|
||||
|
||||
@@ -67,7 +67,7 @@ DEFAULTS = {
|
||||
},
|
||||
'invoice_generate': {
|
||||
'default': 'False',
|
||||
'type': bool
|
||||
'type': str
|
||||
},
|
||||
'invoice_address_from': {
|
||||
'default': '',
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" href="#invoice" data-parent="#questions_accordion">
|
||||
<strong>{% trans "Invoice information" %}</strong>
|
||||
{% if not event.settings.invoice_address_required %}
|
||||
{% trans "(optional)" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user