bug #6445
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@45994 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f143b02ffb
commit
8daa9f51e3
|
@ -15,7 +15,6 @@ import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -134,7 +133,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderParadaPtoVtaChe
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtoVtaSeguro;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtoVtaSeguro;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtovtaCatInd;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtovtaCatInd;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtovtaComissao;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtovtaComissao;
|
||||||
import com.rjconsultores.ws.totvs.service.TotvsService;
|
import com.rjconsultores.ws.totvs.service.GeradorTitulosIntegracion;
|
||||||
|
import com.rjconsultores.ws.totvs.service.GerenciadorEnvioTitulosWS;
|
||||||
import com.rjconsultores.ws.utileria.RetornoTotvs.TipoRetorno;
|
import com.rjconsultores.ws.utileria.RetornoTotvs.TipoRetorno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -870,10 +870,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
return getString;
|
return getString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnIntegracao(Event ev) throws InterruptedException {
|
public void onClick$btnGeraTitulos(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
Connection myConn = null;
|
Connection myConn = null;
|
||||||
|
GeradorTitulosIntegracion gerador;
|
||||||
try {
|
try {
|
||||||
myConn = dataSource.getConnection();
|
myConn = dataSource.getConnection();
|
||||||
Date dateInicio = fecIntegracion.getValue();
|
Date dateInicio = fecIntegracion.getValue();
|
||||||
|
@ -883,15 +883,46 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
|
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
|
||||||
|
|
||||||
StringBuilder sb = TotvsService.integraTitulosPagarReceber(puntoVenta.getPuntoventaId(), myConn, dateInicio,
|
gerador = new GeradorTitulosIntegracion(myConn, puntoVenta.getPuntoventaId(), dateInicio,
|
||||||
dateFim,checkTodosPuntosVenta.isChecked(), checkSimulaIntegracion.isChecked(),
|
dateFim,checkTodosPuntosVenta.isChecked());
|
||||||
checkDinheiro.isChecked(), checkCredito.isChecked(), checkDebito.isChecked(),
|
gerador.execute();
|
||||||
checkTF.isChecked(), checkBOL.isChecked());
|
|
||||||
|
|
||||||
if (sb != null){
|
} catch (Exception e) {
|
||||||
logResult.setText(sb.toString());
|
log.error("Erro ao integrar",e);
|
||||||
|
|
||||||
|
if (e instanceof WrongValueException) {
|
||||||
|
throw (WrongValueException) e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.error("", e);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
e.getMessage(),
|
||||||
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnIntegracao(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
|
Connection myConn = null;
|
||||||
|
GeradorTitulosIntegracion gerador;
|
||||||
|
try {
|
||||||
|
myConn = dataSource.getConnection();
|
||||||
|
Date dateInicio = fecIntegracion.getValue();
|
||||||
|
|
||||||
|
dateInicio = DateUtil.inicioFecha(dateInicio);
|
||||||
|
Date dateFim = DateUtil.fimFecha(fecIntegracion.getValue());
|
||||||
|
|
||||||
|
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
|
||||||
|
|
||||||
|
GerenciadorEnvioTitulosWS gerenciadorWS = new GerenciadorEnvioTitulosWS(myConn, checkDinheiro.isChecked(),
|
||||||
|
checkCredito.isChecked(), checkDebito.isChecked(), checkTF.isChecked(), checkBOL.isChecked(),
|
||||||
|
checkSimulaIntegracion.isChecked());
|
||||||
|
gerenciadorWS.execute();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Erro ao integrar",e);
|
log.error("Erro ao integrar",e);
|
||||||
|
|
||||||
|
@ -907,13 +938,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.ERROR);
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
|
||||||
}finally {
|
}finally {
|
||||||
if (myConn != null) {
|
// if (myConn != null) {
|
||||||
try {
|
// try {
|
||||||
myConn.close();
|
// myConn.close();
|
||||||
} catch (SQLException e) {
|
// } catch (SQLException e) {
|
||||||
log.error("Erro ao fechar a conexão", e);
|
// log.error("Erro ao fechar a conexão", e);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -714,7 +714,8 @@ busquedaEmpresaController.btnPesquisa.label = Búsqueda
|
||||||
busquedaEmpresaController.lhId.label = ID
|
busquedaEmpresaController.lhId.label = ID
|
||||||
busquedaEmpresaController.lhDesc.label = Descripción
|
busquedaEmpresaController.lhDesc.label = Descripción
|
||||||
busquedaEmpresaController.txtNombre.label = Empresa
|
busquedaEmpresaController.txtNombre.label = Empresa
|
||||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Executar
|
busquedaEmpresaController.btnIntegracao.tooltiptext=Enviar
|
||||||
|
busquedaEmpresaController.btnGeraTitulos.tooltiptext=Gerar Títulos
|
||||||
|
|
||||||
# Pantalla de Edición da empresa
|
# Pantalla de Edición da empresa
|
||||||
editarEmpresaController.window.title = Empresa
|
editarEmpresaController.window.title = Empresa
|
||||||
|
|
|
@ -751,7 +751,8 @@ busquedaEmpresaController.btnPesquisa.label = Pesquisa
|
||||||
busquedaEmpresaController.lhId.label = ID
|
busquedaEmpresaController.lhId.label = ID
|
||||||
busquedaEmpresaController.lhDesc.label = Descrição
|
busquedaEmpresaController.lhDesc.label = Descrição
|
||||||
busquedaEmpresaController.txtNombre.label = Empresa
|
busquedaEmpresaController.txtNombre.label = Empresa
|
||||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Executar
|
busquedaEmpresaController.btnIntegracao.tooltiptext=Enviar
|
||||||
|
busquedaEmpresaController.btnGeraTitulos.tooltiptext=Gerar Títulos
|
||||||
|
|
||||||
# Pantalla de Edición da empresa
|
# Pantalla de Edición da empresa
|
||||||
editarEmpresaController.window.title = Empresa
|
editarEmpresaController.window.title = Empresa
|
||||||
|
|
|
@ -1425,8 +1425,11 @@
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<hbox spacing="5px" style="padding:1px"
|
<hbox spacing="5px" style="padding:1px"
|
||||||
align="right">
|
align="right">
|
||||||
|
<button id="btnGeraTitulos"
|
||||||
|
height="20" label="${c:l('busquedaEmpresaController.btnGeraTitulos.tooltiptext')}"
|
||||||
|
tooltiptext="${c:l('busquedaEmpresaController.btnGeraTitulos.tooltiptext')}" />
|
||||||
<button id="btnIntegracao"
|
<button id="btnIntegracao"
|
||||||
height="20" image="/gui/img/icon-active.gif" width="35px"
|
height="20" label="${c:l('busquedaEmpresaController.btnIntegracao.tooltiptext')}"
|
||||||
tooltiptext="${c:l('busquedaEmpresaController.btnIntegracao.tooltiptext')}" />
|
tooltiptext="${c:l('busquedaEmpresaController.btnIntegracao.tooltiptext')}" />
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
|
Loading…
Reference in New Issue