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

Rewrite the cost center account lookups to use account table #5968

Closed
jniles opened this issue Oct 4, 2021 · 0 comments · Fixed by #5969
Closed

Rewrite the cost center account lookups to use account table #5968

jniles opened this issue Oct 4, 2021 · 0 comments · Fixed by #5969

Comments

@jniles
Copy link
Collaborator

jniles commented Oct 4, 2021

Now that we've merged #5967, we can rewrite the GetCostCenterByAccountId() and GetPrincipalCenterByAccountId() to use the direct method for calculating the cost center,:

https://github.com/IMA-WorldHealth/bhima/blob/c1f98d84fd40a582b45f67c96da126a3d83b7161/server/models/procedures/cost_centers.sql#L18-L29

https://github.com/IMA-WorldHealth/bhima/blob/c1f98d84fd40a582b45f67c96da126a3d83b7161/server/models/procedures/cost_centers.sql#L42-L56

bors bot added a commit that referenced this issue Oct 4, 2021
5969: chore(cost centers): use account table for lookup r=jniles a=jniles

After merging #5967, we can now rewrite these functions to use the account table directly.

Closes #5968.

Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
@bors bors bot closed this as completed in 3a582eb Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant