-
Notifications
You must be signed in to change notification settings - Fork 105
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
Adding print functionality #669
Adding print functionality #669
Conversation
project : req.session.project | ||
}; | ||
|
||
let invoiceListQuery = |
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.
This code is the exact same code as the patientInvoice list() function. Since it is a duplication, I propose that you use the same function.
I propose that you make a new function in the patientInvoice
file called listInvoices()
. You could then write:
// GET /invoices
function list(req, res, next) {
listInvoices()
.then(function (invoices) {
res.status(200).json(invoices);
})
.catch(next)
.done();
}
// GET /invoices/patient/report
function getPatientInvoice(req, res, next) {
const request = { /* some values */ };
listInvoices()
.then(invoices => listReceipt.build(invoices, request):
// ... etc ...
})
.catch(next)
.done();
}
Remember, in software engineering, we don't like to repeat ourselves.
@lomamech I've completed an initial code review. Thanks for taking the time to work all this out. Here are some additional comments outside the code.
Let me know if you need any clarification or when you need another review. |
699372b
to
f7a047d
Compare
|
Changement of repository for list and list.hanflerbars Remove the unused repository receipts
f7a047d
to
9d952dc
Compare
Hello @jniles |
@lomamech, the tests do not pass on Node versions less than v6. The error you are receiving is due to missing 'use strict' in one of the files you changed to use |
This commit fixes the strict mode errors on lower node versions. Closes #669.
This commit fixes the strict mode errors on lower node versions. Closes #669.
Adding print functionality
Update bhBreadcrumb.js component for adding property print
Update template for breadCrumb with the using of bh-breadcrumb
Implement patient invoice report in PDF
Update inventory list, voucher registry for Prevent modale windows
Adding route for manage invoice / patient / report
@jniles