Commit bac93f028f3fe9ad535d88cc3a7df310ad072a4f
1 parent
81f17d1b0c
Exists in
master
fix item
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
src/js/controllerDetalles.js
... | ... | @@ -33,7 +33,7 @@ angular.module('focaCrearHojaRuta') |
33 | 33 | } |
34 | 34 | }; |
35 | 35 | |
36 | - $scope.seleccionarProductos = function (cisterna) { | |
36 | + $scope.seleccionarProductos = function (key, cisterna) { | |
37 | 37 | focaModalService.modal({ |
38 | 38 | titulo: 'Productos', |
39 | 39 | data: $scope.articulos, |
... | ... | @@ -58,7 +58,7 @@ angular.module('focaCrearHojaRuta') |
58 | 58 | sector: res.sector, |
59 | 59 | sectorCodigo: res.sector + '-' + res.codigo, |
60 | 60 | descripcion: res.descripcion, |
61 | - item: 1, | |
61 | + item: key + 1, | |
62 | 62 | nombre: res.descripcion, |
63 | 63 | precio: parseFloat(res.precio).toFixed(4), |
64 | 64 | costoUnitario: res.costo, |
src/views/modal-detalle-carga.html
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | </thead> |
32 | 32 | <tbody> |
33 | 33 | <tr |
34 | - ng-repeat="cisterna in hojasRutas.vehiculo.cisternas" | |
34 | + ng-repeat="(key, cisterna) in hojasRutas.vehiculo.cisternas" | |
35 | 35 | > |
36 | 36 | <td ng-bind="cisterna.id"></td> |
37 | 37 | <td ng-bind="cisterna.capacidad"></td> |
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | <input |
50 | 50 | ng-model="cisterna.nombreArticulo" |
51 | 51 | class="form-control" |
52 | - ng-click="seleccionarProductos(cisterna)" | |
52 | + ng-click="seleccionarProductos(key, cisterna)" | |
53 | 53 | readonly |
54 | 54 | /> |
55 | 55 | <div class="input-group-append"> |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | ladda="searchLoading" |
58 | 58 | class="btn btn-outline-secondary form-control" |
59 | 59 | type="button" |
60 | - ng-click="seleccionarProductos(cisterna)" | |
60 | + ng-click="seleccionarProductos(key, cisterna)" | |
61 | 61 | > |
62 | 62 | <i class="fa fa-search" aria-hidden="true"></i> |
63 | 63 | </button> |