fixes bug#AL-2164

master
Fabio Faria 2023-02-08 17:19:11 -03:00
parent d6962c18c9
commit efea4838c2
2 changed files with 30 additions and 18 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.0.52</version>
<version>1.0.53</version>
<packaging>war</packaging>
<properties>

View File

@ -634,14 +634,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
lsUsuarioBancario = usuarioBancarioService.obtenerTodos();
lsLogFiles = getLogFiles();
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
lsTodasCobrancas = cobrancaAdcService.buscarTodasAsCobrancas(puntoVenta);
lsTodasCobrancas = cobrancaAdcService.buscarTodasAsCobrancas(puntoVenta);
lsOrgaoConcedentes = orgaoConcedenteService.obtenerTodos();
super.doAfterCompose(comp);
super.doAfterCompose(comp);
if(puntoVenta.getIndBloqueiaTipoPassagem()) {
radIndBloquear.setSelected(Boolean.TRUE);
@ -657,9 +653,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
});
inserirItensLista(lsCategoriaBloquear);
getTxtTaxaConvenienciaPorc().setConstraint(getCt());
@ -746,6 +739,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
if (puntoVenta.getPuntoventaId() != null) {
puntoVenta = puntoVentaService.obtenerID(puntoVenta.getPuntoventaId());
//chamadas de inicialização para evitar LazyInitializationException
puntoVenta.getLsFormaPagoDet().size();
puntoVenta.getLsParamRecoleccion().size();
puntoVenta.getLsPtovtaEmpresa().size();
puntoVenta.getPtovtaAntecipacomissaoList().size();
puntoVenta.getPtovtaEstoqueList().size();
puntoVenta.getPtovtaHorarioList().size();
puntoVenta.getLsPtovtaUsuarioBancario().size();
lsEmpresaComissao = empresaService.buscarNotInPuntoVtaComissao(puntoVenta);
lsPtovtaComissao = ptovtaComissaoService.buscarByPuntaVenta(puntoVenta);
@ -771,15 +774,25 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
if (puntoVenta.getNumfax() != null) {
txtNumFax.setValue(puntoVenta.getNumfax());
}
if (puntoVenta.getNumtelefonouno() != null) {
numtelefonouno.setValue(puntoVenta.getNumtelefonouno());
}
if (puntoVenta.getNumtelefonodos() != null) {
numtelefonodos.setValue(puntoVenta.getNumtelefonodos());
try {
if (puntoVenta.getNumtelefonouno() != null) {
numtelefonouno.setValue(puntoVenta.getNumtelefonouno());
}
if (puntoVenta.getNumtelefonodos() != null) {
numtelefonodos.setValue(puntoVenta.getNumtelefonodos());
}
}catch (WrongValueException e) {
Messagebox.show("Telefone fora do padrão",
Labels.getLabel("editarEmpresaController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (puntoVenta.getNumDoCPuntoVenta() != null) {
txtNumDoCPuntoVenta.setValue(puntoVenta.getNumDoCPuntoVenta());
}
if (puntoVenta.getRazonSocial() != null) {
txtRazonSocial.setValue(puntoVenta.getRazonSocial());
}
@ -985,13 +998,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVenta.setTitularId(new PtovtaTitular());
}
}
formaPagoList.setItemRenderer(new FormaPagoDetRender());
if (puntoVenta.getLsFormaPagoDet() == null) {
puntoVenta.setLsFormaPagoDet(new ArrayList<FormaPagoDet>());
}
lsFormaPagoDet = puntoVenta.getLsFormaPagoDet();
formaPagoList.setData(lsFormaPagoDet);
formaPagoList.setData(lsFormaPagoDet);
paramRecoleccionList.setItemRenderer(new ParamRecoleccionRender());
if (puntoVenta.getLsParamRecoleccion() == null) {
@ -1059,7 +1072,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
empresaContaBancariaList.setMultiple(true);
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
} catch (Exception e) {
log.error("Punto de Venta: ", e);
Messagebox.show(