error en reportes en fechas

This commit is contained in:
Lemuel Marquez
2021-04-06 07:50:56 -05:00
parent 871d121cbd
commit 7f04c19b8c
3 changed files with 8 additions and 4 deletions
@@ -14,8 +14,10 @@ const gustavoBazPrada = async (body) => {
return Servicio.findAll({
where: {
fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) },
fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) },
[Op.and]: {
fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) },
fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) },
},
},
include: [{ model: Usuario }, { model: Carrera }],
}).then((res) => {