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

Use payments field for invoice number

parent 67b16cfb
No related branches found
No related tags found
No related merge requests found
Pipeline #58393 canceled
......@@ -28,7 +28,6 @@ class Invoice(BasePayment, PureDjangoModel):
group = models.ForeignKey(
InvoiceGroup, verbose_name=_("Invoice group"), related_name="invoices"
)
number = models.CharField(verbose_name=_("Invoice number"))
for_content_type = models.ForeignKey(ContetType, on_delete=models.SET_NULL)
for_object_id = models.PositiveIntegerField()
......@@ -39,5 +38,5 @@ class Invoice(BasePayment, PureDjangoModel):
class Meta:
constraints = [
models.UniqueConstraint(fields=["number", "token"], name="number_uniq_per_group")
models.UniqueConstraint(fields=["transaction_id", "group"], name="number_uniq_per_group")
]
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