prueba no cancelados

This commit is contained in:
Lemuel Marquez
2021-06-23 13:54:22 -05:00
parent 16ed83abaa
commit f67944f08e
+6
View File
@@ -30,6 +30,12 @@ const historial = async (body) => {
if (idTipoCarrito) whereCarrito.push({ idTipoCarrito });
if (idModulo) whereCarrito.push({ idModulo });
return Prestamo.findAndCountAll({
where: {
[Op.or]: [
{ activo: true },
{ [Op.and]: [{ activo: false }, { horaEntrega: { [Op.not]: null } }] },
],
},
include: [
{
model: Equipo,