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 UI to change the order of the cost center step-down allocation steps #6003

Merged
merged 2 commits into from
Oct 9, 2021

Conversation

jmcameron
Copy link
Collaborator

@jmcameron jmcameron commented Oct 8, 2021

This PR adds a modal that lets the user change the order of the step-down steps.

NOTE: I believe this is working correctly. However, when the order of the steps are changed, the cost center step-down report is broken: It performs an allocation on one of the principal centers before finishing all auxiliary centers. I suggest releasing this PR and then addressing the report bug separately.

Closes #5984

TESTING

  • For basic testing, use bhima_test
  • Reload the bhima_test db and the sample data
  • Try: Cost Centers > Menu > Edit step order...
    • Use the up/down arrows to reorder the steps
    • Click [Submit]
    • Re-open the step-order editor to verify the change
  • Try: Cost Centers > Report > Cost Center Allocations
    • Note the auxiliary center order has changed
    • Note that the bug: a principal center is being processed before all the auxiliary centers are processed.
  • Try it with a production db

@jmcameron
Copy link
Collaborator Author

@mbayopanda Please try this PR out and figure out why changing the step order leads to a bug in the cost allocation report. If it is an easy fix, I can fold it into this PR. Otherwise, lets do it in a separate PR. Thanks!

@jmcameron
Copy link
Collaborator Author

Many thanks for @jniles for his help debugging some grid update issues and reworking the ordering code!

Copy link
Contributor

@jniles jniles left a comment

Choose a reason for hiding this comment

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

This is exactly right. Great work!

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 9, 2021

Build succeeded:

@bors bors bot merged commit 680714d into IMA-WorldHealth:master Oct 9, 2021
@jmcameron jmcameron deleted the cost-center-allocation-order branch October 11, 2021 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a way to change the order of the cost allocations
2 participants