From 4638ed54ac0aed1e8966f479e8bc9159aede03f9 Mon Sep 17 00:00:00 2001 From: Lemuel Marquez Date: Tue, 6 Apr 2021 10:36:22 -0500 Subject: [PATCH] prueba gustavo baz --- server/controller/Servicio/gustavoBazPrada.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/controller/Servicio/gustavoBazPrada.js b/server/controller/Servicio/gustavoBazPrada.js index d73853e..645a51f 100644 --- a/server/controller/Servicio/gustavoBazPrada.js +++ b/server/controller/Servicio/gustavoBazPrada.js @@ -9,14 +9,16 @@ const Carrera = require('../../db/tablas/Carrera'); const gustavoBazPrada = async (body) => { const year = validar.validarNumero(body.year, 4); + const inicio = moment(`${year}-01-31`); + const fin = moment(`${year + 1}-01-31`); const path = `csv/${year}_gustavo_baz_prada.csv`; const data = []; return Servicio.findAll({ where: { [Op.and]: [ - { fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) } }, - { fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) } }, + { fechaLiberacion: { [Op.gte]: inicio } }, + { fechaLiberacion: { [Op.lte]: fin } }, ], }, include: [{ model: Usuario }, { model: Carrera }],