Commit 531d30368965309161dfa39a8fb77f362f89b6f5
1 parent
761e2779b5
Exists in
master
hojaruta corregido
Showing
2 changed files
with
5 additions
and
17 deletions
Show diff stats
src/js/controllerDetalle.js
| ... | ... | @@ -5,15 +5,13 @@ angular.module('focaOrdenCarga') |
| 5 | 5 | function ($scope, $timeout, $uibModalInstance, focaModalService, |
| 6 | 6 | focaCrearHojaRutaService, parametrosModal) { |
| 7 | 7 | |
| 8 | - $scope.mostrar = false; | |
| 9 | - $scope.orden = parametrosModal.orden; | |
| 10 | - $scope.articulos = []; | |
| 11 | - $scope.cisternaMovimientos = []; | |
| 12 | - | |
| 13 | 8 | init(); |
| 14 | 9 | |
| 15 | 10 | function init() { |
| 16 | - | |
| 11 | + $scope.mostrar = false; | |
| 12 | + $scope.orden = parametrosModal.orden; | |
| 13 | + $scope.articulos = []; | |
| 14 | + $scope.cisternaMovimientos = []; | |
| 17 | 15 | $scope.hojasRutas = parametrosModal.hojasRutas; |
| 18 | 16 | $scope.hojasRutas.vehiculo.cisternas = $scope.hojasRutas.vehiculo.cisternas.filter( |
| 19 | 17 | function (cisterna) { |
| ... | ... | @@ -84,7 +82,7 @@ angular.module('focaOrdenCarga') |
| 84 | 82 | cisterna.articuloSeleccionado = newArt; |
| 85 | 83 | cisterna.nombreArticulo = res.descripcion; |
| 86 | 84 | }).catch(function (e) { |
| 87 | - console.log(e); | |
| 85 | + console.error(e); | |
| 88 | 86 | }); |
| 89 | 87 | }; |
| 90 | 88 | |
| ... | ... | @@ -99,21 +97,12 @@ angular.module('focaOrdenCarga') |
| 99 | 97 | cisternasFilter.forEach(function (cisterna) { |
| 100 | 98 | |
| 101 | 99 | var fechaReparto = $scope.hojasRutas.fechaReparto; |
| 102 | - | |
| 103 | - // var filtroCisternaCarga = cisterna.cisternasCarga.filter(function(carga) { | |
| 104 | - // return carga.fechaReparto === fechaReparto; | |
| 105 | - // }); | |
| 106 | - | |
| 107 | - // if (filtroCisternaCarga.length) { | |
| 108 | - // cisterna.cisternaCarga = filtroCisternaCarga[0]; | |
| 109 | - // } else { | |
| 110 | 100 | cisterna.cisternaCarga = { |
| 111 | 101 | confirmado: null, |
| 112 | 102 | fechaReparto: fechaReparto, |
| 113 | 103 | idCisterna: cisterna.id, |
| 114 | 104 | orden: $scope.orden |
| 115 | 105 | }; |
| 116 | - // } | |
| 117 | 106 | |
| 118 | 107 | //cargar |
| 119 | 108 | if (cisterna.cisternaCarga.cantidad) { |
src/views/modal-detalle-carga.html