-
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
Add new two-part tariff generate bill run endpoint #1123
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
https://eaflood.atlassian.net/browse/WATER-4196 > Part of the work for two-part tariff annual billing We're ready to generate a bill run from our two-part tariff review data and with [Add Continue bill run btn to 2PT review screen](#1122) we have the means to trigger it. Next we need the endpoint that button will hit. This change adds the endpoint (route and controller) plus a 'shell' `GenerateBillRunService` we can start to develop in subsequent PR's.
Cruikshanks
requested review from
Jozzey,
jonathangoulding,
Beckyrose200 and
rvsiyad
June 19, 2024 15:03
Jozzey
approved these changes
Jun 20, 2024
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.
Cruikshanks
added a commit
that referenced
this pull request
Jun 20, 2024
https://eaflood.atlassian.net/browse/WATER-4196 > Part of the work for two-part tariff annual billing We're ready to generate a bill run from our two-part tariff review data and with [Add Continue bill run btn to 2PT review screen](#1122) and [Add new two-part tariff generate bill run endpoint](#1123) we have the means to trigger it. We're following the pattern used in SROC annual billing of fetching the data needed by billing account. A bill run is made up of 'bills', one for each billing account. We learnt during the building of the SROC annual engine that having the root record as the billing account vastly simplified the process (we will complete our refactor of SROC supplementary one day!) So, this change adds the `FetchBillingAccountsService` for two-part tariff bill runs. It goes without saying it is a bit of a beast! We are not just having to retrieve charge version, reference and element records but their equivalents in the review dataset. It results in a massive Objection.js query. The good news is there is little complexity. It is a straight up data retrieval service. Still a lot of code though! 😳😬
Cruikshanks
added a commit
that referenced
this pull request
Jul 8, 2024
https://eaflood.atlassian.net/browse/WATER-4196 > Part of the work for two-part tariff annual billing We're ready to generate a bill run from our two-part tariff review data and with [Add Continue bill run btn to 2PT review screen](#1122) and [Add new two-part tariff generate bill run endpoint](#1123) we have the means to trigger it. We're following the pattern used in SROC annual billing of fetching the data needed by billing account. A bill run is made up of 'bills', one for each billing account. We learned during the building of the SROC annual engine that having the root record as the billing account vastly simplified the process (we will complete our refactor of SROC supplementary one day!) So, this change adds the `FetchBillingAccountsService` for two-part tariff bill runs. It goes without saying it is a bit of a beast! We are not just having to retrieve charge version, reference and element records, but their equivalents in the review dataset. It results in a massive [Objection.js](https://vincit.github.io/objection.js/) query. The good news is that there is little complexity. It is a straight-up data retrieval service. Still a lot of code though! 😳😬
Cruikshanks
added a commit
that referenced
this pull request
Jul 8, 2024
https://eaflood.atlassian.net/browse/WATER-4196 > Part of the work for two-part tariff annual billing We're ready to generate a bill run from our two-part tariff review data and with [Add Continue bill run btn to 2PT review screen](#1122) and [Add new two-part tariff generate bill run endpoint](#1123) we have the means to trigger it. We can now also [Fetch all the billing accounts and related data](#1129) needed to generate the bills. This implements the remaining services needed to transform that data into actual bills using the same pattern we implemented for SROC annual billing. - a service to manage the process - `GenerateBillRunService` - a service to transform the data into bills `ProcessBillingPeriodService` - a mirror of `GenerateTransactionService` amended specifically for two-part tariff bill runs (because of the need to incorporate values from the review stage) With this in place users will finally be able to generate an annual two-part tariff SROC bill run!
Cruikshanks
added a commit
that referenced
this pull request
Jul 9, 2024
https://eaflood.atlassian.net/browse/WATER-4196 > Part of the work for two-part tariff annual billing We're ready to generate a bill run from our two-part tariff review data and with [Add Continue bill run btn to 2PT review screen](#1122) and [Add new two-part tariff generate bill run endpoint](#1123) we have the means to trigger it. We can now also [Fetch all the billing accounts and related data](#1129) needed to generate the bills. This implements the remaining services needed to transform that data into actual bills using the same pattern we implemented for SROC annual billing. - a service to manage the process - `GenerateBillRunService` - a service to transform the data into bills `ProcessBillingPeriodService` - a mirror of `GenerateTransactionService` amended specifically for two-part tariff bill runs (because of the need to incorporate values from the review stage) With this in place, users will finally be able to generate an annual two-part tariff SROC bill run!
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-4196
We're ready to generate a bill run from our two-part tariff review data and with Add Continue bill run btn to 2PT review screen we have the means to trigger it.
Next, we need the endpoint that the button will hit. This change adds the endpoint (route and controller) plus a 'shell'
GenerateBillRunService
we can start to develop in subsequent changes.