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