Correct handling of spaces in paperwork filenames

Also normalises display of Invoice IDs. Partial fix for #391.
This commit is contained in:
2020-10-09 12:09:12 +01:00
parent 934c07be72
commit 12a60e1f50
7 changed files with 28 additions and 32 deletions

View File

@@ -580,11 +580,15 @@ class Invoice(models.Model, RevisionMixin):
@property
def activity_feed_string(self):
return "#{} for Event {}".format(self.pk, "N%05d" % self.event.pk)
return "#{} for Event {}".format(self.display_id, "N%05d" % self.event.pk)
def __str__(self):
return "%i: %s (%.2f)" % (self.pk, self.event, self.balance)
@property
def display_id(self):
return "{:05d}".format(self.pk)
class Meta:
ordering = ['-invoice_date']