From f24338587b0c145275036903dd79e07b90d9ccbc Mon Sep 17 00:00:00 2001 From: joyfas.silva Date: Wed, 11 May 2016 14:04:42 -0300 Subject: [PATCH] {Redmine tarefa-3943} --- cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 0 deletions(-) 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