Commit ccb7ccfd458c36855573783d3d1bd6c283e8430e

Authored by Eric Fernandez
1 parent 72ecc038ef
Exists in master and in 1 other branch validar_pve

fix límite articulos al escanear

src/app/components/inicio/inicio.component.ts
... ... @@ -79,7 +79,7 @@ export class InicioComponent implements OnInit, AfterViewInit {
79 79  
80 80 if (res.length === 0) {
81 81  
82   - this.productoAcargar.cantidad = 1;
  82 + this.productoAcargar.cantidad ? false : this.productoAcargar.cantidad = 1;
83 83 this.productoService.setProductos(this.productoAcargar);
84 84 this.productoAcargar = this.productoService.productoAcargar = undefined;
85 85 } else {
src/app/components/sidebar/sidebar.component.ts
... ... @@ -73,6 +73,7 @@ export class SidebarComponent implements OnInit {
73 73  
74 74 this.cantTotal -= producto.cantidad;
75 75 this.total -= producto.PreVen * producto.cantidad;
  76 + delete producto.cantidad;
76 77 this.productosCarrito.splice(index, 1);
77 78 return;
78 79 }