Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move supplementary unflagging services #1769

Merged
merged 6 commits into from
Mar 3, 2025

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4201

Part of the work to support two-part tariff supplementary bill runs

In Move reusable supplementary billing services we shifted some existing supplementary billing services to make them reusable by the two-part tariff supplementary billing engine we're building.

Then we spotted some two-part tariff billing services we could remove and reuse.

The final step of supporting two-part tariff supplementary, like standard supplementary, is the flagging.

When changes are made to licences, they are flagged for supplementary billing, and it is these 'flags' that drive whether a licence is considered part of a supplementary bill run. Just as complex as setting the flags is unsetting them. Various actions, either driven by the users or from logic in the engines, trigger licences becoming unflagged.

Two scenarios a two-part tariff supplementary shares with a standard supplementary, are

  • when a licence after processing is found not to have generated a bill
  • when the bill has been sent and the licence can be considered as having been 'processed' for supplementary billing

We already have services that handle these scenarios, which are called at the appropriate times. So, before adding the two-part tariff supplementary flagging logic, we prepare the existing services for reuse.

https://eaflood.atlassian.net/browse/WATER-4201

> Part of the work to support two-part tariff supplementary bill runs

In [Move reusable supplementary billing services](#1760) we shifted some existing supplementary billing services to make them reusable by the two-part tariff supplementary billing engine we're building.

Then we spotted [some two-part tariff billing services we could remove and reuse](#1765).

The final step of supporting two-part tariff supplementary, like standard supplementary, is the flagging.

When changes are made to licences they are flagged for supplementary billing, and it is these 'flags' that drive whether a licence is considered as part of a supplementary bill run. Just as complex as setting the flags, is unsetting them. There are various actions, either driven by the users or from logic in the engines, that triggers licences becoming unflagged.

Two scenarios a two-part tariff supplementary shares with a standard supplementary, are

- when a licence after processing is found _not_ to have generated a bill
- when the bill has been sent and the licence can be considered as having been 'processed' for supplementary billing

We already have services that handle these scenarios, which are called at the appropriate times. So, ahead of adding the two-part tariff supplementary flagging logic, we move the existing services ready for reuse.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Mar 3, 2025
@Cruikshanks Cruikshanks self-assigned this Mar 3, 2025
@Cruikshanks Cruikshanks marked this pull request as ready for review March 3, 2025 23:31
@Cruikshanks Cruikshanks merged commit 14eb891 into main Mar 3, 2025
6 checks passed
@Cruikshanks Cruikshanks deleted the move-supplementary-unflagging-services branch March 3, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant