13869: Integração AG

bug#13869
dev:leo
qua:leo

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@91250 d1611594-4594-4d17-8e1d-87c2c4800839
master
leonardo 2019-03-27 15:07:46 +00:00
parent dd12abeb7f
commit bdd897ea93
1 changed files with 14 additions and 2 deletions

View File

@ -1259,8 +1259,20 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
GeradorTitulosAG gerador = new GeradorTitulosAG(myConn, dateInicio, dateFim);
log.info("puntoVentaId=" + puntoVenta.getPuntoventaId() + ";fecInicio=" + dateInicio + ";fecFin=" + dateFim);
if (checkTodosPuntosVenta.isChecked()){
gerador.execute(checkAdiantamentoAG.isChecked(), checkBoletoAG.isChecked(), checkCartaoAG.isChecked(), checkDepositoAG.isChecked(), false);
} else {
if (puntoVenta.getLsPtovtaEmpresa() != null && !puntoVenta.getLsPtovtaEmpresa().isEmpty()){
for (PtovtaEmpresa pte : puntoVenta.getLsPtovtaEmpresa()){
gerador.setEmpresaId(pte.getEmpresa().getEmpresaId());
gerador.execute(puntoVenta.getPuntoventaId(), checkAdiantamentoAG.isChecked(), checkBoletoAG.isChecked(), checkCartaoAG.isChecked(), checkDepositoAG.isChecked(), false);
}
} else {
gerador.setEmpresaId(puntoVenta.getEmpresa().getEmpresaId());
gerador.execute(puntoVenta.getPuntoventaId(), checkAdiantamentoAG.isChecked(), checkBoletoAG.isChecked(), checkCartaoAG.isChecked(), checkDepositoAG.isChecked(), false);
}
}
} catch (Exception e) {
log.error("Erro ao integrar", e);