Skip to content

Commit

Permalink
period6 autumn 2023 update bills
Browse files Browse the repository at this point in the history
  • Loading branch information
mittal-ishaan committed Feb 5, 2024
1 parent c52311d commit c68de35
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions home/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,13 @@ def update_bill(self, request, queryset):
Update action available in the admin page
"""
for obj in queryset:
days = obj.period4_short + obj.period4_long
days = obj.period6_short + obj.period6_long
if(obj.period4_high_tea):
continue
days = 31 - days
obj.period4_bill = days * 115
obj.save()
if(obj.semester == Semester.objects.get(name ="Autumn 2023")):
days = 25 - days
obj.period6_bill = days * 115
obj.save()
def export_as_csv(self, request, queryset):
"""
Export action available in the admin page
Expand Down

0 comments on commit c68de35

Please sign in to comment.