diff --git a/src/js/controller.js b/src/js/controller.js index 0fece52..9796bb3 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -48,7 +48,6 @@ angular.module('focaCrearRemito').controller('remitoController', }); init(); - } function init() { @@ -290,15 +289,14 @@ angular.module('focaCrearRemito').controller('remitoController', //validacion por domicilio y por plazo pago $scope.crearRemito = function () { - if (!remitoBusinessService.validarRemito($scope.remito, $scope.articulosFiltro())) - { + if (!remitoBusinessService.validarRemito($scope.remito, $scope.articulosFiltro())) { return; } focaBotoneraLateralService.startGuardar(); $scope.saveLoading = true; var rutaJson = JSON.parse($localStorage.rutas); - removeItemFromArr( rutaJson, 'venta-remito/crear' ); + removeItemFromArr(rutaJson, 'venta-remito/crear'); $localStorage.rutas = JSON.stringify(rutaJson); var save = { @@ -878,7 +876,7 @@ angular.module('focaCrearRemito').controller('remitoController', cotizacionPArgentino.moneda = moneda; actualizarCabeceraMoneda(cotizacionPArgentino); - $filter('filter')($scope.botonera, + $filter('filter')($scope.botonera, { label: 'Moneda' })[0].checked = true; $scope.remito.cotizacion = cotizacionPArgentino; }); @@ -916,7 +914,7 @@ angular.module('focaCrearRemito').controller('remitoController', cotizacion.moneda = moneda; $scope.remitoIsDirty = true; actualizarCabeceraMoneda(cotizacion); - $filter('filter')($scope.botonera, + $filter('filter')($scope.botonera, { label: 'Moneda' })[0].checked = true; $scope.remito.cotizacion = cotizacion; }, function () { @@ -1072,11 +1070,11 @@ angular.module('focaCrearRemito').controller('remitoController', } } - function removeItemFromArr ( arr, item ) { - var i = arr.indexOf( item ); - - if ( i !== -1 ) { - arr.splice( i, 1 ); + function removeItemFromArr(arr, item) { + var i = arr.indexOf(item); + + if (i !== -1) { + arr.splice(i, 1); } } @@ -1094,7 +1092,7 @@ angular.module('focaCrearRemito').controller('remitoController', if (data) { $location.path('/'); var rutaJson = JSON.parse($localStorage.rutas); - removeItemFromArr( rutaJson, 'venta-remito/crear' ); + removeItemFromArr(rutaJson, 'venta-remito/crear'); $localStorage.rutas = JSON.stringify(rutaJson); } }); @@ -1282,7 +1280,7 @@ angular.module('focaCrearRemito').controller('remitoController', nombre: numeroRemito + '.pdf', url: '/remito/comprobante', }, - descarga2: { + descargaSinValorizar: { nombre: numeroRemito + '.pdf', url: '/remito/comprobanteSV', },