Add financial year filter

Otherwise this page will become less useful come April 1st…
This commit is contained in:
Chris Hill-Scott
2020-02-28 12:32:47 +00:00
parent df5b2f00ef
commit 408fcf05eb
4 changed files with 88 additions and 28 deletions

View File

@@ -5,7 +5,6 @@ from app.models import JSONModel, ModelList
from app.notify_client.email_branding_client import email_branding_client
from app.notify_client.letter_branding_client import letter_branding_client
from app.notify_client.organisations_api_client import organisations_client
from app.utils import get_current_financial_year
class Organisation(JSONModel):
@@ -199,8 +198,8 @@ class Organisation(JSONModel):
self.id
)
def services_and_usage(self):
return organisations_client.get_services_and_usage(self.id, get_current_financial_year())
def services_and_usage(self, financial_year):
return organisations_client.get_services_and_usage(self.id, financial_year)
class Organisations(ModelList):