Commit d7f62d63f29bffad7b27661cdaee49e3e494bc98

Authored by Marcelo Puebla
1 parent 6ff8cc8cab
Exists in master and in 1 other branch validar_pve

Cambio de for a foreach.

src/app/components/popover-promos/popover-promos.component.ts
... ... @@ -31,9 +31,10 @@ export class PopoverPromosComponent implements OnInit {
31 31 calcularPrecioDePromo(productos: Producto[]) {
32 32  
33 33 var precio = 0;
34   - for (let i = 0; i < productos.length; i++) {
35   - precio += productos[i].PreVen;
36   - }
  34 + productos.forEach(producto => {
  35 + precio += producto.PreVen;
  36 + })
  37 +
37 38 return precio;
38 39 }
39 40