From b5ded0bffd54424ae3552c858076454d841f473d Mon Sep 17 00:00:00 2001 From: alberto Date: Wed, 8 Feb 2017 20:19:08 +0000 Subject: [PATCH] =?UTF-8?q?Exporta=C3=A7=C3=A3o=20Fiscal=20:=20ECF=20e=20R?= =?UTF-8?q?MD=20(issue=208120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@65754 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../BusquedaExportacaoFiscalController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaExportacaoFiscalController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaExportacaoFiscalController.java index cd8012f7f..da7a24e12 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaExportacaoFiscalController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaExportacaoFiscalController.java @@ -143,6 +143,13 @@ public class BusquedaExportacaoFiscalController extends MyGenericForwardComposer InputStream isFile = new FileInputStream(arquivoTxt); String nomeArquivo = arquivoTxt.getName(); + if (nomeArquivo.contains(".fs")) { + String nome = nomeArquivo.substring(0, nomeArquivo.length() - 3); + String[] parte = nome.split("-"); + + nomeArquivo = parte[0].toString() + ".fs"; + } + Filedownload.save(isFile, contentType, nomeArquivo); if (arquivoTxt != null) {