Commit d26711db8c7cf28c507a32963fa6a3b465230099
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master(efernandez) See merge request !79
Showing
1 changed file
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 | } |
... | ... | @@ -609,11 +614,12 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
609 | 614 | return; |
610 | 615 | } |
611 | 616 | if ($scope.notaPedido.articulosNotaPedido.length !== 0) { |
612 | - focaModalService.confirm('Se perderan los productos ingresados').then(function(data) { | |
613 | - if (data) { | |
614 | - abrirModal(); | |
615 | - } | |
616 | - }); | |
617 | + focaModalService.confirm('Se perderan los productos ingresados') | |
618 | + .then(function(data) { | |
619 | + if (data) { | |
620 | + abrirModal(); | |
621 | + } | |
622 | + }); | |
617 | 623 | } else if (validarNotaRemitada()) { |
618 | 624 | abrirModal(); |
619 | 625 | } |
... | ... | @@ -778,7 +784,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
778 | 784 | $scope.notaPedido.articulosNotaPedido.splice(key, 1); |
779 | 785 | }; |
780 | 786 | |
781 | - $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { | |
787 | + $scope.editarArticulo = function(key, articulo, tmpCantidad, tmpPrecio) { | |
782 | 788 | if (key === 13) { |
783 | 789 | if (!articulo.cantidad || !articulo.precio) { |
784 | 790 | focaModalService.alert('Los valores deben ser al menos 1'); |
... | ... | @@ -796,8 +802,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
796 | 802 | |
797 | 803 | $scope.cancelarEditar = function(articulo) { |
798 | 804 | $scope.tmpCantidad = articulo.cantidad; |
799 | - $scope.tmpPrecio = articulo.precio; | |
800 | - articulo.editCantidad = articulo.editPrecio = false; | |
805 | + $scope.tmpPrecio = articulo.precio; | |
806 | + articulo.editCantidad = articulo.editPrecio = false; | |
801 | 807 | }; |
802 | 808 | |
803 | 809 | $scope.cambioEdit = function(articulo, propiedad) { |
... | ... | @@ -950,10 +956,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
950 | 956 | notaPedido.numeroNotaPedido, 8 |
951 | 957 | ); |
952 | 958 | |
953 | - if (notaPedido.notaPedidoPuntoDescarga) { | |
959 | + if (notaPedido.notaPedidoPuntoDescarga) { | |
954 | 960 | var puntos = []; |
955 | - notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga, idx, arr) { | |
956 | - puntos.push(notaPedidoPuntoDescarga.puntoDescarga); | |
961 | + notaPedido.notaPedidoPuntoDescarga.forEach(function(notaPedidoPuntoDescarga) { | |
962 | + puntos.push(notaPedidoPuntoDescarga); | |
957 | 963 | }); |
958 | 964 | cabeceras.push({ |
959 | 965 | label: 'Puntos de descarga: ', |
... | ... | @@ -964,7 +970,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
964 | 970 | addArrayCabecera(cabeceras); |
965 | 971 | } |
966 | 972 | |
967 | - function getCabeceraPuntoDescarga(puntoDescarga){ | |
973 | + function getCabeceraPuntoDescarga(puntoDescarga) { | |
968 | 974 | var puntosStamp = ''; |
969 | 975 | puntoDescarga.forEach(function(punto, idx, arr) { |
970 | 976 | puntosStamp += punto.descripcion; |