error en reportes en fechas
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user