Skip to content

Commit

Permalink
rename cashboxId to cashboxAccountId
Browse files Browse the repository at this point in the history
  • Loading branch information
mbayopanda committed Jul 29, 2019
1 parent 00869ad commit f895692
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/controllers/finance/reports/cashflow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports.byService = reportByService;
function reportByService(req, res, next) {
const dateFrom = new Date(req.query.dateFrom);
const dateTo = new Date(req.query.dateTo);
const { cashboxId } = req.query;
const cashboxAccountId = req.query.cashboxId;

let serviceReport;

Expand All @@ -61,7 +61,6 @@ function reportByService(req, res, next) {
const data = {};
data.dateFrom = dateFrom;
data.dateTo = dateTo;
data.cashboxId = cashboxId;

let emptyCashValues = false;

Expand Down Expand Up @@ -114,7 +113,7 @@ function reportByService(req, res, next) {
`;

// pick up the cashbox's details
db.one(cashboxDetailsSql, cashboxId)
db.one(cashboxDetailsSql, cashboxAccountId)
.then(cashbox => {
data.cashbox = cashbox;
return db.exec(cashflowByServiceSql, [dateFrom, dateTo, cashbox.id]);
Expand Down

0 comments on commit f895692

Please sign in to comment.