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

Add relationship between bill and billing account #827

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

Cruikshanks
Copy link
Member

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

Part of a series of changes to add support for removing a bill licence back into the billing views

We're not ready to implement removing a bill licence from a bill run as it depends on sending requests to the Charging Module API and running the legacy refresh job to update everything on our side.

But we can migrate the confirmation page a user sees when removing a licence. Before we get there though we need to add a relationship that has always existed but only thanks to us switching to view-based models is available to use.

This updates the BillModel and BillingAccountModel with relationships that join them We will then be able to extract both bill run, bill and bill licence information in a single Objection.js query.

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

> Part of a series of changes to add support for removing a bill licence back into the billing views

We're not ready to implement removing a bill licence from a bill run as it depends on sending requests to the [Charging Module API](https://github.com/DEFRA/sroc-charging-module-api) and running the legacy refresh job to update everything on our side.

But we can migrate the confirmation page a user sees when removing a licence. Before we get there though we need to add a relationship that has always existed but only thanks to us switching to view based models is available to use.

This updates the `BillModel` and `BillingAccountModel` with relationships that join them We will then be able to extract both bill run, bill and bill licence information in a single [Objection.js query](https://vincit.github.io/objection.js/).
@Cruikshanks Cruikshanks added the enhancement New feature or request label Mar 16, 2024
@Cruikshanks Cruikshanks self-assigned this Mar 16, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review March 16, 2024 17:41
@Cruikshanks Cruikshanks merged commit d767ab7 into main Mar 16, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the add-bill-to-billing-account-relationship branch March 16, 2024 17:41
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.

1 participant