Commit e43737e57c5bb72203b1daf0f13625d58980a29a

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master(efernandez)

See merge request !57
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>