Merge pull request 'fixes bug#AL-4682' (#16) from AL-4682 into master

Reviewed-on: adm/IntegracaoReceitaDespesa#16
Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>
master
Gleison da Cruz 2024-07-31 14:02:33 +00:00
commit 8bb8c1cb0e
3 changed files with 11 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>IntegracaoReceitaDespesa</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
<distributionManagement>
<repository>

View File

@ -81,6 +81,7 @@ public class BGMApplication {
public String executaExportacao(Date dataInicio, Date dataFinal, String diretorio, Integer empresaId, Integer puntoVentaId, Connection con,String pathGravacaoExternaArquivos, boolean incluiTipoPagamentoTurismoBGM, boolean isReceitasDespesasComporte,boolean isCodReceitaFixoBgm, boolean isReceitasDespesasOuroPrata, boolean layoutNovo) throws IllegalArgumentException, IntegracaoReceitaDespesaException{
this.isCodReceitaFixoBgm = isCodReceitaFixoBgm;
this.isReceitasDespesasComporte = isReceitasDespesasComporte;
this.isReceitasDespesasOuroPrata = isReceitasDespesasOuroPrata;
return executaExportacao(dataInicio, dataFinal, diretorio, empresaId, puntoVentaId, con, pathGravacaoExternaArquivos, incluiTipoPagamentoTurismoBGM, layoutNovo);
}

View File

@ -23,6 +23,7 @@ import com.rjconsultores.integracaoreceitadespesa.entidades.DespesaReceitaCompor
import com.rjconsultores.integracaoreceitadespesa.entidades.Empresa;
import com.rjconsultores.integracaoreceitadespesa.entidades.PuntoVenta;
public class Totalbus {
private static final Logger log = LogManager.getLogger(Totalbus.class);
@ -604,6 +605,7 @@ public class Totalbus {
PreparedStatement stmt = null;
ResultSet rs = null;
String formaPagoCieloLinkStr = Integer.toString(formaPagoCieloLink);
Date fecha = fechaParam;
if (fechaParam == null) {
@ -639,7 +641,7 @@ public class Totalbus {
}
despesa.setFormaPagamentoId(rs.getString("formapagoId"));
if( despesa.getFormaPagamentoId().equals("2") || despesa.getFormaPagamentoId().equals("3") || despesa.getFormaPagamentoId().equals(formaPagoCieloLink)) {
if( despesa.getFormaPagamentoId().equals("2") || despesa.getFormaPagamentoId().equals("3") || despesa.getFormaPagamentoId().equals(formaPagoCieloLinkStr)) {
despesa.setCodigoAutorizacao(rs.getString("numautorizacion"));
despesa.setNumeroEstabelecimento(rs.getString("numeroEstabelecimento"));
}else {
@ -817,8 +819,9 @@ public class Totalbus {
PreparedStatement stmt = null;
ResultSet rs = null;
String formaPagoCieloLinkStr = Integer.toString(formaPagoCieloLink);
Date fecha = fechaParam;
if (fechaParam == null) {
fecha = getData();
}
@ -855,9 +858,9 @@ public class Totalbus {
}
receita.setFormaPagamentoId(rs.getString("formapagoId"));
if( receita.getFormaPagamentoId().equals("2") || receita.getFormaPagamentoId().equals("3")) {
if( receita.getFormaPagamentoId().equals("2") || receita.getFormaPagamentoId().equals("3") || receita.getFormaPagamentoId().equals(formaPagoCieloLinkStr)) {
receita.setCodigoAutorizacao(rs.getString("numautorizacion"));
receita.setNumeroEstabelecimento(rs.getString("numeroEstabelecimento"));
receita.setNumeroEstabelecimento(rs.getString("numeroestabelecimento"));
}else {
receita.setCodigoAutorizacao("");
receita.setNumeroEstabelecimento("");
@ -1446,5 +1449,7 @@ public class Totalbus {
}
}
}
}