falta interfaz venta
This commit is contained in:
@@ -336,6 +336,7 @@ public class ContratoController: ControllerBase {
|
||||
.SetPropiedad(p.Id)
|
||||
.SetFecha(DateTime.Parse(dto.fechaprimernotificacion))
|
||||
.SetMesesDuracion(dto.MesesDuracionContrato)
|
||||
.SetOpcionVenta(dto.TieneOpcionVenta)
|
||||
.Build();
|
||||
|
||||
|
||||
@@ -349,7 +350,18 @@ public class ContratoController: ControllerBase {
|
||||
.SetMensaje($"El propietario {propi.Nombre} {propi.Apellido} te requiere que carges informacion de {dto.CantidadGarantes} Garantes")
|
||||
.Build();
|
||||
|
||||
var ret = RepositorioContratos.Singleton.CargaPrecontrato(precontrato, notificacion);
|
||||
bool ret;
|
||||
if (dto.TieneOpcionVenta==false){
|
||||
ret = RepositorioContratos.Singleton.CargaPrecontrato(precontrato, notificacion);
|
||||
} else {
|
||||
Venta v = new Venta{
|
||||
Idestado = 1,
|
||||
Iddivisa = dto.iddivisa,
|
||||
Monto = dto.MontoOpcion,
|
||||
};
|
||||
ret = RepositorioContratos.Singleton.CargaPrecontratoOpcionVenta(precontrato, notificacion, v);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
ret = RepositorioNotificaciones.Singleton.MarcarComoLeido(cli.Dni, DateTime.Parse(dto.fechaprimernotificacion));
|
||||
}
|
||||
@@ -816,6 +828,7 @@ public class ContratoController: ControllerBase {
|
||||
if (dto.MesesHastaAumento <= 0) ret += "No puede tener 0 o menos meses hasta el aumento\n";
|
||||
if (dto.MesesDuracionContrato <= 0) ret += "No puede tener 0 o menos meses de duracion\n";
|
||||
if (dto.MesesDuracionContrato < dto.MesesHastaAumento) ret += "el tiempo hasta aumento no puede ser mayor de \n";
|
||||
if (dto.TieneOpcionVenta == true && dto.MontoOpcion <=0) ret +="No puede tener un monto de venta negativo o 0";
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user