From 70e82ed927561a0c93831c8ecc9d5753b9ff5268 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 9 Apr 2019 09:26:23 -0300 Subject: [PATCH] =?UTF-8?q?Arreglo=20bot=C3=B3n=20pausar=20y=20cabeceras?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/controller.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index e90c027..8dcf053 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -20,7 +20,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $rootScope, focaSeguimientoService, APP, focaLoginService, $localStorage) { config(); - + function config() { // PARAMETROS INICIALES PARA FUNCIONAMIENTO DEL PROGRAMA $scope.notaPedido = {}; @@ -50,15 +50,15 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', } //Trabajo con la cotización más reciente, por eso uso siempre la primera '[0]' - crearNotaPedidoService.getCotizacionByIdMoneda(1).then(function(res) { + /*crearNotaPedidoService.getCotizacionByIdMoneda(1).then(function(res) { var monedaPorDefecto = res.data[0]; - $scope.notaPedido.cotizacion = Object.assign( + $scope.inicial.cotizacion = Object.assign( {moneda: monedaPorDefecto}, monedaPorDefecto.cotizaciones[0] ); - $scope.inicial.cotizacion = $scope.notaPedido.cotizacion; - }); + $scope.notaPedido.cotizacion = $scope.inicial.cotizacion; + });*/ init(); $timeout(function() {getLSNotaPedido();}); @@ -810,7 +810,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', var cabeceras = []; - if (notaPedido.cotizacion.moneda.CODIGO_AFIP != 'PES') { + if (notaPedido.cotizacion.moneda.CODIGO_AFIP !== 'PES') { cabeceras.push({ label: 'Moneda:', valor: notaPedido.cotizacion.moneda.DETALLE @@ -837,7 +837,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', valor: notaPedido.domicilioStamp }); } - + if (notaPedido.vendedor.NUM) { cabeceras.push({ label: 'Vendedor:', @@ -908,8 +908,9 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', notaPedido.numeroNotaPedido, 8 ); - $scope.notaPedido.notaPedidoPuntoDescarga = - formatearPuntosDescarga(notaPedido.notaPedidoPuntoDescarga || []); + /*$scope.notaPedido.notaPedidoPuntoDescarga = + formatearPuntosDescarga(notaPedido.notaPedidoPuntoDescarga || []);*/ + addArrayCabecera(cabeceras); } @@ -990,8 +991,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', function getLSNotaPedido() { var notaPedido = JSON.parse($localStorage.notaPedido || null); if (notaPedido) { - setearNotaPedido(notaPedido); delete $localStorage.notaPedido; + setearNotaPedido(notaPedido); } } -- 1.9.1