Move supplementary unflagging services #1769
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/browse/WATER-4201
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
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.