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

Fix dupe bill. invoice licence in process service #155

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

Cruikshanks
Copy link
Member

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

Found in testing where we have a licence with multiple charge versions for the same invoice account we are handling reusing the billing invoice. But we are always trying to create a new billing invoice licence when we should be reusing them (when the Billing Invoice ID and licence ID are the same).

So, this change updates the app/services/supplementary-billing/create-billing-invoice-licence.service.js to work in the same way as app/services/supplementary-billing/create-billing-invoice.service.js, fetching the existing billing invoice licence record if it exists else creating a new one.

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

Found in testing where we have a licence with multiple charge versions for the same invoice account we are handling reusing the billing invoice. But we are always trying to create a new billing invoice licence when we should be reusing them (when the Billing Invoice ID and licence ID are the same).

So, this change updates the `app/services/supplementary-billing/create-billing-invoice-licence.service.js` to work in the same way as `app/services/supplementary-billing/create-billing-invoice.service.js`, fetching the existing billing invoice licence record if it exists else creating a new one.
@Cruikshanks Cruikshanks added the bug Something isn't working label Mar 7, 2023
@Cruikshanks Cruikshanks self-assigned this Mar 7, 2023
@Cruikshanks Cruikshanks marked this pull request as ready for review March 7, 2023 11:59
@Cruikshanks Cruikshanks requested review from StuAA78 and Jozzey March 7, 2023 11:59
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

👍🏼

@Cruikshanks Cruikshanks merged commit f7d6752 into main Mar 7, 2023
@Cruikshanks Cruikshanks deleted the fix-duplicate-billing-invoice-in-process branch March 7, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants