diff --git a/source/src/index.js b/source/src/index.js index 97b08e3b06b1f87aa5bd485922538b3b23c937ed..a96c346cb07d4927a87861c73bc4aef934d81545 100644 --- a/source/src/index.js +++ b/source/src/index.js @@ -219,10 +219,11 @@ function aggregating(data, doctype) { const reducer = (accumulator, currentValue) => accumulator + currentValue.load if (doctype === rangeDate.an.doctype) { const year = moment().year() + // console.log(data) var filtered = data.filter(function(el) { return el.year == year }) - const time = moment() + const time = moment().startOf('year') return [ { load: filtered.reduce(reducer, 0),