Skip to content
Snippets Groups Projects
Verified Commit b154b946 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Use number field instead of transaction_id for invoic

parent 23a5fff2
No related branches found
No related tags found
1 merge request!14Payments
Pipeline #59246 failed
...@@ -287,7 +287,7 @@ class EventRegistration(ExtensibleModel): ...@@ -287,7 +287,7 @@ class EventRegistration(ExtensibleModel):
invoice, __ = Invoice.objects.get_or_create(for_content_type=ContentType.objects.get_for_model(self), for_object_id=self.pk, defaults={ invoice, __ = Invoice.objects.get_or_create(for_content_type=ContentType.objects.get_for_model(self), for_object_id=self.pk, defaults={
"group": group, "group": group,
"variant": "sepa" if self.accept_sepa else "transfer", "variant": "sepa" if self.accept_sepa else "transfer",
"transaction_id": f"HNF-{self.date_registered.strftime('%Y-%m')}-{self.id}", "number": f"HNF-{self.date_registered.strftime('%Y-%m')}-{self.id}",
"currency": "EUR", "currency": "EUR",
"total": self._get_total_amount()[0], "total": self._get_total_amount()[0],
"tax": self._get_total_amount()[1], "tax": self._get_total_amount()[1],
......
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</address> </address>
<article> <article>
<date id="date">{{ invoice.created.date }}</date> <date id="date">{{ invoice.created.date }}</date>
<h1>{% trans "Invoice" %} {{ invoice.transaction_id }}</h1> <h1>{% trans "Invoice" %} {{ invoice.number }}</h1>
{% render_table invoice.purchased_items_table %} {% render_table invoice.purchased_items_table %}
{% render_table invoice.totals_table %} {% render_table invoice.totals_table %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment