-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update FetchChargeVersions to use SROC flag #177
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFRA/water-abstraction-service#2077 and #178 need to be merged before this can be merged. |
Cruikshanks
added a commit
that referenced
this pull request
Mar 27, 2023
https://eaflood.atlassian.net/browse/WATER-3948 To resolve the issue of dealing with PRESROC and SROC licences flagged for supplementary billing, and how we remove those flags when bill runs get 'sent' we've [made a change to the `FetchChargeVersionsService`](#177) to look at a [new field we've added](DEFRA/water-abstraction-service#2077) to the `water.licences` table. This broke some tests, a number of which were in the `FetchLicencesService`. We were about to embark on fixing them when we remembered that with the direction our work on supplementary billing took `FetchLicencesService` had become redundant. So, rather than spend time fixing them we're just getting on and removing the service.
Cruikshanks
added a commit
that referenced
this pull request
Mar 28, 2023
https://eaflood.atlassian.net/browse/WATER-3948 To resolve the issue of dealing with PRESROC and SROC licences flagged for supplementary billing, and how we remove those flags when bill runs get 'sent' we've [made a change to the `FetchChargeVersionsService`](#177) to look at a [new field we've added](DEFRA/water-abstraction-service#2077) to the `water.licences` table. This broke some tests, a number of which were in the `FetchLicencesService`. We were about to embark on fixing them when we remembered that with the direction our work on supplementary billing took `FetchLicencesService` had become redundant. So, rather than spend time fixing them we're just getting on and removing the service.
https://eaflood.atlassian.net/browse/WATER-3948 We have an issue that the current `include_in_supplementary_billing` flag was added at a time there was only 1 charge scheme. A licence gets flagged irrespective of whether the change relates to PRESROC or SROC. Where that has impacted us is when sending a billing batch. When it gets sent it clears the flag for _all_ licences included. But if we cancel one, for example, the PRESROC bill run, and send the SROC one we lose which licences still need to be processed on the PRESROC one. [Our solution](DEFRA/water-abstraction-service#2077) is to add a new `include_in_sroc_supplementary_billing` flag to the `licences` table and only set it to 'true' when an SROC charge version is approved. With this in place our `FetchChargeVersionsService` needs to be altered to look at that field instead of the old one to identify charge versions to consider for billing.
We need the new column in our test db.
Cruikshanks
force-pushed
the
fetch-only-include-in-sroc-supp-licences
branch
from
March 28, 2023 12:48
0aee246
to
cd99d9e
Compare
Jozzey
approved these changes
Mar 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-3948
We have an issue that the current
include_in_supplementary_billing
flag was added at a time there was only 1 charge scheme. A licence gets flagged irrespective of whether the change relates to PRESROC or SROC.Where that has impacted us is when sending a billing batch. When it gets sent it clears the flag for all licences included. But if we cancel one, for example, the PRESROC bill run, and send the SROC one we lose which licences still need to be processed on the PRESROC one.
Our solution is to add a new
include_in_sroc_supplementary_billing
flag to thelicences
table and only set it to 'true' when an SROC charge version is approved. With this in place ourFetchChargeVersionsService
needs to be altered to look at that field instead of the old one to identify charge versions to consider for billing.