-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add abiliity to edit cost center allocation basis #5909
Conversation
e3a74cb
to
669ff30
Compare
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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":"....",
...
}
There was a problem hiding this comment.
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`)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
The thing is taking shape 😄 bors r+ |
Build succeeded: |
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