From 79f914c53a5dcae0a0517f3664b62d5f2e51c8b0 Mon Sep 17 00:00:00 2001 From: fabio Date: Fri, 21 May 2021 20:11:05 +0000 Subject: [PATCH] fixes bug#22020 dev: Valdir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@106817 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../EditarFechamentoParamgeralController.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java index 6f3624068..dc7cd3178 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java @@ -147,7 +147,7 @@ public class EditarFechamentoParamgeralController extends MyGenericForwardCompos } public void onClick$btnSalvar() { - final Integer CARTEIRA_BRADESCO = 99; + final Integer CARTEIRA_BRADESCO = 99; String bancoSelecionado = null; try { @@ -185,13 +185,19 @@ public class EditarFechamentoParamgeralController extends MyGenericForwardCompos getFechamentoParamgeral().setBoletoBancoConta(txtBoletoBancoConta.getText()); getFechamentoParamgeral().setBoletoBancoContaDigito(txtBoletoBancoContaDigito.getText()); getFechamentoParamgeral().setBoletoDiasVenc(Integer.valueOf(txtBoletoDiasVenc.getText())); - getFechamentoParamgeral().setBoletoJuros(new BigDecimal(txtBoletoJuros.getText().replace(",", "."))); - getFechamentoParamgeral().setBoletoMulta(new BigDecimal(txtBoletoMulta.getText().replace(",", "."))); getFechamentoParamgeral().setBoletoBancoInstrucao(txtBoletoBancoInstrucao.getText()); getFechamentoParamgeral().setBoletoBancoInstrucao2(txtBoletoBancoInstrucao2.getText()); getFechamentoParamgeral().setBoletoBancoInstrucao3(txtBoletoBancoInstrucao3.getText()); getFechamentoParamgeral().setBoletoBancoInstrucaoSacado(txtBoletoBancoInstrucaoSacado.getText()); + if(! txtBoletoJuros.getText().trim().isEmpty()) { + getFechamentoParamgeral().setBoletoJuros(new BigDecimal(txtBoletoJuros.getText().replace(",", "."))); + } + + if(! txtBoletoMulta.getText().trim().isEmpty()) { + getFechamentoParamgeral().setBoletoMulta(new BigDecimal(txtBoletoMulta.getText().replace(",", "."))); + } + if(cmbEmpresa.getSelectedItem() != null) { getFechamentoParamgeral().setEmpresa((Empresa) cmbEmpresa.getSelectedItem().getValue()); } @@ -214,7 +220,7 @@ public class EditarFechamentoParamgeralController extends MyGenericForwardCompos closeWindow(); } catch (Exception ex) { log.info(ex.getLocalizedMessage()); - Clients.alert(ex.getLocalizedMessage(), + Clients.alert(ex.getLocalizedMessage()!=null?ex.getLocalizedMessage():ex.getCause().getLocalizedMessage(), Labels.getLabel("editarFechamentoParamgeralController.window.title"), Messagebox.INFORMATION); } }