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 cost center in account #5967

Merged
merged 4 commits into from
Oct 4, 2021
Merged

Conversation

mbayopanda
Copy link
Contributor

This PR adds the cost center information in the account.

In the account edit modal:
image

In the account registry:
image

@@ -18,6 +18,7 @@ CREATE TABLE `account` (
`hidden` TINYINT(1) UNSIGNED DEFAULT 0,
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`reference_id` TINYINT(3) UNSIGNED DEFAULT NULL,
`cost_center_id` MEDIUMINT(8) UNSIGNED NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

You will want to put a FOREIGN KEY here.

@@ -27,6 +27,7 @@ describe('(/accounts) Accounts', () => {
const responseKeys = [
'id', 'enterprise_id', 'locked', 'created', 'reference_id',
'number', 'label', 'parent', 'type_id', 'type', 'translation_key',
'cost_center_id',
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a test where you update a cost center to the integration tests? Just for completeness.

@mbayopanda
Copy link
Contributor Author

@jniles changes landed

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.

LGTM.

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 4, 2021

Build succeeded:

@bors bors bot merged commit 4685288 into IMA-WorldHealth:master Oct 4, 2021
jniles added a commit to jniles/bhima that referenced this pull request Oct 4, 2021
After merging IMA-WorldHealth#5967, we can now rewrite these functions to use the
account table directly.

Closes IMA-WorldHealth#5968.
bors bot added a commit that referenced this pull request 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>
@mbayopanda mbayopanda deleted the add-cc-in-account branch November 14, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants