feat: contrato soporta múltiples servicios (many2many) con precio sugerido
This commit is contained in:
@@ -56,12 +56,18 @@ func ProcesarVencimientos() {
|
||||
for _, c := range contratos {
|
||||
switch regla.AplicaA {
|
||||
case "renovable":
|
||||
if c.Servicio.Tipo == "renovable" {
|
||||
filtrados = append(filtrados, c)
|
||||
for _, s := range c.Servicios {
|
||||
if s.Tipo == "renovable" {
|
||||
filtrados = append(filtrados, c)
|
||||
break
|
||||
}
|
||||
}
|
||||
case "unico":
|
||||
if c.Servicio.Tipo == "unico" {
|
||||
filtrados = append(filtrados, c)
|
||||
for _, s := range c.Servicios {
|
||||
if s.Tipo == "unico" {
|
||||
filtrados = append(filtrados, c)
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
filtrados = append(filtrados, c)
|
||||
|
||||
Reference in New Issue
Block a user