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

(error) Landing page details #1675

Closed
mbayopanda opened this issue May 24, 2017 · 3 comments · Fixed by #1678
Closed

(error) Landing page details #1675

mbayopanda opened this issue May 24, 2017 · 3 comments · Fixed by #1678
Assignees
Labels

Comments

@mbayopanda
Copy link
Collaborator

There is an error on the landing page details :

  • 400 : BAD REQUEST
  • SQL ER_PARSE_ERROR

landing-page-error

@jniles
Copy link
Collaborator

jniles commented May 24, 2017

The error is because this line:

  const dbPromise = [db.exec(sqlInvoices, [date, date]), db.exec(sqlBalance, [date, date])];

Should be

  const dbPromise = [db.exec(sqlInvoices, [date, date, date, date]), db.exec(sqlBalance, [date, date, date, date])];

@jniles
Copy link
Collaborator

jniles commented May 24, 2017

Also, the sqlInvoices query could be greatly improved by only scanning the invoices table instead of the invoices JOINed with voucher.

@jniles jniles added the Bug label May 24, 2017
@jniles
Copy link
Collaborator

jniles commented May 24, 2017

I'll take this.

@jniles jniles self-assigned this May 24, 2017
jniles added a commit to jniles/bhima that referenced this issue May 24, 2017
This commit fixes a bug in the dashboard which previously didn't
template in all the correct dates.  It also improves the performance
slightly be removing a JOIN between voucher and invoices.

Closes Third-Culture-Software#1675.
jniles added a commit to jniles/bhima that referenced this issue May 25, 2017
This commit fixes a bug in the dashboard which previously didn't
template in all the correct dates.  It also improves the performance
slightly be removing a JOIN between voucher and invoices.

Closes Third-Culture-Software#1675.
bors bot added a commit that referenced this issue May 25, 2017
1678: fix(stats): template in all dates for dashboard r=jniles
This commit fixes a bug in the dashboard which previously didn't
template in all the correct dates.  It also improves the performance
slightly be removing a JOIN between voucher and invoices.

Closes #1675.

------

Thank you for contributing!

Before submitting this pull request, please verify that you have:
 - [x] Run your code through ESLint.  [Check out our styleguide](https://github.com/IMA-WorldHealth/bhima-2.X/blob/master/docs/STYLEGUIDE.md).
 - [x] Run integration tests.
 - [x] Run end-to-end tests.
 - [x] Accurately described the changes your are making in this pull request.

For a more detailed checklist, [see the official review checklist](https://docs.google.com/document/d/1nupLVLRXgSZJQo_acLgrwvPnN8RukfSiwRhSToj81uU/pub) 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!
@bors bors bot closed this as completed in #1678 May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants