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

fix(report): account report uses ent currency #936

Merged
merged 1 commit into from
Nov 27, 2016

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Nov 25, 2016

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:

  • Run your code through JSHint. Check out our styleguide.
  • Run integration tests.
  • Run end-to-end tests.
  • Accurately described the changes your are making in this pull request.

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!

@jniles jniles added this to the Finance Implementation milestone Nov 25, 2016
@jniles
Copy link
Collaborator Author

jniles commented Nov 26, 2016

@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.
@jniles
Copy link
Collaborator Author

jniles commented Nov 27, 2016

@sfount, can I get a review?

Copy link
Contributor

@sfount sfount left a 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) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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?

Copy link
Contributor

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?

@sfount sfount merged commit aaada58 into IMA-WorldHealth:master Nov 27, 2016
@jniles jniles deleted the fix-account-report-currency branch November 27, 2016 18:31
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.

Reports using Enterprise currency
2 participants