Commit e3744302311ec6adbc07ea2149464c0bd714859e
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !28
Showing
2 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -245,14 +245,13 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
245 | 245 | } |
246 | 246 | |
247 | 247 | function vehiculoEnUso(vehiculo) { |
248 | - $scope.fechaReparto.setHours(0, 0, 0, 0); | |
249 | 248 | var idUsuario = focaLogisticaPedidoRutaService.idUsuario; |
250 | 249 | for(var i = 0; i < vehiculo.cisternas.length; i++) { |
251 | 250 | for(var j = 0; j < vehiculo.cisternas[i].cisternasCarga.length; j++) { |
252 | 251 | var cisternaCarga = vehiculo.cisternas[i].cisternasCarga[j]; |
253 | 252 | if(cisternaCarga.fechaReparto.substring(0, 10) === $scope.fechaReparto |
254 | - .toISOString().substring(0, 10) && cisternaCarga.idUsuarioProceso !== | |
255 | - idUsuario) | |
253 | + .toISOString().substring(0, 10) && cisternaCarga.idUsuarioProceso && | |
254 | + cisternaCarga.idUsuarioProceso !== idUsuario) | |
256 | 255 | { |
257 | 256 | focaModalService.alert('El vehículo está siendo usado por otro usuario'); |
258 | 257 | return true; |
src/js/service.js
... | ... | @@ -16,7 +16,7 @@ angular.module('focaLogisticaPedidoRuta') |
16 | 16 | return $http.get(url + '/hoja-ruta/numero-siguiente'); |
17 | 17 | }, |
18 | 18 | getRemitos: function(idVehiculo) { |
19 | - return $http.get(url + '/remito/sin-hoja-ruta/' +idVehiculo); | |
19 | + return $http.get(url + '/remito/sin-hoja-ruta/' + idVehiculo); | |
20 | 20 | }, |
21 | 21 | cerrarDistribuicion: function(remitos) { |
22 | 22 | return $http.post(url + '/vehiculo/cierre-distribuicion', remitos); |