Totvs - WS Fornecedor / WS Cliente / WS Pedido Compra (fixes bug #6127)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@43048 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
851b6786c2
commit
0af7419a69
|
@ -101,6 +101,7 @@ import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
|||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
|
||||
import com.rjconsultores.ventaboletos.service.UsuarioService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.FechamentoParamptovtaListItemRenderer;
|
||||
|
@ -307,6 +308,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private Checkbox ckIsento;
|
||||
private MyTextbox txtNumIEPuntoVenta;
|
||||
private Datebox fecIntegracion;
|
||||
private boolean integracionTotvs;
|
||||
|
||||
public static final int INTERVALO_FECHAMENTO_SEMANAL = 7;
|
||||
public static final int INTERVALO_FECHAMENTO_DECENDIAL = 10;
|
||||
|
@ -793,52 +795,50 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
public void onClick$btnIntegracao(Event ev) throws InterruptedException {
|
||||
|
||||
|
||||
Connection myConn = null;
|
||||
|
||||
|
||||
try {
|
||||
myConn = dataSource.getConnection();
|
||||
myConn.setAutoCommit(false);
|
||||
|
||||
|
||||
Date dateInicio = fecIntegracion.getValue();
|
||||
|
||||
|
||||
dateInicio = DateUtil.inicioFecha(dateInicio);
|
||||
Date dateFim = DateUtil.fimFecha(fecIntegracion.getValue());
|
||||
|
||||
log.info("puntoVentaId="+puntoVenta.getPuntoventaId()+";fecInicio="+dateInicio+";fecFin="+dateFim);
|
||||
|
||||
|
||||
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
|
||||
|
||||
TotvsService.cadastrarTituloAReceber(puntoVenta.getPuntoventaId(), dateInicio, dateFim, myConn);
|
||||
|
||||
|
||||
myConn.commit();
|
||||
} catch (Exception e) {
|
||||
|
||||
if (myConn != null) {
|
||||
|
||||
if (myConn != null) {
|
||||
try {
|
||||
myConn.rollback();
|
||||
} catch (SQLException e1) {
|
||||
log.error("Erro rollback",e1);
|
||||
log.error("Erro rollback", e1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (e instanceof WrongValueException){
|
||||
throw (WrongValueException)e;
|
||||
|
||||
if (e instanceof WrongValueException) {
|
||||
throw (WrongValueException) e;
|
||||
}
|
||||
|
||||
|
||||
log.error("", e);
|
||||
|
||||
|
||||
|
||||
Messagebox.show(
|
||||
e.getMessage(),
|
||||
Labels.getLabel("editarPuntoVentaController.window.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
|
||||
}finally{
|
||||
if (myConn != null){
|
||||
|
||||
} finally {
|
||||
if (myConn != null) {
|
||||
try {
|
||||
myConn.close();
|
||||
} catch (SQLException e) {
|
||||
log.error("Erro ao fechar a conexão",e);
|
||||
log.error("Erro ao fechar a conexão", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2530,4 +2530,15 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
this.radTotvsErro = radTotvsErro;
|
||||
}
|
||||
|
||||
public boolean isIntegracionTotvs() {
|
||||
integracionTotvs = false;
|
||||
if (ApplicationProperties.getInstance().integracionTotvs()) {
|
||||
integracionTotvs = true;
|
||||
}
|
||||
return integracionTotvs;
|
||||
}
|
||||
|
||||
public void setIntegracionTotvs(boolean integracionTotvs) {
|
||||
this.integracionTotvs = integracionTotvs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,9 +94,9 @@
|
|||
maxlength="10" constraint="no empty"
|
||||
value="@{winEditarPuntoVenta$composer.puntoVenta.numPuntoVenta}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<!-- Integracion TOTVS -->
|
||||
|
||||
<!-- Integracion TOTVS -->
|
||||
<row visible="@{winEditarPuntoVenta$composer.integracionTotvs}">
|
||||
<label
|
||||
value="${c:l('editarPuntoVentaController.label.totvs')}" />
|
||||
<radiogroup Id="indIntegracion" >
|
||||
|
|
Loading…
Reference in New Issue