Skip to content

Commit

Permalink
fix(reports): updates vars in stock exp. report
Browse files Browse the repository at this point in the history
This commit fixes the stock expiration report which no longer worked
after the variable case change landed in the stock performance updates.
  • Loading branch information
jniles committed Dec 10, 2020
1 parent 57710de commit 8252e9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/controllers/stock/reports/stock/expiration_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ async function stockExpirationReport(req, res, next) {
delete options.label;

// define month average and the algo to use
options.monthAverageConsumption = req.session.stock_settings.month_average_consumption;
options.averageConsumptionAlgo = req.session.stock_settings.average_consumption_algo;
// eslint-disable-next-line
const { month_average_consumption, average_consumption_algo } = req.session.stock_settings;
_.extend(options, { month_average_consumption, average_consumption_algo });

// get the lots for this depot
const lots = await stockCore.getLotsDepot(options.depot_uuid, options);
Expand Down

0 comments on commit 8252e9a

Please sign in to comment.