Commit c0a509ef731624ec484e0fb7865b1a1b732af48d

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master

See merge request !61
src/js/controllerDetalles.js
... ... @@ -144,10 +144,7 @@ angular.module('focaCrearHojaRuta')
144 144 };
145 145  
146 146 $scope.cancel = function () {
147   - var validarCisternas = validarArticulos();
148   - if (validarCisternas !== undefined) {
149   - $uibModalInstance.dismiss(null);
150   - }
  147 + $uibModalInstance.dismiss(null);
151 148 };
152 149  
153 150 function validarArticulos () {
... ... @@ -161,7 +158,7 @@ angular.module('focaCrearHojaRuta')
161 158 (!cisterna.articuloSeleccionado && cisterna.disponible);
162 159 });
163 160  
164   - if (cisternasIncompletas.length || !cisternasFilter.length) {
  161 + if (cisternasIncompletas.length > 0 && cisternasFilter.length > 0 ) {
165 162 focaModalService.alert('Ingrese todos los campos para completar el remito');
166 163 cisternasFilter = undefined;
167 164 }
... ... @@ -8,9 +8,8 @@ angular.module('focaCrearHojaRuta')
8 8 return $http.post(route + '/hoja-ruta', hojaRuta);
9 9 },
10 10 crearRemito: function(remito) {
11   - console.log('Crear remito-----: ', remito);
12 11 // TODO: Cambiar para usar el servicio /remito
13   - return $http.post(route + '/remito', remito);
  12 + return $http.post(route + '/remito/guardar', remito);
14 13 },
15 14 obtenerHojaRuta: function() {
16 15 return $http.get(route +'/hoja-ruta');