diff --git a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java index 1387e0e9f..3e87a877e 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java @@ -153,8 +153,14 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { log.debug("iniciando integração com AG"); integrarClienteAG(entidad); + if (!entidad.getIndIntegradoAG()){ + throw new IntegracionException(entidad.getMotivoNaoIntegradoAG()); + } integrarFornecedorAG(entidad); log.debug("fim da integração com AG"); + if (!entidad.getIndIntegradoAG()){ + throw new IntegracionException(entidad.getMotivoNaoIntegradoAG()); + } return entidad; } @@ -380,7 +386,13 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { log.debug("iniciando integração com AG"); integrarClienteAG(entidad); + if (!entidad.getIndIntegradoAG()){ + throw new IntegracionException(entidad.getMotivoNaoIntegradoAG()); + } integrarFornecedorAG(entidad); + if (!entidad.getIndIntegradoAG()){ + throw new IntegracionException(entidad.getMotivoNaoIntegradoAG()); + } log.debug("fim da integração com AG"); if (respEx != null) {