diff --git a/src/js/controller.js b/src/js/controller.js index c5051c1..518b57f 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -298,14 +298,6 @@ angular.module('focaCrearRemito').controller('remitoController', focaBotoneraLateralService.startGuardar(); $scope.saveLoading = true; var ar = JSON.parse($localStorage.rutas); - function removeItemFromArr ( arr, item ) { - var i = arr.indexOf( item ); - - if ( i !== -1 ) { - arr.splice( i, 1 ); - } - } - removeItemFromArr( ar, 'venta-remito/crear' ); $localStorage.rutas = JSON.stringify(ar); @@ -1080,6 +1072,14 @@ angular.module('focaCrearRemito').controller('remitoController', } } + function removeItemFromArr ( arr, item ) { + var i = arr.indexOf( item ); + + if ( i !== -1 ) { + arr.splice( i, 1 ); + } + } + function salir() { var confirmacion = false; @@ -1094,14 +1094,6 @@ angular.module('focaCrearRemito').controller('remitoController', if (data) { $location.path('/'); var ar = JSON.parse($localStorage.rutas); - function removeItemFromArr ( arr, item ) { - var i = arr.indexOf( item ); - - if ( i !== -1 ) { - arr.splice( i, 1 ); - } - } - removeItemFromArr( ar, 'venta-remito/crear' ); $localStorage.rutas = JSON.stringify(ar); }