Commit 27d36171660491ef6b50f2645ac68b9186e72fe9

Authored by Ronan Tavares Camargo
2 parents eef21660 212358f3
Exists in master

Merge branch 'adm-1.15.0' of http://ferramentasgo.centralit.com.br:8080/scm/git/…

…cit-grp-almoxarifado into adm-1.15.0
cit-almoxarifado-api/src/main/java/br/com/centralit/api/service/impl/EnderecoEstoqueServiceImpl.java
... ... @@ -139,7 +139,7 @@ public class EnderecoEstoqueServiceImpl extends GenericServiceImpl<EnderecoEstoq
139 139 MaterialLocalEstoque materialLocalEstoque = new MaterialLocalEstoque();
140 140 materialLocalEstoque.setMaterialEstoque(materialEstoque);
141 141 materialLocalEstoque.setEndereco(enderecoEstoque);
142   - materialLocalEstoque.setCapacidade(new BigDecimal("9999999999"));
  142 + materialLocalEstoque.setCapacidade(new BigDecimal("9999"));
143 143 materialLocalEstoque.setLocalPrincipal(Boolean.FALSE);
144 144 this.materialLocalEstoqueService.save(materialLocalEstoque);
145 145 }
... ...
cit-almoxarifado-api/src/main/java/br/com/centralit/api/service/impl/MaterialLocalEstoqueServiceImpl.java
... ... @@ -68,8 +68,10 @@ public class MaterialLocalEstoqueServiceImpl extends GenericServiceImpl<Material
68 68 }else{
69 69 if(entity.getLocalPrincipal()){
70 70 for (MaterialLocalEstoque materialLocalEstoque : locaisParMaterial) {
71   - materialLocalEstoque.setLocalPrincipal(Boolean.FALSE);
72   - this.merge(materialLocalEstoque);
  71 + if(materialLocalEstoque.getId() != entity.getId()){
  72 + materialLocalEstoque.setLocalPrincipal(Boolean.FALSE);
  73 + this.merge(materialLocalEstoque);
  74 + }
73 75 }
74 76 }
75 77 }
... ...