From 454ea196031e8282bdfd33db7a8f5bd6e023c1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Le=20Moigne?= Date: Sun, 4 Sep 2022 12:31:08 +0200 Subject: [PATCH 1/3] hide Soge during registration --- note_kfet/templates/registration/signup.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/note_kfet/templates/registration/signup.html b/note_kfet/templates/registration/signup.html index 0a15fa07..7bd503eb 100644 --- a/note_kfet/templates/registration/signup.html +++ b/note_kfet/templates/registration/signup.html @@ -23,11 +23,11 @@ SPDX-License-Identifier: GPL-3.0-or-later {% csrf_token %} {{ form|crispy }} {{ profile_form|crispy }} - {{ soge_form|crispy }} + {% comment "Soge not for membership (only WEI)" %} {{ soge_form|crispy }} {% endcomment %} -{% endblock %} \ No newline at end of file +{% endblock %} From 45ee9a8941a3330e4514ebc50a867102fc58b428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Le=20Moigne?= Date: Sun, 4 Sep 2022 12:52:40 +0200 Subject: [PATCH 2/3] Soge only payd WEI (not bde/kfet membership) --- apps/treasury/models.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/treasury/models.py b/apps/treasury/models.py index 427d796d..f17d9405 100644 --- a/apps/treasury/models.py +++ b/apps/treasury/models.py @@ -329,17 +329,18 @@ class SogeCredit(models.Model): bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start) kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start) - if bde_qs.exists(): - m = bde_qs.get() - if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership - if m.transaction not in self.transactions.all(): - self.transactions.add(m.transaction) - - if kfet_qs.exists(): - m = kfet_qs.get() - if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership - if m.transaction not in self.transactions.all(): - self.transactions.add(m.transaction) +## Soge didn't pay BDE and kfet memberships +# if bde_qs.exists(): +# m = bde_qs.get() +# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership +# if m.transaction not in self.transactions.all(): +# self.transactions.add(m.transaction) +# +# if kfet_qs.exists(): +# m = kfet_qs.get() +# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership +# if m.transaction not in self.transactions.all(): +# self.transactions.add(m.transaction) if 'wei' in settings.INSTALLED_APPS: from wei.models import WEIClub From 7068170f180214c2a6c2b86c03fe4ff6eafbfb9f Mon Sep 17 00:00:00 2001 From: Yoann Beaugnon Date: Sun, 4 Sep 2022 13:24:39 +0200 Subject: [PATCH 3/3] fixing grammar in comments --- apps/treasury/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/treasury/models.py b/apps/treasury/models.py index f17d9405..837d0238 100644 --- a/apps/treasury/models.py +++ b/apps/treasury/models.py @@ -329,7 +329,7 @@ class SogeCredit(models.Model): bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start) kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start) -## Soge didn't pay BDE and kfet memberships +## Soge do not pay BDE and kfet memberships this year (2022-2023) # if bde_qs.exists(): # m = bde_qs.get() # if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership