From 7f04c19b8c18bf570bf9993104b4d24e198d89c2 Mon Sep 17 00:00:00 2001 From: Lemuel Marquez Date: Tue, 6 Apr 2021 07:50:56 -0500 Subject: [PATCH] error en reportes en fechas --- .DS_Store | Bin 6148 -> 6148 bytes server/controller/Servicio/gustavoBazPrada.js | 6 ++++-- server/controller/Servicio/reporte.js | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.DS_Store b/.DS_Store index 10f972fbccb9bbd7a559321851f2998709b77a5d..d63f05486cd359fd415b042f60433d4498489faf 100644 GIT binary patch delta 69 zcmZoMXfc=|#>B`mu~2NHo+2aD#DLwC4MbQb^E3U}{EL~FWwQXwXU5I!9Q+(WMVlE} XzB5ne7qR4E00Kq^2ByscB3qaNm>>}X delta 116 zcmZoMXfc=|#>B)qu~2NHo+2a5#DLw46_^+qStj!^{uX3nNMT4yDlaZb%E?b+U|={s zS&6ZMU8=g;(7?cK@+wAU#@Un4G0Jn!0m^~ZZvMe2!?Ky3gP#Lv=4L^r@640=MJzcO P85n?wfnjri$QEV*{Z<@O diff --git a/server/controller/Servicio/gustavoBazPrada.js b/server/controller/Servicio/gustavoBazPrada.js index 201b4e5..2a243ee 100644 --- a/server/controller/Servicio/gustavoBazPrada.js +++ b/server/controller/Servicio/gustavoBazPrada.js @@ -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) => { diff --git a/server/controller/Servicio/reporte.js b/server/controller/Servicio/reporte.js index c5e746c..5b7f1fc 100644 --- a/server/controller/Servicio/reporte.js +++ b/server/controller/Servicio/reporte.js @@ -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) => {