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
+4 -2
View File
@@ -15,8 +15,10 @@ const reporte = async (body) => {
return Servicio.findAll({
where: {
fechaInicio: { [Op.gte]: inicio },
fechaInicio: { [Op.lte]: fin },
[Op.and]: {
fechaInicio: { [Op.gte]: inicio },
fechaInicio: { [Op.lte]: fin },
},
},
include: [{ model: Programa }, { model: Usuario }, { model: Carrera }],
}).then((res) => {