Commit 672dac20d86747d11fe7dd70591bcb0f40e0e609

Authored by Marcelo Puebla
1 parent 0d0fe2b404
Exists in develop

Add

Validacion del maximo de articulos que se puede sumar
Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
src/app/services/articulo/articulo.service.ts
... ... @@ -16,7 +16,6 @@ export class ArticuloService {
16 16 medioPago: number;
17 17 idComanda: number;
18 18 total = 0;
19   - maxCantidad = 50;
20 19  
21 20 constructor(
22 21 private http: HttpClient,
... ... @@ -42,7 +41,7 @@ export class ArticuloService {
42 41 }
43 42  
44 43 addCant(articulo: IArticulo) {
45   - if (articulo.cantidad >= this.maxCantidad) return;
  44 + if (articulo.cantidad >= articulo.ExiVta) return;
46 45 articulo.cantidad++;
47 46 this.calcularTotal();
48 47 }