Commit 4bdc05ab710e98c40ba626452b2a201829467686
1 parent
0de2d23fd5
Exists in
develop
Fix
Cantidad restante
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
src/app/shared/header-publicidad/header-publicidad.component.ts
... | ... | @@ -93,8 +93,10 @@ export class HeaderPublicidadComponent implements OnInit { |
93 | 93 | if (res.length) { |
94 | 94 | const sinonimos = []; |
95 | 95 | const gruposArticulos = _.groupBy(res[0].productos, 'ID_SIN'); |
96 | - Object.keys(gruposArticulos).forEach(key => { | |
96 | + Object.keys(gruposArticulos).forEach((key, i) => { | |
97 | 97 | sinonimos.push({ productos: gruposArticulos[key] }); |
98 | + sinonimos[i].cantidad = articulo.productos[i].cantidad; | |
99 | + sinonimos[i].cantidadRestante = articulo.productos[i].cantidad; | |
98 | 100 | }); |
99 | 101 | res = sinonimos; |
100 | 102 | this.openModalSinonimos(res, articulo); |
src/app/shared/promocion/promocion.component.ts
... | ... | @@ -51,8 +51,10 @@ export class PromocionComponent implements OnInit { |
51 | 51 | if (res.length) { |
52 | 52 | const sinonimos = []; |
53 | 53 | const gruposArticulos = _.groupBy(res[0].productos, 'ID_SIN'); |
54 | - Object.keys(gruposArticulos).forEach(key => { | |
54 | + Object.keys(gruposArticulos).forEach((key, i) => { | |
55 | 55 | sinonimos.push({ productos: gruposArticulos[key] }); |
56 | + sinonimos[i].cantidad = promo.productos[i].cantidad; | |
57 | + sinonimos[i].cantidadRestante = promo.productos[i].cantidad; | |
56 | 58 | }); |
57 | 59 | res = sinonimos; |
58 | 60 | this.openModalSinonimos(res, promo); |