From d9f4843a8048323af21414a52f5372151cbe8bb0 Mon Sep 17 00:00:00 2001 From: efernandez Date: Wed, 30 Jan 2019 11:51:22 -0300 Subject: [PATCH] =?UTF-8?q?eliminar=20veh=C3=ADculos=20consulta=20remitos?= =?UTF-8?q?=20del=20veh=C3=ADculo=20sin=20hoja=20de=20ruta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index 6698787..37aa8fb 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -224,8 +224,8 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo } function eliminarVehiculo(vehiculo) { - focaLogisticaPedidoRutaService.getRemitos(vehiculo.id).then(function(res) { - if(!focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data).length) { + focaLogisticaPedidoRutaService.getRemitosByIdVehiculo(vehiculo.id).then(function(res) { + if(!res.data.length) { $scope.vehiculos.splice($scope.vehiculos.indexOf(vehiculo), 1); }else { focaModalService.alert('No ha sido posible eliminar el vehiculo porque ' + -- 1.9.1