Remove references to old portal
This commit is contained in:
parent
665c0f61bc
commit
0d19cd8662
|
@ -82,38 +82,6 @@ def calc_member_status(expire_date, fake_date=None):
|
|||
def add_months(date, num_months):
|
||||
return date + relativedelta.relativedelta(months=num_months)
|
||||
|
||||
def fake_missing_membership_months(member):
|
||||
'''
|
||||
Add fake months on importing the member so the length of their membership
|
||||
resolves to their imported expiry date
|
||||
'''
|
||||
start_date = member.current_start_date
|
||||
expire_date = member.expire_date
|
||||
|
||||
missing_months = num_months_spanned(expire_date, start_date)
|
||||
|
||||
user = member.user
|
||||
tx = False
|
||||
for i in range(missing_months):
|
||||
memo = '{} / {} month membership dues accounting old portal import, {} to {} - hidden'.format(
|
||||
str(i+1), str(missing_months), start_date, expire_date
|
||||
)
|
||||
|
||||
tx = models.Transaction.objects.create(
|
||||
amount=0,
|
||||
user=user,
|
||||
memo=memo,
|
||||
reference_number='',
|
||||
info_source='System',
|
||||
payment_method='N/A',
|
||||
category='Memberships:Fake Months',
|
||||
account_type='Clearing',
|
||||
number_of_membership_months=1,
|
||||
date=add_months(start_date, i),
|
||||
)
|
||||
|
||||
return tx, missing_months
|
||||
|
||||
def tally_membership_months(member, fake_date=None):
|
||||
'''
|
||||
Sum together member's dues and calculate their new expire date and status
|
||||
|
|
|
@ -119,10 +119,6 @@ DATABASES = {
|
|||
'timeout': 20, # increased because generate_backups.py blocks
|
||||
},
|
||||
},
|
||||
'old_portal': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'old_portal.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
CACHES = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user