landed en lugar de shipped
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2021-05-07 07:52:03 +02:00
parent f1c30ca6d1
commit 19b35f5f6c
1 changed files with 1 additions and 3 deletions

View File

@ -31,19 +31,17 @@ module.exports = Self => {
const zoneIds = []; const zoneIds = [];
for (let zoneAgencyMode of zoneAgencyModes) for (let zoneAgencyMode of zoneAgencyModes)
zoneIds.push(zoneAgencyMode.zoneFk); zoneIds.push(zoneAgencyMode.zoneFk);
const minDate = new Date(route.created); const minDate = new Date(route.created);
minDate.setHours(0, 0, 0, 0); minDate.setHours(0, 0, 0, 0);
const maxDate = new Date(route.created); const maxDate = new Date(route.created);
maxDate.setHours(23, 59, 59, 59); maxDate.setHours(23, 59, 59, 59);
let tickets = await Self.app.models.Ticket.find({ let tickets = await Self.app.models.Ticket.find({
where: { where: {
agencyModeFk: route.agencyModeFk, agencyModeFk: route.agencyModeFk,
zoneFk: {inq: zoneIds}, zoneFk: {inq: zoneIds},
routeFk: null, routeFk: null,
landed: {between: [minDate, maxDate]} shipped: {between: [minDate, maxDate]}
}, },
include: [ include: [
{ {