Commit 073d89f8101f1d2273570abba6a9bcac2c1beffd
1 parent
3c3ef99287
Exists in
develop
Change
Sub total por total
Showing
3 changed files
with
5 additions
and
5 deletions
Show diff stats
src/app/modules/carrito/carrito.component.html
| ... | ... | @@ -82,7 +82,7 @@ |
| 82 | 82 | <div class="row mx-3 mt-2 h-auto justify-content-end"> |
| 83 | 83 | <div class="col-auto font-weight-bold align-self-center text-primary py-2 h3">TOTAL</div> |
| 84 | 84 | <div class="col-auto align-self-center bg-primary badge-pill"> |
| 85 | - <p class="text-center font-weight-bold text-white py-2 h3 px-2">{{articuloService.subTotal | currency}}</p> | |
| 85 | + <p class="text-center font-weight-bold text-white py-2 h3 px-2">{{articuloService.total | currency}}</p> | |
| 86 | 86 | </div> |
| 87 | 87 | </div> |
| 88 | 88 | <!-- CONTINUAR --> |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
| ... | ... | @@ -167,7 +167,7 @@ |
| 167 | 167 | <div class="row mx-0"> |
| 168 | 168 | <div class="col-auto font-weight-bold align-self-center text-primary py-2 h3">TOTAL</div> |
| 169 | 169 | <div class="col-auto align-self-center bg-primary badge-pill"> |
| 170 | - <p class="text-center font-weight-bold text-white py-2 h3 px-2">{{articuloService.subTotal | currency}}</p> | |
| 170 | + <p class="text-center font-weight-bold text-white py-2 h3 px-2">{{articuloService.total | currency}}</p> | |
| 171 | 171 | </div> |
| 172 | 172 | </div> |
| 173 | 173 | </div> |
src/app/services/articulo/articulo.service.ts
| ... | ... | @@ -15,7 +15,7 @@ export class ArticuloService { |
| 15 | 15 | urlDeboSuite = APP_SETTINGS.apiDeboSuite; |
| 16 | 16 | medioPago: number; |
| 17 | 17 | idComanda: number; |
| 18 | - subTotal = 0; | |
| 18 | + total = 0; | |
| 19 | 19 | maxCantidad = 50; |
| 20 | 20 | |
| 21 | 21 | constructor( |
| ... | ... | @@ -48,9 +48,9 @@ export class ArticuloService { |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | calcularTotal() { |
| 51 | - this.subTotal = 0; | |
| 51 | + this.total = 0; | |
| 52 | 52 | this.carrito.forEach(articulo => { |
| 53 | - this.subTotal += (articulo.PreVen * articulo.cantidad); | |
| 53 | + this.total += (articulo.PreVen * articulo.cantidad); | |
| 54 | 54 | }); |
| 55 | 55 | } |
| 56 | 56 |