cambio landed por created #620

Merged
joan merged 4 commits from 2902-error-getSuggestedTickets into dev 2021-05-11 09:57:43 +00:00
1 changed files with 1 additions and 3 deletions
Showing only changes of commit 19b35f5f6c - Show all commits

View File

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