-
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
SRoC Supplementary Billing - Determine Abstraction Period #97
Conversation
https://eaflood.atlassian.net/browse/WATER-3834 As part of determining the transactions and Billable Days for Supplementary Billing, the Abstraction Period needs to be taken into account. Abstraction period is the date range in which Licence Holders can abstract water, in terms of Supplementary Billing, then it needs to be taken into account days when the Licence Holder cannot abstract as the dates are outside of the Abstraction Period and therefore not chargeable. This PR is to determine the correct number of billable days in the abstraction period.
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
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.
@StuAA78 has raised some good points which are mainly hangovers from by first stab at this service 😳 😬 .
But I also believe there is no point working out billable dates and billable days for an abstraction period that isn't going to be considered.
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
I've removed the `_flagPeriodsForConsideration` function as it's no longer required. We are now chceking if an abstraction period is valid and not including it in the array at all if it isn't. New function `_isPeriodValid` created to check if period is valid.
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.
Just a couple of minor things. I even did them as suggestions to try and make it quick! 😬
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
app/services/supplementary-billing/abstraction-billing-period.service.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
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.
https://eaflood.atlassian.net/browse/WATER-3894 Thanks to #97 we now know what the billable days are for each abstraction period (charge_purpose) linked to a charge reference (charge_element && billing_charge_categories) within a charge version. The final step is to take that information and start generating the transaction line information. For each charge reference in a charge version, there should be one transaction line. So, if a charge reference is linked to multiple abstraction periods, we need the sum of their billable days.
https://eaflood.atlassian.net/browse/WATER-3894 Thanks to #97 we now know what the billable days are for each abstraction period (`charge_purpose`) linked to a charge reference (`charge_element` && `billing_charge_categories`) within a charge version. The final step is to take that information and start generating the transaction line information. For each charge reference in a charge version, there should be one transaction line. So, if a charge reference is linked to multiple abstraction periods, we need the sum of their billable days.
https://eaflood.atlassian.net/browse/WATER-3834
As part of determining the transactions and Billable Days for Supplementary Billing, the Abstraction Period needs to be taken into account. Abstraction period is the date range in which Licence Holders can abstract water, in terms of Supplementary Billing, then it needs to be taken into account days when the Licence Holder cannot abstract as the dates are outside of the Abstraction Period and therefore not chargeable.
This PR is to determine the correct number of billable days in the abstraction period.