diff --git a/app/dao/annual_billing_dao.py b/app/dao/annual_billing_dao.py index ffad11ade..2a593bfb1 100644 --- a/app/dao/annual_billing_dao.py +++ b/app/dao/annual_billing_dao.py @@ -58,34 +58,42 @@ def set_default_free_allowance_for_service(service, year_start=None): 'central': { 2020: 250_000, 2021: 150_000, + 2022: 40_000, }, 'local': { 2020: 25_000, 2021: 25_000, + 2022: 20_000, }, 'nhs_central': { 2020: 250_000, 2021: 150_000, + 2022: 40_000, }, 'nhs_local': { 2020: 25_000, 2021: 25_000, + 2022: 20_000, }, 'nhs_gp': { 2020: 25_000, 2021: 10_000, + 2022: 10_000, }, 'emergency_service': { 2020: 25_000, 2021: 25_000, + 2022: 20_000, }, 'school_or_college': { 2020: 25_000, 2021: 10_000, + 2022: 10_000, }, 'other': { 2020: 25_000, 2021: 10_000, + 2022: 10_000, }, } if not year_start: @@ -93,8 +101,8 @@ def set_default_free_allowance_for_service(service, year_start=None): # handle cases where the year is less than 2020 or greater than 2021 if year_start < 2020: year_start = 2020 - if year_start > 2021: - year_start = 2021 + if year_start > 2022: + year_start = 2022 if service.organisation_type: free_allowance = default_free_sms_fragment_limits[service.organisation_type][year_start] else: diff --git a/tests/app/dao/test_annual_billing_dao.py b/tests/app/dao/test_annual_billing_dao.py index 4fa0954c6..de91048de 100644 --- a/tests/app/dao/test_annual_billing_dao.py +++ b/tests/app/dao/test_annual_billing_dao.py @@ -66,7 +66,12 @@ def test_dao_update_annual_billing_for_future_years(notify_db_session, sample_se ('other', 2020, 25000), (None, 2020, 25000), ('central', 2019, 250000), - ('school_or_college', 2022, 10000) + ('school_or_college', 2022, 10000), + ('central', 2022, 40000), + ('local', 2022, 20000), + ('nhs_local', 2022, 20000), + ('emergency_service', 2022, 20000), + ('central', 2023, 40000), ]) def test_set_default_free_allowance_for_service(notify_db_session, org_type, year, expected_default):