From e0f278879d5f77c330ecc69c186d7df9462e8486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aristides=20dos=20Reis=20J=C3=BAnior?= Date: Mon, 5 Aug 2024 17:43:53 -0300 Subject: [PATCH 1/2] fixes bug#AL-4688 --- pom.xml | 2 +- .../EditarConvenioController.java | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b41a25fc..a872ba045 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores ventaboletosadm - 1.118.3 + 1.118.4 war diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConvenioController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConvenioController.java index a4db372f9..cd4990cbc 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConvenioController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConvenioController.java @@ -1458,6 +1458,43 @@ public class EditarConvenioController extends MyGenericForwardComposer { } } + public void onClick$btnAdicionarPuntoVenta(Event ev) throws InterruptedException { + if (cmbPuntoVenta.getSelectedItem() != null) { + PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); + + ConvenioPuntoVenta convenioPuntoVentaToAdd = new ConvenioPuntoVenta(); + convenioPuntoVentaToAdd.setActivo(Boolean.TRUE); + convenioPuntoVentaToAdd.setConvenio(convenio); + convenioPuntoVentaToAdd.setFecmodif(Calendar.getInstance().getTime()); + convenioPuntoVentaToAdd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + convenioPuntoVentaToAdd.setPuntoVenta(puntoVenta); + + boolean achou = Boolean.FALSE; + for (ConvenioPuntoVenta convenioPuntoVentaInTheList : lsConvenioPuntoVenta) { + if (convenioPuntoVentaInTheList.getPuntoVenta().equals(convenioPuntoVentaToAdd.getPuntoVenta()) && convenioPuntoVentaInTheList.getActivo()) { + achou = Boolean.TRUE; + } + } + + if(!achou) { + lsConvenioPuntoVenta.add(convenioPuntoVentaToAdd); + convenio.setConvenioPuntoVentaList(lsConvenioPuntoVenta); + } + + List tempList = new ArrayList(); + if(lsConvenioPuntoVenta != null) { + for (ConvenioPuntoVenta convenioPuntoVenta : lsConvenioPuntoVenta) { + if(convenioPuntoVenta.getActivo()) { + tempList.add(convenioPuntoVenta); + } + } + } + + convenioPuntoVentaList.setData(tempList); + cmbPuntoVenta.setSelectedItem(null); + } + } + public void onClick$btnRemoverPuntoVenta(Event ev) { try { ConvenioPuntoVenta convenioPuntoVentaToRemove = (ConvenioPuntoVenta) convenioPuntoVentaList.getSelected(); From 7251f2d6a67b394f669cc2f2042ccfc0aa65c88d Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Mon, 5 Aug 2024 14:46:42 -0600 Subject: [PATCH 2/2] Fixes bug#AL-4549 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b41a25fc..a872ba045 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores ventaboletosadm - 1.118.3 + 1.118.4 war