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> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId> <artifactId>ventaboletosadm</artifactId>
<version>1.0.52</version> <version>1.0.53</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>

View File

@ -634,15 +634,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
lsUsuarioBancario = usuarioBancarioService.obtenerTodos(); lsUsuarioBancario = usuarioBancarioService.obtenerTodos();
lsLogFiles = getLogFiles(); lsLogFiles = getLogFiles();
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta"); puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
lsTodasCobrancas = cobrancaAdcService.buscarTodasAsCobrancas(puntoVenta); lsTodasCobrancas = cobrancaAdcService.buscarTodasAsCobrancas(puntoVenta);
lsOrgaoConcedentes = orgaoConcedenteService.obtenerTodos(); lsOrgaoConcedentes = orgaoConcedenteService.obtenerTodos();
super.doAfterCompose(comp); super.doAfterCompose(comp);
if(puntoVenta.getIndBloqueiaTipoPassagem()) { if(puntoVenta.getIndBloqueiaTipoPassagem()) {
radIndBloquear.setSelected(Boolean.TRUE); radIndBloquear.setSelected(Boolean.TRUE);
}else { }else {
@ -657,9 +653,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
} }
}); });
inserirItensLista(lsCategoriaBloquear); inserirItensLista(lsCategoriaBloquear);
getTxtTaxaConvenienciaPorc().setConstraint(getCt()); getTxtTaxaConvenienciaPorc().setConstraint(getCt());
@ -746,6 +739,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
if (puntoVenta.getPuntoventaId() != null) { if (puntoVenta.getPuntoventaId() != null) {
puntoVenta = puntoVentaService.obtenerID(puntoVenta.getPuntoventaId()); 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); lsEmpresaComissao = empresaService.buscarNotInPuntoVtaComissao(puntoVenta);
lsPtovtaComissao = ptovtaComissaoService.buscarByPuntaVenta(puntoVenta); lsPtovtaComissao = ptovtaComissaoService.buscarByPuntaVenta(puntoVenta);
@ -771,15 +774,25 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
if (puntoVenta.getNumfax() != null) { if (puntoVenta.getNumfax() != null) {
txtNumFax.setValue(puntoVenta.getNumfax()); txtNumFax.setValue(puntoVenta.getNumfax());
} }
try {
if (puntoVenta.getNumtelefonouno() != null) { if (puntoVenta.getNumtelefonouno() != null) {
numtelefonouno.setValue(puntoVenta.getNumtelefonouno()); numtelefonouno.setValue(puntoVenta.getNumtelefonouno());
} }
if (puntoVenta.getNumtelefonodos() != null) { if (puntoVenta.getNumtelefonodos() != null) {
numtelefonodos.setValue(puntoVenta.getNumtelefonodos()); 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) { if (puntoVenta.getNumDoCPuntoVenta() != null) {
txtNumDoCPuntoVenta.setValue(puntoVenta.getNumDoCPuntoVenta()); txtNumDoCPuntoVenta.setValue(puntoVenta.getNumDoCPuntoVenta());
} }
if (puntoVenta.getRazonSocial() != null) { if (puntoVenta.getRazonSocial() != null) {
txtRazonSocial.setValue(puntoVenta.getRazonSocial()); txtRazonSocial.setValue(puntoVenta.getRazonSocial());
} }
@ -1059,7 +1072,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
empresaContaBancariaList.setMultiple(true); empresaContaBancariaList.setMultiple(true);
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0)); empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
} catch (Exception e) { } catch (Exception e) {
log.error("Punto de Venta: ", e); log.error("Punto de Venta: ", e);
Messagebox.show( Messagebox.show(