reporte corregido
This commit is contained in:
@@ -34,8 +34,8 @@ const reporte = async (body) => {
|
||||
return Prestamo.findAll({
|
||||
where: {
|
||||
[Op.and]: [
|
||||
{ createdAt: { [Op.gte]: inicio.format() } },
|
||||
{ createdAt: { [Op.lte]: fin.format() } },
|
||||
{ createdAt: { [Op.gte]: inicio.add(-1, 'd').format() } },
|
||||
{ createdAt: { [Op.lte]: fin.add(1, 'd').format() } },
|
||||
],
|
||||
},
|
||||
include: [
|
||||
@@ -127,7 +127,7 @@ const reporte = async (body) => {
|
||||
await helper.eliminarArchivo(path).catch((err) => {});
|
||||
return helper.crearArchivo(path, convertArrayToCSV(data));
|
||||
})
|
||||
.then((res) => path);
|
||||
.then(() => path);
|
||||
};
|
||||
|
||||
module.exports = reporte;
|
||||
|
||||
Reference in New Issue
Block a user