Commit fd918561c57de9d1cb3c90fb57fe32c5bf6bdc2d
1 parent
4384b790cf
Exists in
master
and in
1 other branch
Funcion incrementar 2
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
src/app/sidebar/sidebar.component.ts
... | ... | @@ -63,12 +63,9 @@ export class SidebarComponent implements OnInit { |
63 | 63 | |
64 | 64 | getTotal(){ |
65 | 65 | var subTotal; |
66 | - for (const pr of this.productos) { | |
67 | - subTotal = pr.cantidad * pr.precio; | |
66 | + for (let i = 0; i < this.productos.length; i++) { | |
67 | + this.productos[i].cantidad; | |
68 | 68 | } |
69 | - this.total = this.total + subTotal; | |
70 | - this.total = this.total * this.cont; | |
71 | - return this.total; | |
72 | 69 | } |
73 | 70 | |
74 | 71 | public aumentarContador(index) { |