Remove references to old portal

This commit is contained in:
Tanner Collin 2022-02-06 21:40:26 +00:00
parent 665c0f61bc
commit 0d19cd8662
2 changed files with 0 additions and 36 deletions

View File

@ -82,38 +82,6 @@ def calc_member_status(expire_date, fake_date=None):
def add_months(date, num_months): def add_months(date, num_months):
return date + relativedelta.relativedelta(months=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): def tally_membership_months(member, fake_date=None):
''' '''
Sum together member's dues and calculate their new expire date and status Sum together member's dues and calculate their new expire date and status

View File

@ -119,10 +119,6 @@ DATABASES = {
'timeout': 20, # increased because generate_backups.py blocks '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 = { CACHES = {