mejoras
This commit is contained in:
parent
b520156b13
commit
ae770a4998
@ -163,6 +163,9 @@ export class PrestamoService {
|
||||
id_tipo_entrada?: number,
|
||||
): Promise<Prestamo> {
|
||||
const ahora = moment();
|
||||
|
||||
if (this.add) ahora.add(this.add, 'h');
|
||||
|
||||
const ahoraStr = ahora.format('YYYY-MM-DD');
|
||||
const modulo = await this.moduloService.findFullInfoById(id_modulo);
|
||||
const tipoCarrito =
|
||||
@ -190,7 +193,6 @@ export class PrestamoService {
|
||||
)
|
||||
: null;
|
||||
|
||||
if (this.add) ahora.add(this.add, 'h');
|
||||
// Validamos que el id_institucion_usuario le pertenezca al usuario
|
||||
if (institucionUsuario.usuario.id_usuario != usuario.id_usuario)
|
||||
throw new ConflictException('No te pertenece esta información.');
|
||||
@ -288,6 +290,9 @@ export class PrestamoService {
|
||||
id_prestamo: number | Prestamo,
|
||||
): Promise<Equipo> {
|
||||
const ahora = moment();
|
||||
|
||||
if (this.add) ahora.add(this.add, 'h');
|
||||
|
||||
const ahoraStr = ahora.format('YYYY-MM-DD');
|
||||
const prestamo =
|
||||
typeof id_prestamo === 'number'
|
||||
@ -303,7 +308,6 @@ export class PrestamoService {
|
||||
? moment(`${ahoraStr} ${institucionDia.hora_fin}`)
|
||||
: null;
|
||||
|
||||
if (this.add) ahora.add(this.add, 'h');
|
||||
if (
|
||||
prestamo.equipo.carrito.tipoCarrito.id_tipo_carrito != 4 &&
|
||||
prestamo.equipo.carrito.tipoCarrito.id_tipo_carrito != 5
|
||||
|
Loading…
Reference in New Issue
Block a user