Commit f24338587b0c145275036903dd79e07b90d9ccbc

Authored by joyfas.silva
1 parent b80ffcb9
Exists in master

{Redmine tarefa-3943}

cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js
... ... @@ -1130,5 +1130,27 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp
1130 1130 $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'));
1131 1131 }
1132 1132 };
  1133 +
  1134 + $scope.alternaTipoNumericoUnidadeMedida = function(){
  1135 + $scope.entradaItem.$quantidadeEntrada = '';
  1136 + $timeout(function(){
  1137 + if($scope.entradaItem.unidadeMedidaEntrada && $scope.entradaItem.unidadeMedidaEntrada.tipoNumerico){
  1138 + switch($scope.entradaItem.unidadeMedidaEntrada.tipoNumerico.codigo){
  1139 + case 1:
  1140 + $scope.showInteiro= true;
  1141 + $scope.showDecimal = false;
  1142 + break;
  1143 +
  1144 + case 2:
  1145 + $scope.showDecimal = true;
  1146 + $scope.showInteiro= false;
  1147 + break;
  1148 + }
  1149 + }else{
  1150 + $scope.showInteiro= false;
  1151 + $scope.showDecimal = false;
  1152 + }
  1153 + });
  1154 + };
1133 1155  
1134 1156 }]);
... ...