From a8093b77cd62a2c030b1f0d565bf5745594be06d Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Sun, 6 Mar 2022 22:09:22 +0100
Subject: [PATCH] Set variant to sepa or transfer

---
 aleksis/apps/paweljong/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/apps/paweljong/models.py b/aleksis/apps/paweljong/models.py
index 3c82a67..ee9b7da 100644
--- a/aleksis/apps/paweljong/models.py
+++ b/aleksis/apps/paweljong/models.py
@@ -272,7 +272,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={
             "group": group,
-            "variant": "dummy",
+            "variant": "sepa" if self.accept_sepa else "transfer",
             "transaction_id": f"HNF-{self.date_registered.strftime('%Y-%m')}-{self.id}",
             "currency": "EUR",
             "total": self._get_total_amount()[0],
-- 
GitLab