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

Determine if licence is 'billed' #82

Merged
merged 22 commits into from
Jan 18, 2023
Merged

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Jan 10, 2023

https://eaflood.atlassian.net/browse/WATER-3868

We need to know whether a licence has already been ‘billed’ in the current period. If so we’ll have to ensure it’s credited as part of the bill run before we recalculate the debit.

For each licence that is a candidate for billing, we need to determine if it was included in a billing_batch for the current period.

For now, the result of this check should be included in the /check/supplementary endpoint results, against each licence. That way we can verify if it is working correctly.

https://eaflood.atlassian.net/browse/WATER-3868

We also need to know whether a charge version has already been ‘billed’ in the current period. If so we’ll have to ensure it’s credited as part of the bill run before we recalculate the debit.

For each charge version that is a candidate for billing, we need to determine if it was included in a `billing_batch` for the current period.

For now, the result of this check should be included in the `/check/supplementary` endpoint results, against each charge version. That way we can verify if it is working correctly.
@Jozzey Jozzey added the enhancement New feature or request label Jan 10, 2023
@Jozzey Jozzey self-assigned this Jan 10, 2023
@Jozzey Jozzey changed the title Determine if charge version is 'billed' Determine if licence is 'billed' Jan 17, 2023
@Jozzey
Copy link
Contributor Author

Jozzey commented Jan 17, 2023

Initially this ticket referred to the charge version. Following a chat with Alan this was changed to the licence after digging into the structure of the data.

@Jozzey Jozzey marked this pull request as ready for review January 17, 2023 15:23
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just got a possible suggestion for using one of the built-in Array functions to determine if an array contains something, rather than a for loop.

What do you think?

app/presenters/check/supplementary-data.presenter.js Outdated Show resolved Hide resolved
@Jozzey Jozzey requested a review from Cruikshanks January 18, 2023 10:59
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jozzey Jozzey merged commit 535c0d2 into main Jan 18, 2023
@Jozzey Jozzey deleted the determine-if-charge-version-is-billed branch January 18, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants