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
Vendored
BIN
View File
Binary file not shown.
@@ -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) => {
+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) => {