gleimar 2015-04-30 23:52:17 +00:00
parent 76a85c8a28
commit a8e0007c29
1 changed files with 75 additions and 70 deletions

View File

@ -75,6 +75,7 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
entidad.setActivo(Boolean.TRUE);
Exception respEx = null;
if (ApplicationProperties.getInstance().integracionTotvs()) {
try {
if (entidad.getIndIntegracion() == TipoRetorno.PENDENTE.getValor()
|| entidad.getIndIntegracion() == TipoRetorno.ERRO.getValor()) {
@ -112,7 +113,7 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
log.error(Atributos.MSG_ERRO_GENERICA, e);
respEx = new IntegracionException(Atributos.MSG_ERRO_GENERICA + e.getMessage());
}
}
entidad = puntoVentaDAO.suscribir(entidad);
if (respEx != null) {
@ -133,6 +134,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
entidad.setActivo(Boolean.TRUE);
Exception respEx = null;
if (ApplicationProperties.getInstance().integracionTotvs()) {
try {
if (entidad.getIndIntegracion() == TipoRetorno.PENDENTE.getValor()
|| entidad.getIndIntegracion() == TipoRetorno.ERRO.getValor()) {
@ -170,6 +174,7 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
log.error(Atributos.MSG_ERRO_GENERICA, e);
respEx = new IntegracionException(Atributos.MSG_ERRO_GENERICA + e.getMessage());
}
}
entidad = puntoVentaDAO.actualizacion(entidad);