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 supplementary bill run errors with non-chargeable charge versions #194

Merged

Conversation

StuAA78
Copy link
Contributor

@StuAA78 StuAA78 commented Apr 19, 2023

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

We found that an sroc supplementary bill run that contains a non-chargeable charge version would immediately error. On investigation we found that we were attempting to create invoices for these charge versions, starting by destructuring the invoiceAccountId, causing an error.

Since we do not want to invoice these charge versions at all, we fix this by updating our db query to exclude records where invoiceAccountId is null.

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

We found that an sroc supplementary bill run that contains a non-chargeable charge version would immediately error. On investigation we found that we were attempting to create invoices for these charge versions, starting by destructuring the `invoiceAccountId`, causing an error.

Since we do not want to invocie these charge versions, we fix this by updating our db query to exclude records where `invoiceAccountId` is `null`.
@StuAA78 StuAA78 added the bug Something isn't working label Apr 19, 2023
@StuAA78 StuAA78 self-assigned this Apr 19, 2023
StuAA78 added 3 commits April 19, 2023 13:18
When we retrieve charge versions in `FetchChargeVersionsService`, we want to exclude records which have a `null` value for `invoiceAccountId`. We therefore add a `.whereNotNull()` clause to our query.
@StuAA78 StuAA78 marked this pull request as ready for review April 19, 2023 12:37
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.

👍🏼

@StuAA78 StuAA78 merged commit 29b2da2 into main Apr 19, 2023
@StuAA78 StuAA78 deleted the fix-erroring-bill-run-with-non-chargeable-charge-version branch April 19, 2023 13:53
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