From 54be3c9d24221759ee33b1944e0a8a21c5bff891 Mon Sep 17 00:00:00 2001 From: valdir Date: Thu, 19 Sep 2019 13:09:29 +0000 Subject: [PATCH] 0015634: Comporte - (GLPI - 14962) Erro redutor de base ICMS bug#15634 dev:alberto qua:wallysson git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@97710 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../EditarEmpresaImpostoController.java | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarEmpresaImpostoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarEmpresaImpostoController.java index 14ad8ddae..b01a8f7a0 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarEmpresaImpostoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarEmpresaImpostoController.java @@ -4,6 +4,8 @@ */ package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos; +import java.math.BigDecimal; + import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; @@ -76,7 +78,9 @@ public class EditarEmpresaImpostoController extends MyGenericForwardComposer { empresaImposto.setIndTribEmissao(radTribEmissao.isChecked()); empresaImposto.setIndTribViagem(radTribViagem.isChecked()); - + + setarValoreZero(); + empresaImpostoService.actualizacion(this.empresaImposto); Messagebox.show( Labels.getLabel("editarEmpresaImpostoController.window.sucessoSalvar"), @@ -95,6 +99,51 @@ public class EditarEmpresaImpostoController extends MyGenericForwardComposer { } } + private void setarValoreZero() { + if(empresaImposto.getPorCredMunicipal() == null) { + empresaImposto.setPorCredMunicipal(BigDecimal.ZERO); + } + + if(empresaImposto.getPorCredEstadual() == null) { + empresaImposto.setPorCredEstadual(BigDecimal.ZERO); + } + + if(empresaImposto.getPorCredBaseIcms() == null) { + empresaImposto.setPorCredBaseIcms(BigDecimal.ZERO); + } + + if(empresaImposto.getPorcRedBaseIcmsIM() == null) { + empresaImposto.setPorcRedBaseIcmsIM(BigDecimal.ZERO); + } + + if(empresaImposto.getPorctributo() == null) { + empresaImposto.setPorctributo(BigDecimal.ZERO); + } + + if(empresaImposto.getIcms() == null) { + empresaImposto.setIcms(BigDecimal.ZERO); + } + if(empresaImposto.getIcmsMatricial() == null) { + empresaImposto.setIcmsMatricial(BigDecimal.ZERO); + } + + if(empresaImposto.getIndiceICMSIntermunicipal() == null) { + empresaImposto.setIndiceICMSIntermunicipal(BigDecimal.ZERO); + } + + if(empresaImposto.getIcmsIntermunicipal() == null) { + empresaImposto.setIcmsIntermunicipal(BigDecimal.ZERO); + } + + if(empresaImposto.getIcmsIntermunicipalMatricial() == null) { + empresaImposto.setIcmsIntermunicipalMatricial(BigDecimal.ZERO); + } + + if(empresaImposto.getIcmsIntermunicipalMatricial() == null) { + empresaImposto.setIcmsIntermunicipalMatricial(BigDecimal.ZERO); + } + } + public void onClick$btnEmpresaImpostoApagar(Event ev) { try { int resp = Messagebox.show(