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 abiliity to edit cost center allocation basis #5909

Merged

Conversation

jmcameron
Copy link
Collaborator

@jmcameron jmcameron commented Sep 8, 2021

Updated Cost Center editing to support selecting/changing the allocation basis.
Other minor cleanups and refactors. Fixed previous misuses of 'allocation basis' instead of 'allocation method'.

Closes #5896

TESTING

  • Verify that editing cost/fee center works for changing the step-down allocation method and allocation basis.
  • Verify that creating a new cost center works properly and prevents creation of cost centers with improper allocation methods or basis values.
  • Check the French translations for all these terms and suggest better translations!

Copy link
Collaborator

@mbayopanda mbayopanda left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏽

INSERT INTO `cost_center_basis` (`id`, `name`, `units`, `description`) VALUES
(1, 'ALLOCATION_BASIS_DIRECT_COST', '', 'ALLOCATION_BASIS_DIRECT_COST_DESCRIPTION'),
(2, 'ALLOCATION_BASIS_NUM_EMPLOYEES', '', 'ALLOCATION_BASIS_NUM_EMPLOYEES_DESCRIPTION'),
(3, 'ALLOCATION_BASIS_AREA_USED', 'm²', 'ALLOCATION_BASIS_AREA_USED_DESCRIPTION');
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are supposed to have a UI for entering these information, for the name column it can be a problem to translate its value if on the handlebars template of the report we have something like :

{{translate 'FORM.' + name}}

And the user has to enter as he/she want the name of the cost center basis.

This table is perfect, but we have to write these name values in the root of translation files such as :

{
  "FORM":{...},
  "ALLOCATION_BASIS_DIRECT_COST":"....",
  ...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I've already thought of that. I will work on that next. My goal was to have some of the common ones available predefined with translations. Then we can add more custom ones that will not have multiple translations. I think what is in there can do both.

date: 2021-09-07
description: Edit cost center allocation basis
*/
CALL add_column_if_missing('cost_center_basis', 'units', "VARCHAR(30) DEFAULT '' AFTER `name`)");
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍🏽

@mbayopanda
Copy link
Collaborator

The thing is taking shape 😄

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 8, 2021

Build succeeded:

@bors bors bot merged commit 082937e into Third-Culture-Software:master Sep 8, 2021
@jmcameron jmcameron deleted the edit-cost-center-basis branch September 8, 2021 12:16
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.

Add allocation basis info to cost/fee centers
2 participants