fleetmap-reports 1.0.943 → 1.0.944

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.943",
3
+ "version": "1.0.944",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/kms-report.js CHANGED
@@ -7,7 +7,7 @@ const {
7
7
  } = require('./util/pdfDocument')
8
8
  const { getUserPartner } = require('fleetmap-partners')
9
9
  const traccar = require('./util/traccar')
10
- const { getDates, getTranslations, isClientSide, executeServerSide } = require('./util/utils')
10
+ const { getDates, getTranslations, isClientSide, executeServerSide, convertFromLocal } = require('./util/utils')
11
11
  const drivers = require('./util/driver')
12
12
  const { isInsideTimetable, isPartialInsideTimetable, calculateTrip, getDataByDay, checkTripsKms, getKms } = require('./util/trips')
13
13
  const traccarHelper = require('./util/traccar')
@@ -178,7 +178,7 @@ async function processDevices (from, to, devices, data, userData, traccarInstanc
178
178
  const dates = getDates(from, to, userData.user.attributes.timezone || getUserPartner(userData.user).timezone)
179
179
  const days = await Promise.all(dates.map(async date => {
180
180
  const { tripsByDay } = await getDataByDay(d, date, { trips }, userData, traccarInstance)
181
- console.log(date, trips.length)
181
+ console.log(date, tripsByDay.length)
182
182
  return {
183
183
  date,
184
184
  kms: getKms(tripsByDay)