diff --git a/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js b/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js index 74b4847..9e71d64 100644 --- a/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js +++ b/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js @@ -1130,5 +1130,27 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS')); } }; + + $scope.alternaTipoNumericoUnidadeMedida = function(){ + $scope.entradaItem.$quantidadeEntrada = ''; + $timeout(function(){ + if($scope.entradaItem.unidadeMedidaEntrada && $scope.entradaItem.unidadeMedidaEntrada.tipoNumerico){ + switch($scope.entradaItem.unidadeMedidaEntrada.tipoNumerico.codigo){ + case 1: + $scope.showInteiro= true; + $scope.showDecimal = false; + break; + + case 2: + $scope.showDecimal = true; + $scope.showInteiro= false; + break; + } + }else{ + $scope.showInteiro= false; + $scope.showDecimal = false; + } + }); + }; }]); -- libgit2 0.21.2