Commit 6eccd5edf7441d272c0ec60b2999fde0ea8a7f51
1 parent
78c7dd382b
Exists in
master
inicial
Showing
1 changed file
with
12 additions
and
7 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -76,6 +76,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
76 | 76 | $scope.notaPedido.fob = false; |
77 | 77 | $scope.notaPedido.bomba = false; |
78 | 78 | |
79 | + $scope.inicial.flete = false; | |
80 | + $scope.inicial.fob = false; | |
81 | + $scope.inicial.bomba = false; | |
82 | + | |
79 | 83 | $timeout(function() { getLSNotaPedido();} ); |
80 | 84 | }); |
81 | 85 | |
... | ... | @@ -129,6 +133,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
129 | 133 | }); |
130 | 134 | |
131 | 135 | $scope.notaPedido.vendedor = vendedor; |
136 | + $scope.inicial.vendedor = $scope.notaPedido.vendedor; | |
132 | 137 | } |
133 | 138 | ); |
134 | 139 | } |
... | ... | @@ -778,7 +783,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
778 | 783 | $scope.notaPedido.articulosNotaPedido.splice(key, 1); |
779 | 784 | }; |
780 | 785 | |
781 | - $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { | |
786 | + $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { | |
782 | 787 | if (key === 13) { |
783 | 788 | if (!articulo.cantidad || !articulo.precio) { |
784 | 789 | focaModalService.alert('Los valores deben ser al menos 1'); |
... | ... | @@ -796,8 +801,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
796 | 801 | |
797 | 802 | $scope.cancelarEditar = function(articulo) { |
798 | 803 | $scope.tmpCantidad = articulo.cantidad; |
799 | - $scope.tmpPrecio = articulo.precio; | |
800 | - articulo.editCantidad = articulo.editPrecio = false; | |
804 | + $scope.tmpPrecio = articulo.precio; | |
805 | + articulo.editCantidad = articulo.editPrecio = false; | |
801 | 806 | }; |
802 | 807 | |
803 | 808 | $scope.cambioEdit = function(articulo, propiedad) { |
... | ... | @@ -950,10 +955,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
950 | 955 | notaPedido.numeroNotaPedido, 8 |
951 | 956 | ); |
952 | 957 | |
953 | - if (notaPedido.notaPedidoPuntoDescarga) { | |
958 | + if (notaPedido.notaPedidoPuntoDescarga) { | |
954 | 959 | var puntos = []; |
955 | - notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga, idx, arr) { | |
956 | - puntos.push(notaPedidoPuntoDescarga.puntoDescarga); | |
960 | + notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga) { | |
961 | + puntos.push(notaPedidoPuntoDescarga); | |
957 | 962 | }); |
958 | 963 | cabeceras.push({ |
959 | 964 | label: 'Puntos de descarga: ', |
... | ... | @@ -964,7 +969,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
964 | 969 | addArrayCabecera(cabeceras); |
965 | 970 | } |
966 | 971 | |
967 | - function getCabeceraPuntoDescarga(puntoDescarga){ | |
972 | + function getCabeceraPuntoDescarga(puntoDescarga) { | |
968 | 973 | var puntosStamp = ''; |
969 | 974 | puntoDescarga.forEach(function(punto, idx, arr) { |
970 | 975 | puntosStamp += punto.descripcion; |