From 6eccd5edf7441d272c0ec60b2999fde0ea8a7f51 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 24 Apr 2019 17:08:09 -0300 Subject: [PATCH] inicial --- src/js/controller.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index 3ce2333..7592d9e 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -76,6 +76,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $scope.notaPedido.fob = false; $scope.notaPedido.bomba = false; + $scope.inicial.flete = false; + $scope.inicial.fob = false; + $scope.inicial.bomba = false; + $timeout(function() { getLSNotaPedido();} ); }); @@ -129,6 +133,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', }); $scope.notaPedido.vendedor = vendedor; + $scope.inicial.vendedor = $scope.notaPedido.vendedor; } ); } @@ -778,7 +783,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $scope.notaPedido.articulosNotaPedido.splice(key, 1); }; - $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { + $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { if (key === 13) { if (!articulo.cantidad || !articulo.precio) { focaModalService.alert('Los valores deben ser al menos 1'); @@ -796,8 +801,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $scope.cancelarEditar = function(articulo) { $scope.tmpCantidad = articulo.cantidad; - $scope.tmpPrecio = articulo.precio; - articulo.editCantidad = articulo.editPrecio = false; + $scope.tmpPrecio = articulo.precio; + articulo.editCantidad = articulo.editPrecio = false; }; $scope.cambioEdit = function(articulo, propiedad) { @@ -950,10 +955,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', notaPedido.numeroNotaPedido, 8 ); - if (notaPedido.notaPedidoPuntoDescarga) { + if (notaPedido.notaPedidoPuntoDescarga) { var puntos = []; - notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga, idx, arr) { - puntos.push(notaPedidoPuntoDescarga.puntoDescarga); + notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga) { + puntos.push(notaPedidoPuntoDescarga); }); cabeceras.push({ label: 'Puntos de descarga: ', @@ -964,7 +969,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', addArrayCabecera(cabeceras); } - function getCabeceraPuntoDescarga(puntoDescarga){ + function getCabeceraPuntoDescarga(puntoDescarga) { var puntosStamp = ''; puntoDescarga.forEach(function(punto, idx, arr) { puntosStamp += punto.descripcion; -- 1.9.1