diff --git a/modules/ticket/back/methods/ticket/threeLastActive.js b/modules/ticket/back/methods/ticket/threeLastActive.js index fa4eab99d..839fcc465 100644 --- a/modules/ticket/back/methods/ticket/threeLastActive.js +++ b/modules/ticket/back/methods/ticket/threeLastActive.js @@ -25,9 +25,10 @@ module.exports = Self => { JOIN vn.ticketState ts ON t.id = ts.ticketFk JOIN vn.agencyMode a ON t.agencyModeFk = a.id JOIN vn.warehouse w ON t.warehouseFk = w.id - WHERE t.shipped > CURDATE() AND t.clientFk = ? AND ts.alertLevel = 0 AND t.id <> ? + WHERE t.shipped >= CURDATE() AND t.clientFk = ? + AND ts.alertLevel = 0 AND t.id <> ? ORDER BY t.shipped - LIMIT 3`; + LIMIT 5`; let tickets = await Self.rawSql(query, [params.clientFk, params.ticketFk]); return tickets; };