-
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
fix(report): account report uses ent currency #936
fix(report): account report uses ent currency #936
Conversation
7e618b8
to
ebdb798
Compare
@sfount, this can be reviewed anytime. |
This commit fixes account report to use the enterprise currency in rendering totals. It also migrates the account selection to a ui-select for good measure. Finally, the loading indicator on the form is now hooked up. Partially fixes IMA-WorldHealth#924.
ebdb798
to
b6af238
Compare
@sfount, can I get a review? |
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.
Changes for making currency flexible LGTM. I have made a few comments on the server controller for this report. These comments may or may not be appropriate for this pull request.
if(source === 1){ | ||
|
||
let sql = ` | ||
if (source === 1) { |
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.
There is no indication at all here as to what source is supposed to mean or refer to - it looks like it's taking values from either the posting journal, general ledger or both however this is not at all clear given the code.
Should this be refactored here or do you think it is inappropriate for this pull request?
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.
In my view, I would do that as a separate PR. I have no idea if these queries even produce correct data - a separate PR could do a full audit.
let sql = ` | ||
ORDER BY posting_journal.trans_date ASC; | ||
`; | ||
} else if (source === 3) { |
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.
Is there not a MySQL view that combines the posting journal/ general ledger without manually doing that each time?
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.
Yup! It's called the combined_ledger
. Would you like me to do a refactor on this more than just the currency?
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.
Not in this pull request - as you mentioned this report could use a refactor/ audit. Could you make an issue to track this?
This commit fixes account report to use the enterprise currency in
rendering totals. It also migrates the account selection to a ui-select
for good measure. Finally, the loading indicator on the form is now
hooked up.
Partially fixes #924.
Thank you for contributing!
Before submitting this pull request, please verify that you have:
For a more detailed checklist, see the official review checklist that this PR will be evaluated against.
Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!