Add pre sroc returns flagging to service #1335
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-4199
https://eaflood.atlassian.net/browse/WATER-4676
During testing for the first ticket, it was discovered that editing a return on a licence and then flagging that licence for supplementary billing, was always flagging the licence for pre-sroc supplementary billing even when the years were for sroc.
After discussions it was determined that editing a return should only be able to add a flag on a licence for either pre-sroc billing OR two-part tariff supplementary billing.
This is because regular sroc supplementary billing doesn't look at the returns, so editing a return won't change anything on the bill run.
This PR adds an additional check on the
determine-return-log-years service
to check if the return has a start date before the SROC start date. If it does we add the flag on the licence for pre-sroc supplementary billing.