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 determineChargePeriod() to a service #150

Merged
merged 7 commits into from
Mar 6, 2023

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-3906
https://eaflood.atlassian.net/browse/WATER-3930

The charge period is the period of time that the charge version and its start and end date overlap with the financial period being billed (01-Apr to 31-Mar). We need this period to then calculate how many billable days there are for the charge version.

Currently, the FormatSrocTransactionLineService has this function. But we also need to know the charge period to determine whether minimum charge applies to the charge version.

So, this change moves the function out to a service we can then reuse in both places.

https://eaflood.atlassian.net/browse/WATER-3906
https://eaflood.atlassian.net/browse/WATER-3930

The charge period is the period of time that the charge version and its start and end date overlaps with the financial period being billed (01-Apr to 31-Mar). We need this period to then calculate how many billable days there are for the charge version.

Currently, the `FormatSrocTransactionLineService` has this function. But we also need to know the charge period to [determine whether minimum charge applies](#149) to the charge version.

So, this change moves the function out to a service we can then reuse in both places.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Mar 6, 2023
@Cruikshanks Cruikshanks self-assigned this Mar 6, 2023
@Cruikshanks Cruikshanks marked this pull request as ready for review March 6, 2023 11:54
@Cruikshanks Cruikshanks requested review from StuAA78 and Jozzey March 6, 2023 11:54
@Cruikshanks Cruikshanks requested a review from StuAA78 March 6, 2023 12:23
StuAA78
StuAA78 previously approved these changes Mar 6, 2023
Jozzey
Jozzey previously approved these changes Mar 6, 2023
@Cruikshanks Cruikshanks dismissed stale reviews from Jozzey and StuAA78 via fb787e2 March 6, 2023 12:31
@Cruikshanks Cruikshanks requested review from Jozzey and StuAA78 March 6, 2023 12:31
@Cruikshanks Cruikshanks merged commit 2b7fa73 into main Mar 6, 2023
@Cruikshanks Cruikshanks deleted the move-determine-charge-period-to-service branch March 6, 2023 12:34
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.

3 participants