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.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
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.RenderPtovtaCatInd;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -870,10 +870,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
|
||||
return getString;
|
||||
}
|
||||
|
||||
public void onClick$btnIntegracao(Event ev) throws InterruptedException {
|
||||
|
||||
|
||||
public void onClick$btnGeraTitulos(Event ev) throws InterruptedException {
|
||||
Connection myConn = null;
|
||||
GeradorTitulosIntegracion gerador;
|
||||
try {
|
||||
myConn = dataSource.getConnection();
|
||||
Date dateInicio = fecIntegracion.getValue();
|
||||
|
@ -883,15 +883,46 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
|
||||
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
|
||||
|
||||
StringBuilder sb = TotvsService.integraTitulosPagarReceber(puntoVenta.getPuntoventaId(), myConn, dateInicio,
|
||||
dateFim,checkTodosPuntosVenta.isChecked(), checkSimulaIntegracion.isChecked(),
|
||||
checkDinheiro.isChecked(), checkCredito.isChecked(), checkDebito.isChecked(),
|
||||
checkTF.isChecked(), checkBOL.isChecked());
|
||||
|
||||
if (sb != null){
|
||||
logResult.setText(sb.toString());
|
||||
gerador = new GeradorTitulosIntegracion(myConn, puntoVenta.getPuntoventaId(), dateInicio,
|
||||
dateFim,checkTodosPuntosVenta.isChecked());
|
||||
gerador.execute();
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
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) {
|
||||
log.error("Erro ao integrar",e);
|
||||
|
||||
|
@ -907,13 +938,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
Messagebox.OK, Messagebox.ERROR);
|
||||
|
||||
}finally {
|
||||
if (myConn != null) {
|
||||
try {
|
||||
myConn.close();
|
||||
} catch (SQLException e) {
|
||||
log.error("Erro ao fechar a conexão", e);
|
||||
}
|
||||
}
|
||||
// if (myConn != null) {
|
||||
// try {
|
||||
// myConn.close();
|
||||
// } catch (SQLException e) {
|
||||
// log.error("Erro ao fechar a conexão", e);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -714,7 +714,8 @@ busquedaEmpresaController.btnPesquisa.label = Búsqueda
|
|||
busquedaEmpresaController.lhId.label = ID
|
||||
busquedaEmpresaController.lhDesc.label = Descripción
|
||||
busquedaEmpresaController.txtNombre.label = Empresa
|
||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Executar
|
||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Enviar
|
||||
busquedaEmpresaController.btnGeraTitulos.tooltiptext=Gerar Títulos
|
||||
|
||||
# Pantalla de Edición da empresa
|
||||
editarEmpresaController.window.title = Empresa
|
||||
|
|
|
@ -751,7 +751,8 @@ busquedaEmpresaController.btnPesquisa.label = Pesquisa
|
|||
busquedaEmpresaController.lhId.label = ID
|
||||
busquedaEmpresaController.lhDesc.label = Descrição
|
||||
busquedaEmpresaController.txtNombre.label = Empresa
|
||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Executar
|
||||
busquedaEmpresaController.btnIntegracao.tooltiptext=Enviar
|
||||
busquedaEmpresaController.btnGeraTitulos.tooltiptext=Gerar Títulos
|
||||
|
||||
# Pantalla de Edición da empresa
|
||||
editarEmpresaController.window.title = Empresa
|
||||
|
|
|
@ -1425,8 +1425,11 @@
|
|||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px"
|
||||
align="right">
|
||||
<button id="btnGeraTitulos"
|
||||
height="20" label="${c:l('busquedaEmpresaController.btnGeraTitulos.tooltiptext')}"
|
||||
tooltiptext="${c:l('busquedaEmpresaController.btnGeraTitulos.tooltiptext')}" />
|
||||
<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')}" />
|
||||
</hbox>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
|
|
Loading…
Reference in New Issue