diff --git a/src/js/controller.js b/src/js/controller.js index d901670..5d0b5e1 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -378,7 +378,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', if(!$scope.notaPedido.cliente.COD || !$scope.notaPedido.domicilio.id) { focaModalService.alert('Primero seleccione un cliente y un domicilio'); return; - }else{ + }else { var modalInstance = $uibModal.open( { ariaLabelledBy: 'Búsqueda de Puntos de descarga', @@ -804,11 +804,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', return false; } } - - function formatearPuntosDescarga(notaPedidoPuntoDescarga) { + function formatearPuntosDescarga(puntosDescarga) { var result = []; - notaPedidoPuntoDescarga.forEach(function(el) { + puntosDescarga.forEach(function(el) { var puntoDescarga = result.filter(function(resultPunto) { return resultPunto.id == el.idPuntoDescarga; }); @@ -836,7 +835,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', ] }); } - }); return result; }