prueba no cancelados
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user