mirror of https://gitlab.crans.org/bde/nk20
Soge only payd WEI (not bde/kfet membership)
This commit is contained in:
parent
454ea19603
commit
45ee9a8941
|
@ -329,17 +329,18 @@ class SogeCredit(models.Model):
|
||||||
bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start)
|
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)
|
kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start)
|
||||||
|
|
||||||
if bde_qs.exists():
|
## Soge didn't pay BDE and kfet memberships
|
||||||
m = bde_qs.get()
|
# if bde_qs.exists():
|
||||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
# m = bde_qs.get()
|
||||||
if m.transaction not in self.transactions.all():
|
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||||
self.transactions.add(m.transaction)
|
# if m.transaction not in self.transactions.all():
|
||||||
|
# self.transactions.add(m.transaction)
|
||||||
if kfet_qs.exists():
|
#
|
||||||
m = kfet_qs.get()
|
# if kfet_qs.exists():
|
||||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
# m = kfet_qs.get()
|
||||||
if m.transaction not in self.transactions.all():
|
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||||
self.transactions.add(m.transaction)
|
# if m.transaction not in self.transactions.all():
|
||||||
|
# self.transactions.add(m.transaction)
|
||||||
|
|
||||||
if 'wei' in settings.INSTALLED_APPS:
|
if 'wei' in settings.INSTALLED_APPS:
|
||||||
from wei.models import WEIClub
|
from wei.models import WEIClub
|
||||||
|
|
Loading…
Reference in New Issue