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 ProcessBillingBatchService refactor bug #217

Merged
merged 2 commits into from
May 12, 2023

Conversation

StuAA78
Copy link
Contributor

@StuAA78 StuAA78 commented May 12, 2023

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

After refactoring the ProcessBillingBatchService to fetch and store all invoice account numbers prior to the main loop, we found an issue where this could result in multiple billing invoices being generated for a single invoice account due to us generating a billing invoice within the main loop, one for each charge version regardless of whether or not one was previously generated for the invoice account.

We fix this by generating our billing invoices (one per invoice account) prior to entering the main loop. We then simply retrieve the pre-generated billing invoice within the loop.

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

After refactoring the `ProcessBillingBatchService` to fetch and store all invoice account numbers prior to the main loop, we found an issue where this could result in multiple billing invoices being generated for a single invoice account due to us generating a billing invoice for each and every charge version.

We fix this by generating our billing invoices (one per invoice account) prior to entering the main loop. We then simply retrieve the pre-generated billing invoice within the loop.
@StuAA78 StuAA78 added the bug Something isn't working label May 12, 2023
@StuAA78 StuAA78 self-assigned this May 12, 2023
@StuAA78 StuAA78 marked this pull request as ready for review May 12, 2023 09:56
@StuAA78 StuAA78 merged commit d749ffe into main May 12, 2023
@StuAA78 StuAA78 deleted the fix-process-billing-batch-refactor-bug branch May 12, 2023 09:56
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.

2 participants