Update queries for data model change (removal of organisation_to_service)

New query to get letter breakdown.
This commit is contained in:
Rebecca Law
2019-08-06 13:29:59 +01:00
committed by Leo Hemsted
parent d3449c37da
commit 236d111c22
4 changed files with 358 additions and 5 deletions

View File

@@ -61,3 +61,10 @@ def get_current_financial_year_start_year():
if now < start_date:
financial_year_start = financial_year_start - 1
return financial_year_start
def which_financial_year(start_date):
if start_date <= get_april_fools(int(start_date.strftime('%Y'))):
return int(start_date.strftime('%Y')) - 1
else:
return int(start_date.strftime('%Y'))