Skip to content

Commit

Permalink
Adding the date function on group by
Browse files Browse the repository at this point in the history
  • Loading branch information
mbayopanda committed May 14, 2020
1 parent 9466ae7 commit 81067ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/controllers/stock/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ async function getStockConsumptionAverage(periodId, periodDate, monthAverageCons
JOIN inventory i ON i.uuid = l.inventory_uuid
WHERE
(DATE(sm.date) BETWEEN ? AND ?) AND flux_id IN (${flux.TO_PATIENT}, ${flux.TO_SERVICE})
GROUP BY sm.depot_uuid, i.uuid, sm.date
GROUP BY sm.depot_uuid, i.uuid, DATE(sm.date)
HAVING quantity > 0
ORDER BY i.text
)z
Expand Down

0 comments on commit 81067ef

Please sign in to comment.