Commit d42cb1f810a131513b17b73924c78a5ead9967d6
1 parent
6add83e49c
Exists in
master
boton observaciones
Showing
2 changed files
with
22 additions
and
0 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -196,6 +196,7 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 196 | 196 | $scope.remito.id = 0; |
| 197 | 197 | $scope.remito.moneda = notaPedido.cotizacion.moneda; |
| 198 | 198 | $scope.plazosPagos = notaPedido.notaPedidoPlazo; |
| 199 | + enableObservaciones(notaPedido.observaciones ? true : false); | |
| 199 | 200 | addArrayCabecera(cabeceras); |
| 200 | 201 | |
| 201 | 202 | }, function() { |
| ... | ... | @@ -770,6 +771,14 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 770 | 771 | } |
| 771 | 772 | }; |
| 772 | 773 | |
| 774 | + $scope.seleccionarObservaciones = function() { | |
| 775 | + focaModalService | |
| 776 | + .prompt('Ingrese observaciones', $scope.remito.observaciones, true) | |
| 777 | + .then(function(observaciones) { | |
| 778 | + $scope.remito.observaciones = observaciones; | |
| 779 | + }); | |
| 780 | + }; | |
| 781 | + | |
| 773 | 782 | $scope.abrirModalCotizacion = function(moneda) { |
| 774 | 783 | var modalInstance = $uibModal.open( |
| 775 | 784 | { |
| ... | ... | @@ -945,5 +954,13 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 945 | 954 | $location.path('/'); |
| 946 | 955 | } |
| 947 | 956 | } |
| 957 | + | |
| 958 | + function enableObservaciones(val) { | |
| 959 | + var boton = $scope.botonera.filter(function(botonObs) { | |
| 960 | + return botonObs.label === 'Observaciones'; | |
| 961 | + }); | |
| 962 | + | |
| 963 | + boton[0].disable = !val; | |
| 964 | + } | |
| 948 | 965 | } |
| 949 | 966 | ]); |
src/js/service.js