From 65ac36d681a7f09fef3a6719bf00d52cf878d2eb Mon Sep 17 00:00:00 2001 From: Aaron Kitzmiller Date: Thu, 29 Aug 2024 14:46:19 -0400 Subject: [PATCH] Make sure all PUP records are cleared out when recalculating so that old messages don't stick around Update ifxbilling to use request.data instead of request.body in update user accounts view; JQuery-based ajax seems to have accessed the body already, so it can't be reaccessed --- coldfront/plugins/ifx/calculator.py | 1 - coldfront/plugins/ifx/views.py | 1 + ifxbilling | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coldfront/plugins/ifx/calculator.py b/coldfront/plugins/ifx/calculator.py index 7ada73842..0adf7209e 100644 --- a/coldfront/plugins/ifx/calculator.py +++ b/coldfront/plugins/ifx/calculator.py @@ -111,7 +111,6 @@ def generate_billing_records_for_organization(self, year, month, organization, r ''' successes = [] errors = [] - if organization.org_tree == 'Harvard': projects = [po.project for po in organization.projectorganization_set.all()] if not projects: diff --git a/coldfront/plugins/ifx/views.py b/coldfront/plugins/ifx/views.py index bd4e8293a..4bdee1be5 100644 --- a/coldfront/plugins/ifx/views.py +++ b/coldfront/plugins/ifx/views.py @@ -113,6 +113,7 @@ def calculate_billing_month(request, year, month): try: if recalculate: ifxbilling_models.BillingRecord.objects.filter(year=year, month=month).delete() + ifxbilling_models.ProductUsageProcessing.objects.filter(product_usage__year=year, product_usage__month=month).delete() calculator = NewColdfrontBillingCalculator() calculator.calculate_billing_month(year, month, recalculate=recalculate) return Response('OK', status=status.HTTP_200_OK) diff --git a/ifxbilling b/ifxbilling index 3a1cc1199..177760142 160000 --- a/ifxbilling +++ b/ifxbilling @@ -1 +1 @@ -Subproject commit 3a1cc1199b2f3c4da6fe31e998fce0e3ff5486ba +Subproject commit 177760142bf90f2fab5f313fae3c55c8a4328a72