diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/pricing/EditarPricingController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/pricing/EditarPricingController.java index 90f51a607..e07479b04 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/pricing/EditarPricingController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/pricing/EditarPricingController.java @@ -4,6 +4,7 @@ */ package com.rjconsultores.ventaboletos.web.gui.controladores.pricing; +import com.rjconsultores.ventaboletos.entidad.Categoria; import com.rjconsultores.ventaboletos.entidad.ClaseServicio; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Marca; @@ -27,11 +28,13 @@ import com.rjconsultores.ventaboletos.entidad.PricingVigencia; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.Ruta; import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta; +import com.rjconsultores.ventaboletos.service.CategoriaService; import com.rjconsultores.ventaboletos.service.ClaseServicioService; import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.PricingAnticipacionService; +import com.rjconsultores.ventaboletos.service.PricingCategoriaService; import com.rjconsultores.ventaboletos.service.PricingClaseService; import com.rjconsultores.ventaboletos.service.PricingImporteService; import com.rjconsultores.ventaboletos.service.PricingMarcaService; @@ -108,6 +111,8 @@ public class EditarPricingController extends MyGenericForwardComposer { @Autowired private PricingRutaService pricingRutaService; @Autowired + private PricingCategoriaService pricingCategoriaService; + @Autowired private PricingMercadoService pricingMercadoService; @Autowired private PricingImporteService pricingImporteService; @@ -128,6 +133,8 @@ public class EditarPricingController extends MyGenericForwardComposer { @Autowired private RutaService rutaService; @Autowired + private CategoriaService categoriaService; + @Autowired private ParadaService paradaService; private Pricing pricing; private MyListbox pricingList; @@ -269,14 +276,14 @@ public class EditarPricingController extends MyGenericForwardComposer { //Categoria pricingCategoriaList.setItemRenderer(new RenderPricingCategoria()); lsPricingCategoria = new ArrayList(); - pricingCategoriaList.addEventListener("onDoubleClick", new EventListener() { - - @Override - public void onEvent(Event event) throws Exception { - PricingCategoria pCategoria = (PricingCategoria) pricingCategoriaList.getSelected(); - verPricingCategoria(pCategoria); - } - }); +// pricingCategoriaList.addEventListener("onDoubleClick", new EventListener() { +// +// @Override +// public void onEvent(Event event) throws Exception { +// PricingCategoria pCategoria = (PricingCategoria) pricingCategoriaList.getSelected(); +// verPricingCategoria(pCategoria); +// } +// }); //Mercado pricingMercadoList.setItemRenderer(new RenderPricingMercado()); @@ -541,6 +548,21 @@ public class EditarPricingController extends MyGenericForwardComposer { pricingRutaList.setData(lsPricingRuta); pricingRutaService.suscribir(pr); } + //Tipo Pasajero - Categoria + PricingCategoria pc = new PricingCategoria(); + Categoria categoria = categoriaService.obtenerID(1); + pricingCategoriaList.setDisabled(Boolean.TRUE); + if (categoria != null) { + pc.setCategoria(categoria); + pc.setPricing(pricing); + pc.setActivo(Boolean.TRUE); + pc.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + pc.setFecmodif(Calendar.getInstance().getTime()); + lsPricingCategoria.add(pc); + pricingCategoriaList.setData(lsPricingCategoria); + pricingCategoriaService.suscribir(pc); + } + //Mercado PricingMercado pme = new PricingMercado(); Parada p1 = paradaService.obtenerID(-1); diff --git a/web/gui/pricing/editarPricing.zul b/web/gui/pricing/editarPricing.zul index 4c899fc8e..d0e7a05e9 100644 --- a/web/gui/pricing/editarPricing.zul +++ b/web/gui/pricing/editarPricing.zul @@ -309,12 +309,12 @@