Commit d9f4843a8048323af21414a52f5372151cbe8bb0
1 parent
2932137b62
Exists in
master
eliminar vehículos consulta remitos del vehículo sin hoja de ruta
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -224,8 +224,8 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
224 | 224 | } |
225 | 225 | |
226 | 226 | function eliminarVehiculo(vehiculo) { |
227 | - focaLogisticaPedidoRutaService.getRemitos(vehiculo.id).then(function(res) { | |
228 | - if(!focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data).length) { | |
227 | + focaLogisticaPedidoRutaService.getRemitosByIdVehiculo(vehiculo.id).then(function(res) { | |
228 | + if(!res.data.length) { | |
229 | 229 | $scope.vehiculos.splice($scope.vehiculos.indexOf(vehiculo), 1); |
230 | 230 | }else { |
231 | 231 | focaModalService.alert('No ha sido posible eliminar el vehiculo porque ' + |