merge com uruguay

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32395 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2013-12-03 20:54:05 +00:00
parent a8e9120d98
commit bd490a47fd
31 changed files with 2091 additions and 684 deletions

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
setting.zk_facet_install_history=<history>\n</history>\n setting.zk_facet_install_history=<history>\n</history>\n
visualeditor.custom_web_content_path=/ventaboletosadm/web visualeditor.custom_web_content_path=/ventaboletosadm/web
visualeditor.custom_zk_package=zkee-bin-eval-6.0.0 visualeditor.custom_zk_package=zkee-bin-eval-6.5.2
visualeditor.is_use_zks_lib=true visualeditor.is_use_zks_lib=true

View File

@ -4,25 +4,26 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos; package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
import java.util.Calendar;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.TipoServicio; import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.service.TipoServicioService; import com.rjconsultores.ventaboletos.service.TipoServicioService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.util.Calendar;
import java.util.List;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Textbox;
/** /**
* *
@ -32,130 +33,133 @@ import org.zkoss.zul.Textbox;
@Scope("prototype") @Scope("prototype")
public class EditarTipoServicioController extends MyGenericForwardComposer { public class EditarTipoServicioController extends MyGenericForwardComposer {
@Autowired private static final long serialVersionUID = 1L;
private TipoServicioService tipoServicioService; private static Logger log = Logger.getLogger(EditarTipoServicioController.class);
private TipoServicio tipoServicio;
private MyListbox tipoServicioList;
private static Logger log = Logger.getLogger(EditarTipoServicioController.class);
private MyTextbox txtNome;
private Button btnApagar;
public Button getBtnApagar() { @Autowired
return btnApagar; private TipoServicioService tipoServicioService;
}
public void setBtnApagar(Button btnApagar) { private TipoServicio tipoServicio;
this.btnApagar = btnApagar; private MyListbox tipoServicioList;
} private MyTextbox txtNome;
private Button btnApagar;
public MyTextbox getTxtNome() { public Button getBtnApagar() {
return txtNome; return btnApagar;
} }
public void setTxtNome(MyTextbox txtNome) { public void setBtnApagar(Button btnApagar) {
this.txtNome = txtNome; this.btnApagar = btnApagar;
} }
@Override public MyTextbox getTxtNome() {
public void doAfterCompose(Component comp) throws Exception { return txtNome;
super.doAfterCompose(comp); }
tipoServicio = (TipoServicio) Executions.getCurrent().getArg().get("tipoServicio"); public void setTxtNome(MyTextbox txtNome) {
tipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("tipoServicioList"); this.txtNome = txtNome;
}
if (tipoServicio.getTiposervicioId() == null) { @Override
btnApagar.setVisible(Boolean.FALSE); public void doAfterCompose(Component comp) throws Exception {
} super.doAfterCompose(comp);
txtNome.focus(); tipoServicio = (TipoServicio) Executions.getCurrent().getArg().get("tipoServicio");
} tipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("tipoServicioList");
public void onClick$btnSalvar(Event ev) throws InterruptedException { if (tipoServicio.getTiposervicioId() == null) {
txtNome.getValue(); btnApagar.setVisible(Boolean.FALSE);
try { }
tipoServicio.setActivo(Boolean.TRUE); txtNome.focus();
tipoServicio.setFecmodif(Calendar.getInstance().getTime()); }
tipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
List<TipoServicio> lsTipoServicio = tipoServicioService.buscar(tipoServicio.getDescservicio()); public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
try {
if (!lsTipoServicio.isEmpty() && tipoServicio.getTiposervicioId() == null) { tipoServicio.setActivo(Boolean.TRUE);
Messagebox.show( tipoServicio.setFecmodif(Calendar.getInstance().getTime());
Labels.getLabel("MSG.Registro.Existe"), tipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (tipoServicio.getTiposervicioId() == null) {
tipoServicioService.suscribir(tipoServicio);
tipoServicioList.addItem(tipoServicio);
} else {
tipoServicioService.actualizacion(tipoServicio);
tipoServicioList.updateItem(tipoServicio);
}
Messagebox.show( List<TipoServicio> lsTipoServicio = tipoServicioService.buscar(tipoServicio.getDescservicio());
Labels.getLabel("editarTipoServicioController.MSG.suscribirOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow(); if (!lsTipoServicio.isEmpty() && tipoServicio.getTiposervicioId() == null) {
} Messagebox.show(
} catch (Exception ex) { Labels.getLabel("MSG.Registro.Existe"),
log.error("Exception ao suscribir TipoServicio: " + ex); Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.show( Messagebox.OK, Messagebox.EXCLAMATION);
Labels.getLabel("MSG.Error"), } else {
Labels.getLabel("editarTipoServicioController.window.title"), if (tipoServicio.getTiposervicioId() == null) {
Messagebox.OK, Messagebox.ERROR); tipoServicioService.suscribir(tipoServicio);
} tipoServicioList.addItem(tipoServicio);
} } else {
tipoServicioService.actualizacion(tipoServicio);
tipoServicioList.updateItem(tipoServicio);
}
public void onClick$btnApagar(Event ev) { Messagebox.show(
try { Labels.getLabel("editarTipoServicioController.MSG.suscribirOK"),
int resp = Messagebox.show( Labels.getLabel("editarTipoServicioController.window.title"),
Labels.getLabel("editarTipoServicioController.MSG.borrarPergunta"), Messagebox.OK, Messagebox.INFORMATION);
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) { closeWindow();
}
} catch (Exception ex) {
log.error("Exception ao suscribir TipoServicio: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
tipoServicioService.borrar(tipoServicio); public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.borrarPergunta"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
Messagebox.show( if (resp == Messagebox.YES) {
Labels.getLabel("editarTipoServicioController.MSG.borrarOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
tipoServicioList.removeItem(tipoServicio); tipoServicioService.borrar(tipoServicio);
closeWindow(); Messagebox.show(
} Labels.getLabel("editarTipoServicioController.MSG.borrarOK"),
} catch (Exception ex) { Labels.getLabel("editarTipoServicioController.window.title"),
log.error(ex); Messagebox.OK, Messagebox.INFORMATION);
}
}
public TipoServicio getTipoServicio() { tipoServicioList.removeItem(tipoServicio);
return tipoServicio;
}
public void setTipoServicio(TipoServicio tipoServicio) { closeWindow();
this.tipoServicio = tipoServicio; }
} } catch (Exception ex) {
log.error(ex);
}
}
public MyListbox getTipoServicioList() { public TipoServicio getTipoServicio() {
return tipoServicioList; return tipoServicio;
} }
public void setTipoServicioList(MyListbox tipoServicioList) { public void setTipoServicio(TipoServicio tipoServicio) {
this.tipoServicioList = tipoServicioList; this.tipoServicio = tipoServicio;
} }
public TipoServicioService getTipoServicioService() { public MyListbox getTipoServicioList() {
return tipoServicioService; return tipoServicioList;
} }
public void setTipoServicioService(TipoServicioService tipoServicioService) { public void setTipoServicioList(MyListbox tipoServicioList) {
this.tipoServicioService = tipoServicioService; this.tipoServicioList = tipoServicioList;
} }
public TipoServicioService getTipoServicioService() {
return tipoServicioService;
}
public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService;
}
} }

View File

@ -286,9 +286,6 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
marca = (Marca) cbiMarca.getValue(); marca = (Marca) cbiMarca.getValue();
busquedaCorrita.addFilterEqual("marca", marca); busquedaCorrita.addFilterEqual("marca", marca);
} }
// else {
// busquedaCorrita.addFilterIn("marca", lsMarca);
// }
Comboitem cbiRuta = cmbRuta.getSelectedItem(); Comboitem cbiRuta = cmbRuta.getSelectedItem();
Ruta ruta = null; Ruta ruta = null;

View File

@ -515,8 +515,11 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
if (!achou) { if (!achou) {
RutaEmpresa rutaEmpresa = new RutaEmpresa(); RutaEmpresa rutaEmpresa = new RutaEmpresa();
rutaEmpresa.setActivo(Boolean.TRUE);
rutaEmpresa.setEmpresa(empresa); rutaEmpresa.setEmpresa(empresa);
rutaEmpresa.setRutaEmpresaId(empresa.getEmpresaId());
rutaEmpresa.setRuta(ruta);
rutaEmpresa.setEmpresa(empresa);
rutaEmpresa.setActivo(Boolean.TRUE);
rutaEmpresa.setFecmodif(Calendar.getInstance().getTime()); rutaEmpresa.setFecmodif(Calendar.getInstance().getTime());
rutaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); rutaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());

View File

@ -42,6 +42,7 @@ import com.rjconsultores.ventaboletos.entidad.PricingCategoria;
import com.rjconsultores.ventaboletos.entidad.PricingClase; import com.rjconsultores.ventaboletos.entidad.PricingClase;
import com.rjconsultores.ventaboletos.entidad.PricingCorrida; import com.rjconsultores.ventaboletos.entidad.PricingCorrida;
import com.rjconsultores.ventaboletos.entidad.PricingDia; import com.rjconsultores.ventaboletos.entidad.PricingDia;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
import com.rjconsultores.ventaboletos.entidad.PricingImporte; import com.rjconsultores.ventaboletos.entidad.PricingImporte;
import com.rjconsultores.ventaboletos.entidad.PricingMarca; import com.rjconsultores.ventaboletos.entidad.PricingMarca;
import com.rjconsultores.ventaboletos.entidad.PricingMercado; import com.rjconsultores.ventaboletos.entidad.PricingMercado;
@ -61,6 +62,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PricingCategoriaService; import com.rjconsultores.ventaboletos.service.PricingCategoriaService;
import com.rjconsultores.ventaboletos.service.PricingClaseService; import com.rjconsultores.ventaboletos.service.PricingClaseService;
import com.rjconsultores.ventaboletos.service.PricingFormapagoService;
import com.rjconsultores.ventaboletos.service.PricingImporteService; import com.rjconsultores.ventaboletos.service.PricingImporteService;
import com.rjconsultores.ventaboletos.service.PricingMarcaService; import com.rjconsultores.ventaboletos.service.PricingMarcaService;
import com.rjconsultores.ventaboletos.service.PricingMercadoService; import com.rjconsultores.ventaboletos.service.PricingMercadoService;
@ -80,6 +82,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCategori
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingClase; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingClase;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCorrida; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCorrida;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingDia; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingDia;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingFormaPago;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingImporte; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingImporte;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMarca; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMarca;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMercado; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMercado;
@ -99,6 +102,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingVigencia
public class EditarPricingController extends MyGenericForwardComposer { public class EditarPricingController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarPricingController.class);
@Autowired @Autowired
private PricingService pricingService; private PricingService pricingService;
@Autowired @Autowired
@ -118,6 +123,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
@Autowired @Autowired
private PricingImporteService pricingImporteService; private PricingImporteService pricingImporteService;
@Autowired @Autowired
private PricingFormapagoService pricingFormapagoService;
@Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
private MarcaService marcaService; private MarcaService marcaService;
@ -133,6 +140,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private CategoriaService categoriaService; private CategoriaService categoriaService;
@Autowired @Autowired
private ParadaService paradaService; private ParadaService paradaService;
private Pricing pricing; private Pricing pricing;
private MyListbox pricingList; private MyListbox pricingList;
private MyListbox pricingVigenciaList; private MyListbox pricingVigenciaList;
@ -149,6 +157,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private MyListbox pricingAsientoList; private MyListbox pricingAsientoList;
private MyListbox pricingTipoServicioList; private MyListbox pricingTipoServicioList;
private MyListbox pricingOcupaAntecipaList; private MyListbox pricingOcupaAntecipaList;
private MyListbox pricingFormapagoList;
private List<Empresa> lsEmpresa; private List<Empresa> lsEmpresa;
private List<PricingVigencia> lsPricingVigencia; private List<PricingVigencia> lsPricingVigencia;
private List<PricingImporte> lsPricingImporte; private List<PricingImporte> lsPricingImporte;
@ -164,7 +173,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private List<PricingOcupaAntecipa> lsPricingOcupaAntecipa; private List<PricingOcupaAntecipa> lsPricingOcupaAntecipa;
private List<PricingRuta> lsPricingRuta; private List<PricingRuta> lsPricingRuta;
private List<PricingTipoServicio> lsPricingTipoServicio; private List<PricingTipoServicio> lsPricingTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingController.class); private List<PricingFormapago> lsPricingFormapago;
private Combobox cmbEmpresa; private Combobox cmbEmpresa;
private Radio rdTransSi; private Radio rdTransSi;
private Radio rdTransNo; private Radio rdTransNo;
@ -218,6 +227,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
private Button btnNovoTipoServicio; private Button btnNovoTipoServicio;
private Button btnApagarTipoServicio; private Button btnApagarTipoServicio;
private Button btnModificarTipoServicio; private Button btnModificarTipoServicio;
private Button btnNovoFormapago;
private Button btnApagarFormapago;
private Button btnModificarFormapago;
private boolean salvo = false; private boolean salvo = false;
private Boolean gravarNovo = Boolean.TRUE; private Boolean gravarNovo = Boolean.TRUE;
private Textbox nombrePricing; private Textbox nombrePricing;
@ -419,6 +431,18 @@ public class EditarPricingController extends MyGenericForwardComposer {
} }
}); });
// FormaPago
pricingFormapagoList.setItemRenderer(new RenderPricingFormaPago());
lsPricingFormapago = new ArrayList<PricingFormapago>();
pricingFormapagoList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
verPricingFormapago(pFormapago);
}
});
if (pricing.getPricingId() != null) { if (pricing.getPricingId() != null) {
pricing = pricingService.obtenerID(pricing.getPricingId()); pricing = pricingService.obtenerID(pricing.getPricingId());
@ -458,6 +482,12 @@ public class EditarPricingController extends MyGenericForwardComposer {
pricingTipoServicioList.setSelectedIndex(0); pricingTipoServicioList.setSelectedIndex(0);
} }
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
if (lsPricingFormapago.size() > 0) {
pricingFormapagoList.setSelectedIndex(0);
}
lsPricingPuntoVenta = pricing.getPricingPuntoventaList(); lsPricingPuntoVenta = pricing.getPricingPuntoventaList();
pricingPuntoVentaList.setData(lsPricingPuntoVenta); pricingPuntoVentaList.setData(lsPricingPuntoVenta);
if (lsPricingPuntoVenta.size() > 0) { if (lsPricingPuntoVenta.size() > 0) {
@ -500,6 +530,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
lsPricingTipoServicio = pricing.getPricingTipoServicioList(); lsPricingTipoServicio = pricing.getPricingTipoServicioList();
pricingTipoServicioList.setData(lsPricingTipoServicio); pricingTipoServicioList.setData(lsPricingTipoServicio);
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
if (pricing.getIndtransferible() == Boolean.FALSE) { if (pricing.getIndtransferible() == Boolean.FALSE) {
rdTransNo.setChecked(true); rdTransNo.setChecked(true);
} }
@ -1929,13 +1962,87 @@ public class EditarPricingController extends MyGenericForwardComposer {
verPricingTipoServicio(pTipoServicio); verPricingTipoServicio(pTipoServicio);
} else { } else {
try { try {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
} catch (InterruptedException ex) {
log.error(ex.getMessage());
}
}
}
public void onClick$btnApagarFormaPago(Event ev) throws Exception {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
if (pFormapago != null) {
int resp = Messagebox.show(
Labels.getLabel("editarPricingController.MSG.borrarPerguntaFormaPago"),
Labels.getLabel("editarPricingController.windowFormaPago.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
lsPricingFormapago.remove(pFormapago);
pFormapago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
pFormapago.setFecmodif(Calendar.getInstance().getTime());
pFormapago.setActivo(Pricing.EXCLUIDO);
lsPricingFormapago.add(pFormapago);
pricingFormapagoList.removeItem(pFormapago);
pricingFormapagoList.clearSelection();
pricing.setPricingFormapagoList(lsPricingFormapago);
pricingService.actualizacion(pricing);
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
}
} else {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnNovoFormaPago(Event ev) throws InterruptedException {
if (!validarNome()) {
return;
}
PricingFormapago pFormapago = new PricingFormapago();
pFormapago.setPricing(pricing);
verPricingFormapago(pFormapago);
}
public void onClick$btnModificarFormaPago(Event ev) {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
if (pFormapago != null) {
verPricingFormapago(pFormapago);
} else {
try {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
java.util.logging.Logger.getLogger(EditarPricingController.class.getName()).log(Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(EditarPricingController.class.getName()).log(Level.SEVERE, null, ex);
} }
} }
} }
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verPricingFormapago(PricingFormapago pFormapago) {
if (pricing.getPricingId() == null) {
pricingService.suscribir(pricing);
}
Map args = new HashMap();
args.put("pricingFormapago", pFormapago);
args.put("pricingFormapagoList", pricingFormapagoList);
openWindow("/gui/pricing/editarPricingFormapago.zul",
Labels.getLabel("editarPricingController.windowFormaPago.title"), args, MODAL);
}
public void onClick$btnInativar(Event ev) throws InterruptedException { public void onClick$btnInativar(Event ev) throws InterruptedException {
try { try {
int resp = Messagebox.show( int resp = Messagebox.show(
@ -2005,6 +2112,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
pricingAsientoList.setDisabled(desativar); pricingAsientoList.setDisabled(desativar);
pricingOcupaAntecipaList.setDisabled(desativar); pricingOcupaAntecipaList.setDisabled(desativar);
pricingTipoServicioList.setDisabled(desativar); pricingTipoServicioList.setDisabled(desativar);
pricingFormapagoList.setDisabled(desativar);
btnNovoVigencia.setDisabled(desativar); btnNovoVigencia.setDisabled(desativar);
btnApagarVigencia.setDisabled(desativar); btnApagarVigencia.setDisabled(desativar);
btnModificarVigencia.setDisabled(desativar); btnModificarVigencia.setDisabled(desativar);
@ -2042,6 +2150,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
btnNovoTipoServicio.setDisabled(desativar); btnNovoTipoServicio.setDisabled(desativar);
btnApagarTipoServicio.setDisabled(desativar); btnApagarTipoServicio.setDisabled(desativar);
btnModificarTipoServicio.setDisabled(desativar); btnModificarTipoServicio.setDisabled(desativar);
btnNovoFormapago.setDisabled(desativar);
btnApagarFormapago.setDisabled(desativar);
btnModificarFormapago.setDisabled(desativar);
btnCopiar.setDisabled(desativar); btnCopiar.setDisabled(desativar);
btnSalvar.setDisabled(desativar); btnSalvar.setDisabled(desativar);
@ -2286,4 +2397,5 @@ public class EditarPricingController extends MyGenericForwardComposer {
public void setRadioPor(Radio radioPor) { public void setRadioPor(Radio radioPor) {
this.radioPor = radioPor; this.radioPor = radioPor;
} }
} }

View File

@ -0,0 +1,121 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Radio;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
import com.rjconsultores.ventaboletos.service.FormaPagoService;
import com.rjconsultores.ventaboletos.service.PricingFormapagoService;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@Controller("editarPricingFormapagoController")
@Scope("prototype")
public class EditarPricingFormapagoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarPricingFormapagoController.class);
@Autowired
private FormaPagoService formaPagoService;
@Autowired
private PricingFormapagoService pricingFormapagoService;
private List<FormaPago> lsFormaPago;
private PricingFormapago pricingFormapago;
private MyListbox pricingFormapagoList;
private Radio si;
private Radio no;
@Override
public void doAfterCompose(Component comp) throws Exception {
this.setPricingFormapago((PricingFormapago) Executions.getCurrent().getArg().get("pricingFormapago"));
this.setPricingFormapagoList((MyListbox) Executions.getCurrent().getArg().get("pricingFormapagoList"));
this.setLsFormaPago(formaPagoService.obtenerTodos());
super.doAfterCompose(comp);
if (pricingFormapago.getPricingformapagoId() != null) {
if (pricingFormapago.getIndexcepcion()) {
si.setChecked(true);
} else {
no.setChecked(true);
}
} else {
no.setChecked(true);
}
}
public void onClick$btnAdicionarFormaPago(Event ev) throws InterruptedException {
try {
if (pricingFormapago.getFormaPago() == null) {
Messagebox.show(
Labels.getLabel("MSG.Error.combobox"),
Labels.getLabel("editarPricingController.windowFormaPago.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (no.isChecked()) {
pricingFormapago.setIndexcepcion(Boolean.FALSE);
} else if (si.isChecked()) {
pricingFormapago.setIndexcepcion(Boolean.TRUE);
}
if (pricingFormapago.getPricingformapagoId() != null) {
pricingFormapagoService.actualizacion(pricingFormapago);
pricingFormapagoList.updateItem(pricingFormapago);
pricingFormapagoList.setData(pricingFormapago.getPricing().getPricingFormapagoList());
} else {
pricingFormapagoService.suscribir(pricingFormapago);
pricingFormapagoList.addItem(pricingFormapago);
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
public List<FormaPago> getLsFormaPago() {
return lsFormaPago;
}
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
this.lsFormaPago = lsFormaPago;
}
public PricingFormapago getPricingFormapago() {
return pricingFormapago;
}
public void setPricingFormapago(PricingFormapago pricingFormapago) {
this.pricingFormapago = pricingFormapago;
}
public MyListbox getPricingFormapagoList() {
return pricingFormapagoList;
}
public void setPricingFormapagoList(MyListbox pricingFormapagoList) {
this.pricingFormapagoList = pricingFormapagoList;
}
}

View File

@ -15,7 +15,6 @@ import org.zkoss.zul.Intbox;
import com.rjconsultores.ventaboletos.entidad.Pricing; import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa; import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService; import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem; import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
@ -56,7 +55,7 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception { public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
if ((cantasientosmin.getValue() != null || cantasientosmax.getValue() != null) if ((cantasientosmin.getValue() != null || cantasientosmax.getValue() != null)
&& (ocupacioninicial.getValue() != null || ocupacionfinal.getValue() != null)){ && (ocupacioninicial.getValue() != null || ocupacionfinal.getValue() != null)) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoPorCant"), Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoPorCant"),
Labels.getLabel("editarPricingController.windowOcupacion.title"), Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
@ -78,11 +77,11 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
} }
if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() != null) if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() != null)
|| (cantasientosmin.getValue() != null && cantasientosmax.getValue() == null) || (cantasientosmin.getValue() != null && cantasientosmax.getValue() == null)
|| (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() != null) || (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() != null)
|| (ocupacioninicial.getValue() != null && ocupacionfinal.getValue() == null) || (ocupacioninicial.getValue() != null && ocupacionfinal.getValue() == null)
|| (cantdiasmin.getValue() == null && cantdiasmax.getValue() != null) || (cantdiasmin.getValue() == null && cantdiasmax.getValue() != null)
|| (cantdiasmin.getValue() != null && cantdiasmax.getValue() == null)) { || (cantdiasmin.getValue() != null && cantdiasmax.getValue() == null)) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.MinMax"), Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.MinMax"),
Labels.getLabel("editarPricingController.windowOcupacion.title"), Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
@ -90,34 +89,34 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
return; return;
} }
if (porcentaje.getValueDecimal() != null && importe.getValueDecimal() != null) { if (porcentaje.getValueDecimal() != null && importe.getValueDecimal() != null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (porcentaje.getValueDecimal() == null && importe.getValueDecimal() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"), Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
Labels.getLabel("editarPricingController.windowOcupacion.title"), Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else { } else {
if (porcentaje.getValueDecimal() == null && importe.getValueDecimal() == null) { try {
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"), pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
} else {
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
}
closeWindow();
} catch (Exception e) {
Messagebox.show(e.getLocalizedMessage(),
Labels.getLabel("editarPricingController.windowOcupacion.title"), Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else {
try {
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
} else {
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
}
closeWindow();
} catch (BusinessException e) {
Messagebox.show(e.getLocalizedMessage(),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} }
} }
}
} }
public void onClick$btnRemoverOcupaAntecipa(Event ev) { public void onClick$btnRemoverOcupaAntecipa(Event ev) {

View File

@ -4,20 +4,13 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing; package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
import com.rjconsultores.ventaboletos.service.TipoServicioService;
import com.rjconsultores.ventaboletos.service.PricingTipoServicioService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.Calendar; import java.util.Calendar;
import java.util.List;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.List;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox; import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
@ -25,6 +18,15 @@ import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Combobox; import org.zkoss.zul.Combobox;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.service.PricingTipoServicioService;
import com.rjconsultores.ventaboletos.service.TipoServicioService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
/** /**
* *
* @author Rafius * @author Rafius
@ -33,139 +35,140 @@ import org.zkoss.zul.Combobox;
@Scope("prototype") @Scope("prototype")
public class EditarPricingTipoServicioController extends MyGenericForwardComposer { public class EditarPricingTipoServicioController extends MyGenericForwardComposer {
@Autowired private static final long serialVersionUID = 1L;
private PricingTipoServicioService pricingTipoServicioService;
@Autowired
private TipoServicioService tipoServicioService;
private List<TipoServicio> lsTipoServicio;
private PricingTipoServicio pricingTipoServicio;
private MyListbox pricingTipoServicioList;
private Combobox cmbTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingTipoServicioController.class);
@Override @Autowired
public void doAfterCompose(Component comp) throws Exception { private PricingTipoServicioService pricingTipoServicioService;
@Autowired
private TipoServicioService tipoServicioService;
private List<TipoServicio> lsTipoServicio;
private PricingTipoServicio pricingTipoServicio;
private MyListbox pricingTipoServicioList;
private Combobox cmbTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingTipoServicioController.class);
lsTipoServicio = tipoServicioService.obtenerTodos(); @Override
public void doAfterCompose(Component comp) throws Exception {
pricingTipoServicio = (PricingTipoServicio) Executions.getCurrent().getArg().get("pricingTipoServicio"); lsTipoServicio = tipoServicioService.obtenerTodos();
pricingTipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoServicioList");
super.doAfterCompose(comp); pricingTipoServicio = (PricingTipoServicio) Executions.getCurrent().getArg().get("pricingTipoServicio");
pricingTipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoServicioList");
super.doAfterCompose(comp);
cmbTipoServicio.focus(); cmbTipoServicio.focus();
} }
public void onClick$btnAdicionarTipoServicio(Event ev) throws Exception { public void onClick$btnAdicionarTipoServicio(Event ev) throws Exception {
cmbTipoServicio.getValue(); cmbTipoServicio.getValue();
try { try {
if (pricingTipoServicio.getTipoServicio() == null) { if (pricingTipoServicio.getTipoServicio() == null) {
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Error.combobox"), Labels.getLabel("MSG.Error.combobox"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"), Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else { } else {
Boolean existe = pricingTipoServicioService.obtenerPricingTipoServicio(pricingTipoServicio.getPricing(), (TipoServicio) cmbTipoServicio.getSelectedItem().getValue()); Boolean existe = pricingTipoServicioService.obtenerPricingTipoServicio(pricingTipoServicio.getPricing(), (TipoServicio) cmbTipoServicio.getSelectedItem().getValue());
if (existe) { if (existe) {
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"), Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else { } else {
if (pricingTipoServicio.getPricingtiposervicioId() != null) { if (pricingTipoServicio.getPricingtiposervicioId() != null) {
pricingTipoServicioService.actualizacion(pricingTipoServicio); pricingTipoServicioService.actualizacion(pricingTipoServicio);
pricingTipoServicioList.updateItem(pricingTipoServicio); pricingTipoServicioList.updateItem(pricingTipoServicio);
} else { } else {
pricingTipoServicioService.suscribir(pricingTipoServicio); pricingTipoServicioService.suscribir(pricingTipoServicio);
pricingTipoServicioList.addItem(pricingTipoServicio); pricingTipoServicioList.addItem(pricingTipoServicio);
} }
closeWindow(); closeWindow();
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
log.error(ex); log.error(ex);
} }
} }
public void onClick$btnRemoverTipoServicio(Event ev) { public void onClick$btnRemoverTipoServicio(Event ev) {
try { try {
PricingTipoServicio pTipoServicio = (PricingTipoServicio) pricingTipoServicioList.getSelected(); PricingTipoServicio pTipoServicio = (PricingTipoServicio) pricingTipoServicioList.getSelected();
if (pTipoServicio != null) { if (pTipoServicio != null) {
int resp = Messagebox.show( int resp = Messagebox.show(
Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoServicio"), Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoServicio"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"), Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION); Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) { if (resp == Messagebox.YES) {
pricingTipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); pricingTipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
pricingTipoServicio.setFecmodif(Calendar.getInstance().getTime()); pricingTipoServicio.setFecmodif(Calendar.getInstance().getTime());
pricingTipoServicio.setActivo(Pricing.EXCLUIDO); pricingTipoServicio.setActivo(Pricing.EXCLUIDO);
pricingTipoServicioList.removeItem(pricingTipoServicio); pricingTipoServicioList.removeItem(pricingTipoServicio);
pricingTipoServicioService.borrar(pricingTipoServicio); pricingTipoServicioService.borrar(pricingTipoServicio);
closeWindow(); closeWindow();
} }
} else { } else {
Messagebox.show( Messagebox.show(
Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"), Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} }
} catch (Exception ex) { } catch (Exception ex) {
log.error(ex); log.error(ex);
} }
} }
public PricingTipoServicio getPricingTipoServicio() { public PricingTipoServicio getPricingTipoServicio() {
return pricingTipoServicio; return pricingTipoServicio;
} }
public void setPricingTipoServicio(PricingTipoServicio pricingTipoServicio) { public void setPricingTipoServicio(PricingTipoServicio pricingTipoServicio) {
this.pricingTipoServicio = pricingTipoServicio; this.pricingTipoServicio = pricingTipoServicio;
} }
public MyListbox getPricingTipoServicioList() { public MyListbox getPricingTipoServicioList() {
return pricingTipoServicioList; return pricingTipoServicioList;
} }
public void setPricingTipoServicioList(MyListbox pricingTipoServicioList) { public void setPricingTipoServicioList(MyListbox pricingTipoServicioList) {
this.pricingTipoServicioList = pricingTipoServicioList; this.pricingTipoServicioList = pricingTipoServicioList;
} }
public PricingTipoServicioService getPricingTipoServicioService() { public PricingTipoServicioService getPricingTipoServicioService() {
return pricingTipoServicioService; return pricingTipoServicioService;
} }
public void setPricingTipoServicioService(PricingTipoServicioService pricingTipoServicioService) { public void setPricingTipoServicioService(PricingTipoServicioService pricingTipoServicioService) {
this.pricingTipoServicioService = pricingTipoServicioService; this.pricingTipoServicioService = pricingTipoServicioService;
} }
public TipoServicioService getTipoServicioService() { public TipoServicioService getTipoServicioService() {
return tipoServicioService; return tipoServicioService;
} }
public void setTipoServicioService(TipoServicioService tipoServicioService) { public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService; this.tipoServicioService = tipoServicioService;
} }
public static Logger getLog() { public static Logger getLog() {
return log; return log;
} }
public static void setLog(Logger log) { public static void setLog(Logger log) {
EditarPricingTipoServicioController.log = log; EditarPricingTipoServicioController.log = log;
} }
public List<TipoServicio> getLsTipoServicio() { public List<TipoServicio> getLsTipoServicio() {
return lsTipoServicio; return lsTipoServicio;
} }
public void setLsTipoServicio(List<TipoServicio> lsTipoServicio) { public void setLsTipoServicio(List<TipoServicio> lsTipoServicio) {
this.lsTipoServicio = lsTipoServicio; this.lsTipoServicio = lsTipoServicio;
} }
} }

View File

@ -48,8 +48,10 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacionImpreso
public class EditarEstacionController extends MyGenericForwardComposer { public class EditarEstacionController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Autowired @Autowired
private EstacionService estacionService; private EstacionService estacionService;
private MyListbox estacionList; private MyListbox estacionList;
private MyListbox estacionSitefList; private MyListbox estacionSitefList;
private MyListbox estacionImpresoraList; private MyListbox estacionImpresoraList;
@ -145,16 +147,17 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacion.setLsEstacionImpresora(estacionImpresoraList.getListData()); estacion.setLsEstacionImpresora(estacionImpresoraList.getListData());
estacionService.suscribirActualizar(estacion); estacionService.suscribirActualizar(estacion);
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"), Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
Labels.getLabel("editarEstacionController.window.title"), Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.INFORMATION); Messagebox.OK, Messagebox.INFORMATION);
estacionList.updateItem(estacion); estacionList.updateItem(estacion);
closeWindow(); closeWindow();
} catch (BusinessException e) { } catch (BusinessException e) {
Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"), Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} }
} }
@ -280,6 +283,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacionImpresoraList.addItemNovo(estacionImpresora); estacionImpresoraList.addItemNovo(estacionImpresora);
} }
} }
@ -293,6 +297,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresoraList.removeSelectedItem(); estacionImpresoraList.removeSelectedItem();
if (ei.getEstacionImpresoraId() != null) { if (ei.getEstacionImpresoraId() != null) {
ei.setFecmodif(Calendar.getInstance().getTime()); ei.setFecmodif(Calendar.getInstance().getTime());
ei.setActivo(Boolean.FALSE); ei.setActivo(Boolean.FALSE);
ei.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); ei.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
@ -300,4 +305,5 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresoraList.addItemNovo(ei); estacionImpresoraList.addItemNovo(ei);
} }
} }
} }

View File

@ -0,0 +1,240 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Paging;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TaxaEmbLevanteCtrlService;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbLevanteCtrl;
@Controller("busquedaTaxaEmbLevanteController")
@Scope("prototype")
public class BusquedaTaxaEmbLevanteController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(BusquedaTaxaEmbLevanteController.class);
@Autowired
private TaxaEmbLevanteCtrlService taxaEmbLevanteCtrlService;
@Autowired
private RutaService rutaService;
@Autowired
private transient PagedListWrapper<TaxaEmbLevanteCtrl> plwTaxaEmbLevanteCtrl;
private MyListbox taxaEmbLevanteCtrlList;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private Paging pagingTaxaEmbLevanteCtrl;
private List<Ruta> lsRuta;
private Combobox cmbRuta;
private Combobox cmbParadaOrigem;
private List<Parada> lsParadaOrigem;
private Combobox cmbParadaDestino;
private List<Parada> lsParadaDestino;
@Override
public void doAfterCompose(Component comp) throws Exception {
lsRuta = rutaService.obtenerTodos();
lsParadaOrigem = new ArrayList<Parada>();
lsParadaDestino = new ArrayList<Parada>();
super.doAfterCompose(comp);
taxaEmbLevanteCtrlList.setItemRenderer(new RenderTaxaEmbLevanteCtrl());
taxaEmbLevanteCtrlList.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) taxaEmbLevanteCtrlList.getSelected();
}
});
taxaEmbLevanteCtrlList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) taxaEmbLevanteCtrlList.getSelected();
itemSelecionado(taxaEmbLevanteCtrl);
}
});
refreshLista();
}
public void onSelect$cmbRuta(Event ev) {
Ruta ruta = (Ruta) cmbRuta.getSelectedItem().getValue();
ruta = rutaService.obtenerID(ruta.getRutaId());
for (RutaSecuencia rutaSecuencia : ruta.getRutaSecuenciaList()) {
lsParadaOrigem.add(rutaSecuencia.getTramo().getOrigem());
lsParadaDestino.add(rutaSecuencia.getTramo().getDestino());
}
BindingListModel listModelParadaOrigem = new BindingListModelList(lsParadaOrigem, true);
cmbParadaOrigem.setModel(listModelParadaOrigem);
BindingListModel listModelParadaDestino = new BindingListModelList(lsParadaDestino, true);
cmbParadaDestino.setModel(listModelParadaDestino);
}
public void onClick$btnNovo(Event ev) {
itemSelecionado(new TaxaEmbLevanteCtrl());
}
public void itemSelecionado(TaxaEmbLevanteCtrl taxa) {
Map args = new HashMap();
args.put("taxaEmbLevanteCtrl", taxa);
args.put("taxaEmbLevanteCtrlList", taxaEmbLevanteCtrlList);
openWindow("/gui/tarifas/editarTaxaEmbLevante.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.editar.window.title"), args, MODAL);
}
public void onClick$btnApagar(Event ev) throws InterruptedException {
try {
int resp = Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarPergunta"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
taxaEmbLevanteCtrlService.borrar(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
taxaEmbLevanteCtrlList.removeItem(taxaEmbLevanteCtrl);
}
} catch (Exception ex) {
log.error("Erro apagar pricing : " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void refreshLista() {
HibernateSearchObject<TaxaEmbLevanteCtrl> busquedaTaxaEmbLevanteCtrl =
new HibernateSearchObject<TaxaEmbLevanteCtrl>(TaxaEmbLevanteCtrl.class,
pagingTaxaEmbLevanteCtrl.getPageSize());
Comboitem rutaItem = cmbRuta.getSelectedItem();
if (rutaItem != null){
Ruta ruta = (Ruta) rutaItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("ruta", ruta);
}
Comboitem origenItem = cmbParadaOrigem.getSelectedItem();
if (origenItem != null){
Parada origen = (Parada) origenItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("origem", origen);
}
Comboitem destinoItem = cmbParadaDestino.getSelectedItem();
if (origenItem != null){
Parada destino = (Parada) destinoItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("destino", destino);
}
busquedaTaxaEmbLevanteCtrl.addFilterEqual("activo", Boolean.TRUE);
busquedaTaxaEmbLevanteCtrl.addSortAsc("ruta.descruta");
plwTaxaEmbLevanteCtrl.init(busquedaTaxaEmbLevanteCtrl, taxaEmbLevanteCtrlList, pagingTaxaEmbLevanteCtrl);
if (taxaEmbLevanteCtrlList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public MyListbox getTaxaEmbLevanteCtrlList() {
return taxaEmbLevanteCtrlList;
}
public void setTaxaEmbLevanteCtrlList(MyListbox taxaEmbLevanteCtrlList) {
this.taxaEmbLevanteCtrlList = taxaEmbLevanteCtrlList;
}
public Paging getPagingTaxaEmbLevanteCtrl() {
return pagingTaxaEmbLevanteCtrl;
}
public void setPagingTaxaEmbLevanteCtrl(Paging pagingTaxaEmbLevanteCtrl) {
this.pagingTaxaEmbLevanteCtrl = pagingTaxaEmbLevanteCtrl;
}
public List<Ruta> getLsRuta() {
return lsRuta;
}
public void setLsRuta(List<Ruta> lsRuta) {
this.lsRuta = lsRuta;
}
public List<Parada> getLsParadaOrigem() {
return lsParadaOrigem;
}
public void setLsParadaOrigem(List<Parada> lsParadaOrigem) {
this.lsParadaOrigem = lsParadaOrigem;
}
public List<Parada> getLsParadaDestino() {
return lsParadaDestino;
}
public void setLsParadaDestino(List<Parada> lsParadaDestino) {
this.lsParadaDestino = lsParadaDestino;
}
public PagedListWrapper<TaxaEmbLevanteCtrl> getPlwTaxaEmbLevanteCtrl() {
return plwTaxaEmbLevanteCtrl;
}
public void setPlwTaxaEmbLevanteCtrl(PagedListWrapper<TaxaEmbLevanteCtrl> plwTaxaEmbLevanteCtrl) {
this.plwTaxaEmbLevanteCtrl = plwTaxaEmbLevanteCtrl;
}
}

View File

@ -4,15 +4,9 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas; package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbarqueOrgao;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -24,6 +18,14 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Paging; import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbarqueOrgao;
/** /**
* *
* @author Administrador * @author Administrador
@ -32,117 +34,118 @@ import org.zkoss.zul.Textbox;
@Scope("prototype") @Scope("prototype")
public class BusquedaTaxaEmbarqueKmController extends MyGenericForwardComposer { public class BusquedaTaxaEmbarqueKmController extends MyGenericForwardComposer {
@Autowired private static final long serialVersionUID = 1L;
private transient PagedListWrapper<OrgaoConcedente> plwOrgao; @Autowired
private MyListbox taxaEmbarqueKmList; private transient PagedListWrapper<OrgaoConcedente> plwOrgao;
private Paging pagingTaxaEmbarqueKm; private MyListbox taxaEmbarqueKmList;
private Textbox txtOrgao; private Paging pagingTaxaEmbarqueKm;
private Textbox txtOrgao;
public Paging getPagingTaxaEmbarqueKm() { public Paging getPagingTaxaEmbarqueKm() {
return pagingTaxaEmbarqueKm; return pagingTaxaEmbarqueKm;
} }
public void setPagingTaxaEmbarqueKm(Paging pagingTaxaEmbarqueKm) { public void setPagingTaxaEmbarqueKm(Paging pagingTaxaEmbarqueKm) {
this.pagingTaxaEmbarqueKm = pagingTaxaEmbarqueKm; this.pagingTaxaEmbarqueKm = pagingTaxaEmbarqueKm;
} }
public PagedListWrapper<OrgaoConcedente> getPlwOrgao() { public PagedListWrapper<OrgaoConcedente> getPlwOrgao() {
return plwOrgao; return plwOrgao;
} }
public void setPlwOrgao(PagedListWrapper<OrgaoConcedente> plwOrgao) { public void setPlwOrgao(PagedListWrapper<OrgaoConcedente> plwOrgao) {
this.plwOrgao = plwOrgao; this.plwOrgao = plwOrgao;
} }
public MyListbox getTaxaEmbarqueKmList() { public MyListbox getTaxaEmbarqueKmList() {
return taxaEmbarqueKmList; return taxaEmbarqueKmList;
} }
public void setTaxaEmbarqueKmList(MyListbox taxaEmbarqueKmList) { public void setTaxaEmbarqueKmList(MyListbox taxaEmbarqueKmList) {
this.taxaEmbarqueKmList = taxaEmbarqueKmList; this.taxaEmbarqueKmList = taxaEmbarqueKmList;
} }
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp); super.doAfterCompose(comp);
taxaEmbarqueKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao()); taxaEmbarqueKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao());
taxaEmbarqueKmList.addEventListener("onDoubleClick", new EventListener() { taxaEmbarqueKmList.addEventListener("onDoubleClick", new EventListener() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
OrgaoConcedente c = (OrgaoConcedente) taxaEmbarqueKmList.getSelected(); OrgaoConcedente c = (OrgaoConcedente) taxaEmbarqueKmList.getSelected();
verTaxaEmbarqueKm(c); verTaxaEmbarqueKm(c);
} }
}); });
refreshLista(); refreshLista();
txtOrgao.focus(); txtOrgao.focus();
} }
private void verTaxaEmbarqueKm(OrgaoConcedente o) { private void verTaxaEmbarqueKm(OrgaoConcedente o) {
if (o == null) { if (o == null) {
return; return;
} }
Map args = new HashMap(); Map args = new HashMap();
args.put("orgao", o); args.put("orgao", o);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList); args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul", openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"), Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL); args, MODAL);
} }
private void refreshLista() { private void refreshLista() {
HibernateSearchObject<OrgaoConcedente> taxaEmbarqueKmBusqueda =new HibernateSearchObject<OrgaoConcedente>(OrgaoConcedente.class,pagingTaxaEmbarqueKm.getPageSize()); HibernateSearchObject<OrgaoConcedente> taxaEmbarqueKmBusqueda = new HibernateSearchObject<OrgaoConcedente>(OrgaoConcedente.class, pagingTaxaEmbarqueKm.getPageSize());
taxaEmbarqueKmBusqueda.addFilterEqual("activo", Boolean.TRUE); taxaEmbarqueKmBusqueda.addFilterEqual("activo", Boolean.TRUE);
if (!txtOrgao.getValue().equals("")) { if (!txtOrgao.getValue().equals("")) {
taxaEmbarqueKmBusqueda.addFilterLike("descOrgao","%" + txtOrgao.getText().trim().concat("%")); taxaEmbarqueKmBusqueda.addFilterLike("descOrgao", "%" + txtOrgao.getText().trim().concat("%"));
} }
taxaEmbarqueKmBusqueda.addSortAsc("descOrgao"); taxaEmbarqueKmBusqueda.addSortAsc("descOrgao");
plwOrgao.init(taxaEmbarqueKmBusqueda, taxaEmbarqueKmList, pagingTaxaEmbarqueKm); plwOrgao.init(taxaEmbarqueKmBusqueda, taxaEmbarqueKmList, pagingTaxaEmbarqueKm);
if (taxaEmbarqueKmList.getData().length == 0) { if (taxaEmbarqueKmList.getData().length == 0) {
try { try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"), Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
Messagebox.OK, Messagebox.INFORMATION); Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
} }
} }
} }
public void onClick$btnPesquisa(Event ev) { public void onClick$btnPesquisa(Event ev) {
refreshLista(); refreshLista();
} }
public void onClick$btnRefresh(Event ev) { public void onClick$btnRefresh(Event ev) {
refreshLista(); refreshLista();
} }
public void onClick$btnNovo(Event ev) { public void onClick$btnNovo(Event ev) {
verTaxaEmbarqueKm(new TaxaEmbarqueKm()); verTaxaEmbarqueKm(new TaxaEmbarqueKm());
} }
private void verTaxaEmbarqueKm(TaxaEmbarqueKm tx) { private void verTaxaEmbarqueKm(TaxaEmbarqueKm tx) {
if (tx == null) { if (tx == null) {
return; return;
} }
Map args = new HashMap(); Map args = new HashMap();
args.put("orgao", null); args.put("orgao", null);
args.put("taxaEmbarqueKm", tx); args.put("taxaEmbarqueKm", tx);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList); args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul", openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"), Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL); args, MODAL);
} }
} }

View File

@ -0,0 +1,300 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TaxaEmbLevanteCtrlService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbLevante;
@Controller("editarTaxaEmbLevanteController")
@Scope("prototype")
public class EditarTaxaEmbLevanteController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarTaxaEmbLevanteController.class);
@Autowired
private TaxaEmbLevanteCtrlService taxaEmbLevanteCtrlService;
@Autowired
private RutaService rutaService;
@Autowired
private ParadaService paradaService;
private TaxaEmbLevante taxaEmbLevante;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private MyListbox taxaEmbLevanteCtrlList;
private MyListbox taxaEmbLevanteList;
private List<Ruta> lsRuta;
private Combobox cmbRuta;
private Combobox cmbParadaOrigem;
private List<Parada> lsParadaOrigem;
private Combobox cmbParadaDestino;
private List<Parada> lsParadaDestino;
private List<TaxaEmbLevante> listTaxaLevante;
@Override
public void doAfterCompose(Component comp) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrl");
taxaEmbLevanteCtrlList = (MyListbox) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrlList");
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null)
taxaEmbLevanteCtrl = taxaEmbLevanteCtrlService.obtenerID(taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId());
listTaxaLevante = taxaEmbLevanteCtrl.getTaxaEmbLevanteList();
super.doAfterCompose(comp);
taxaEmbLevanteList.setItemRenderer(new RenderTaxaEmbLevante());
taxaEmbLevanteList.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevante = (TaxaEmbLevante) taxaEmbLevanteList.getSelected();
}
});
taxaEmbLevanteList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevante = (TaxaEmbLevante) taxaEmbLevanteList.getSelected();
itemSelecionado(taxaEmbLevante);
}
});
lsRuta = rutaService.obtenerTodos();
lsParadaOrigem = new ArrayList<Parada>();
lsParadaDestino = new ArrayList<Parada>();
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null) {
Comboitem ci = new Comboitem(taxaEmbLevanteCtrl.getRuta().toString());
ci.setAttribute("value", taxaEmbLevanteCtrl.getRuta());
ci.setValue(taxaEmbLevanteCtrl.getRuta());
ci.setParent(cmbRuta);
cmbRuta.setSelectedItem(ci);
this.selectRuta();
ci = new Comboitem(taxaEmbLevanteCtrl.getOrigem().getDescparada());
ci.setAttribute("value", taxaEmbLevanteCtrl.getOrigem());
ci.setValue(taxaEmbLevanteCtrl.getOrigem());
ci.setParent(cmbParadaOrigem);
cmbParadaOrigem.setSelectedItem(ci);
ci = new Comboitem(taxaEmbLevanteCtrl.getDestino().getDescparada());
ci.setAttribute("value", taxaEmbLevanteCtrl.getDestino());
ci.setValue(taxaEmbLevanteCtrl.getDestino());
ci.setParent(cmbParadaDestino);
cmbParadaDestino.setSelectedItem(ci);
taxaEmbLevanteCtrl = taxaEmbLevanteCtrlService.obtenerID(taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId());
List<TaxaEmbLevante> list = taxaEmbLevanteCtrl.getTaxaEmbLevanteList();
taxaEmbLevanteList.setData(list);
} else {
taxaEmbLevanteList.setData(new ArrayList<TaxaEmbLevante>());
}
}
public void itemSelecionado(TaxaEmbLevante taxa) {
Map args = new HashMap();
args.put("taxaEmbLevante", taxa);
args.put("taxaEmbLevanteList", taxaEmbLevanteList);
args.put("taxaEmbLevanteCtrl", taxaEmbLevanteCtrl);
args.put("listTaxaLevante", listTaxaLevante);
openWindow("/gui/tarifas/editarTaxaEmbLevanteParada.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.editar.window.title"), args, MODAL);
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
if (cmbRuta.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setRuta((Ruta) cmbRuta.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (cmbParadaOrigem.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setOrigem((Parada) cmbParadaOrigem.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (cmbParadaDestino.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setDestino((Parada) cmbParadaDestino.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
taxaEmbLevanteCtrl.setTaxaEmbLevanteList(listTaxaLevante);
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null) {
taxaEmbLevanteCtrlList.removeItem(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlService.actualizacion(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlList.updateItem(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteControllerMSG.suscribirOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} else {
taxaEmbLevanteCtrlService.suscribir(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlList.addItemNovo(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteControllerMSG.suscribirOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
public void onClick$btnApagar(Event ev) throws InterruptedException {
try {
int resp = Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarPergunta"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
taxaEmbLevante.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
taxaEmbLevante.setFecmodif(Calendar.getInstance().getTime());
taxaEmbLevante.setActivo(Boolean.FALSE);
int index = listTaxaLevante.indexOf(taxaEmbLevante);
listTaxaLevante.set(index, taxaEmbLevante);
taxaEmbLevanteList.removeItem(taxaEmbLevante);
}
} catch (Exception ex) {
log.error("Erro apagar pricing : " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnNovo(Event ev) {
this.itemSelecionado(new TaxaEmbLevante());
}
public void onSelect$cmbRuta(Event ev) {
this.selectRuta();
}
public void selectRuta() {
Ruta ruta = (Ruta) cmbRuta.getSelectedItem().getValue();
ruta = rutaService.obtenerID(ruta.getRutaId());
for (RutaSecuencia rutaSecuencia : ruta.getRutaSecuenciaList()) {
lsParadaOrigem.add(rutaSecuencia.getTramo().getOrigem());
lsParadaDestino.add(rutaSecuencia.getTramo().getDestino());
}
lsParadaDestino.add(paradaService.obtenerID(Parada.ID_PARADA_TODOS));
BindingListModel listModelParadaOrigem = new BindingListModelList(lsParadaOrigem, true);
cmbParadaOrigem.setModel(listModelParadaOrigem);
BindingListModel listModelParadaDestino = new BindingListModelList(lsParadaDestino, true);
cmbParadaDestino.setModel(listModelParadaDestino);
}
public List<Ruta> getLsRuta() {
return lsRuta;
}
public void setLsRuta(List<Ruta> lsRuta) {
this.lsRuta = lsRuta;
}
public List<Parada> getLsParadaOrigem() {
return lsParadaOrigem;
}
public void setLsParadaOrigem(List<Parada> lsParadaOrigem) {
this.lsParadaOrigem = lsParadaOrigem;
}
public List<Parada> getLsParadaDestino() {
return lsParadaDestino;
}
public void setLsParadaDestino(List<Parada> lsParadaDestino) {
this.lsParadaDestino = lsParadaDestino;
}
public TaxaEmbLevanteCtrl getTaxaEmbLevanteCtrl() {
return taxaEmbLevanteCtrl;
}
public void setTaxaEmbLevanteCtrl(TaxaEmbLevanteCtrl taxaEmbLevanteCtrl) {
this.taxaEmbLevanteCtrl = taxaEmbLevanteCtrl;
}
public MyListbox getTaxaEmbLevanteCtrlList() {
return taxaEmbLevanteCtrlList;
}
public void setTaxaEmbLevanteCtrlList(MyListbox taxaEmbLevanteCtrlList) {
this.taxaEmbLevanteCtrlList = taxaEmbLevanteCtrlList;
}
public TaxaEmbLevante getTaxaEmbLevante() {
return taxaEmbLevante;
}
public void setTaxaEmbLevante(TaxaEmbLevante taxaEmbLevante) {
this.taxaEmbLevante = taxaEmbLevante;
}
}

View File

@ -0,0 +1,138 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Comboitem;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
@Controller("editarTaxaEmbLevanteParadaController")
@Scope("prototype")
public class EditarTaxaEmbLevanteParadaController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private MyComboboxParada cmbParada;
private MyTextboxDecimal txImporte;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private TaxaEmbLevante taxaEmbLevante;
private MyListbox taxaEmbLevanteList;
private List<TaxaEmbLevante> listTaxaLevante;
@Override
public void doAfterCompose(Component comp) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrl");
taxaEmbLevante = (TaxaEmbLevante) Executions.getCurrent().getArg().get("taxaEmbLevante");
taxaEmbLevanteList = (MyListbox) Executions.getCurrent().getArg().get("taxaEmbLevanteList");
listTaxaLevante = ((List<TaxaEmbLevante>) Executions.getCurrent().getArg().get("listTaxaLevante"));
super.doAfterCompose(comp);
if (taxaEmbLevante.getTaxaEmbLevanteId() != null) {
Comboitem ci = new Comboitem(taxaEmbLevante.getParada().toString());
ci.setAttribute("value", taxaEmbLevante.getParada());
ci.setValue(taxaEmbLevante.getParada());
ci.setParent(cmbParada);
cmbParada.setSelectedItem(ci);
txImporte.setValue(taxaEmbLevante.getImporte().toString());
} else {
txImporte.setValue("0");
}
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
if (cmbParada.getSelectedItem().getValue() != null) {
taxaEmbLevante.setParada((Parada) cmbParada.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (txImporte.getValue() != null) {
taxaEmbLevante.setImporte(NumberUtils.createBigDecimal(txImporte.getValue().replace(",", ".")));
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
taxaEmbLevante.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
taxaEmbLevante.setFecmodif(Calendar.getInstance().getTime());
taxaEmbLevante.setActivo(Boolean.TRUE);
if (taxaEmbLevante.getTaxaEmbLevanteId() != null) {
taxaEmbLevanteList.removeItem(taxaEmbLevante);
int index = listTaxaLevante.indexOf(taxaEmbLevante);
listTaxaLevante.set(index, taxaEmbLevante);
taxaEmbLevanteList.updateItem(taxaEmbLevante);
} else {
boolean existeParada = false;
for (TaxaEmbLevante taxa : listTaxaLevante) {
if (taxa.getParada().equals(taxaEmbLevante.getParada()))
existeParada = true;
}
if (!existeParada) {
taxaEmbLevante.setTaxaEmbLevanteCtrl(taxaEmbLevanteCtrl);
listTaxaLevante.add(taxaEmbLevante);
taxaEmbLevanteList.addItemNovo(taxaEmbLevante);
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
closeWindow();
}
public TaxaEmbLevante getTaxaEmbLevante() {
return taxaEmbLevante;
}
public void setTaxaEmbLevante(TaxaEmbLevante taxaEmbLevante) {
this.taxaEmbLevante = taxaEmbLevante;
}
public MyListbox getTaxaEmbLevanteList() {
return taxaEmbLevanteList;
}
public void setTaxaEmbLevanteList(MyListbox taxaEmbLevanteList) {
this.taxaEmbLevanteList = taxaEmbLevanteList;
}
public TaxaEmbLevanteCtrl getTaxaEmbLevanteCtrl() {
return taxaEmbLevanteCtrl;
}
public void setTaxaEmbLevanteCtrl(TaxaEmbLevanteCtrl taxaEmbLevanteCtrl) {
this.taxaEmbLevanteCtrl = taxaEmbLevanteCtrl;
}
}

View File

@ -4,10 +4,9 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias; package com.rjconsultores.ventaboletos.web.utilerias;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.service.ParadaService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.WrongValueException;
@ -19,126 +18,138 @@ import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zkplus.spring.SpringUtil; import org.zkoss.zkplus.spring.SpringUtil;
import org.zkoss.zul.Combobox; import org.zkoss.zul.Combobox;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.service.ParadaService;
/** /**
* *
* @author Administrador * @author Administrador
*/ */
public class MyComboboxParada extends Combobox { public class MyComboboxParada extends Combobox {
private static Logger log = Logger.getLogger(MyComboboxParada.class); private static final long serialVersionUID = 1L;
public final static int minLength = 2; private static Logger log = Logger.getLogger(MyComboboxParada.class);
private ParadaService paradaService; public final static int minLength = 2;
private List<Parada> lsParadas; private ParadaService paradaService;
private Parada initialValue; private List<Parada> lsParadas;
private Integer indiceSelected = null; private Parada initialValue;
private boolean sinTodos = false; private Integer indiceSelected = null;
private Integer ID_TODOS = -1; private boolean sinTodos = false;
private Integer ID_TODOS = -1;
public MyComboboxParada() { public MyComboboxParada() {
super(); super();
paradaService = (ParadaService) SpringUtil.getBean("paradaService"); paradaService = (ParadaService) SpringUtil.getBean("paradaService");
lsParadas = new ArrayList<Parada>(); lsParadas = new ArrayList<Parada>();
this.setAutodrop(false); this.setAutodrop(false);
this.setAutocomplete(false); this.setAutocomplete(false);
this.addEventListener("onOK", new EventListener() { this.addEventListener("onOK", new EventListener() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
String strParada = MyComboboxParada.this.getText().toUpperCase(); String strParada = MyComboboxParada.this.getText().toUpperCase();
if (strParada.length() < MyComboboxParada.minLength) { if (strParada.length() < MyComboboxParada.minLength) {
return; return;
} }
if (!strParada.isEmpty()) { if (!strParada.isEmpty()) {
lsParadas = paradaService.buscaLike(strParada); lsParadas = paradaService.buscaLike(strParada);
if (sinTodos) { if (sinTodos) {
log.debug("Sin todos"); log.debug("Sin todos");
Parada p = paradaService.obtenerID(ID_TODOS); Parada p = paradaService.obtenerID(ID_TODOS);
lsParadas.remove(p); lsParadas.remove(p);
} }
BindingListModel listModelParada = new BindingListModelList(lsParadas, true); BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada); MyComboboxParada.this.setModel(listModelParada);
indiceSelected = null; setIndiceSelected(null);
if (!lsParadas.isEmpty()) { if (!lsParadas.isEmpty()) {
indiceSelected = 0; setIndiceSelected(0);
} }
MyComboboxParada.this.open(); MyComboboxParada.this.open();
} else { } else {
lsParadas.clear(); lsParadas.clear();
BindingListModel listModelParada = new BindingListModelList(lsParadas, true); BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada); MyComboboxParada.this.setModel(listModelParada);
} }
} }
}); });
this.addEventListener("onChanging", new EventListener() { this.addEventListener("onChanging", new EventListener() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
InputEvent ev = (InputEvent) event; InputEvent ev = (InputEvent) event;
String strParada = ev.getValue(); String strParada = ev.getValue();
if (strParada.length() < 2) { if (strParada.length() < 2) {
lsParadas.clear(); lsParadas.clear();
BindingListModel listModelParada = new BindingListModelList(lsParadas, true); BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada); MyComboboxParada.this.setModel(listModelParada);
MyComboboxParada.this.close(); MyComboboxParada.this.close();
} }
} }
}); });
} }
public Parada getInitialValue() { public Parada getInitialValue() {
return initialValue; return initialValue;
} }
public void setInitialValue(Parada initialValue) { public void setInitialValue(Parada initialValue) {
if (initialValue == null) { if (initialValue == null) {
return; return;
} }
List<Parada> ls = new ArrayList<Parada>(); List<Parada> ls = new ArrayList<Parada>();
ls.add(initialValue); ls.add(initialValue);
this.setModel(new BindingListModelList(ls, false)); this.setModel(new BindingListModelList(ls, false));
this.setText(initialValue.getDescparada()); this.setText(initialValue.getDescparada());
} }
/** /**
* *
* @param checaBusqueda * @param checaBusqueda
* @throws WrongValueException * @throws WrongValueException
*/ */
public String getValue(boolean checaBusqueda) throws WrongValueException { public String getValue(boolean checaBusqueda) throws WrongValueException {
if (checaBusqueda) { if (checaBusqueda) {
if (this.getSelectedItem() == null) { if (this.getSelectedItem() == null) {
throw new WrongValueException(this, Labels.getLabel("MSG.Error.combobox.hacerBusqueda")); throw new WrongValueException(this, Labels.getLabel("MSG.Error.combobox.hacerBusqueda"));
} }
} }
return super.getValue(); return super.getValue();
} }
public boolean isSinTodos() { public boolean isSinTodos() {
return sinTodos; return sinTodos;
} }
public void setSinTodos(boolean sinTodos) { public void setSinTodos(boolean sinTodos) {
this.sinTodos = sinTodos; this.sinTodos = sinTodos;
} }
public void setComboItemByParada(Parada parada) { public void setComboItemByParada(Parada parada) {
List<Parada> ls = new ArrayList<Parada>(); List<Parada> ls = new ArrayList<Parada>();
ls.add(parada); ls.add(parada);
this.setModel(new BindingListModelList(ls, false)); this.setModel(new BindingListModelList(ls, false));
this.setText(parada.getDescparada()); this.setText(parada.getDescparada());
} }
public Integer getIndiceSelected() {
return indiceSelected;
}
public void setIndiceSelected(Integer indiceSelected) {
this.indiceSelected = indiceSelected;
}
} }

View File

@ -5,11 +5,9 @@
package com.rjconsultores.ventaboletos.web.utilerias; package com.rjconsultores.ventaboletos.web.utilerias;
import java.util.Map; import java.util.Map;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Path;
import org.zkoss.zk.ui.UiException;
import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.util.GenericForwardComposer; import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
@ -20,6 +18,7 @@ import org.zkoss.zul.Window;
*/ */
public class MyGenericForwardComposer extends GenericForwardComposer { public class MyGenericForwardComposer extends GenericForwardComposer {
private static final long serialVersionUID = 1L;
public static int OVERLAPPED = PantallaUtileria.OVERLAPPED; public static int OVERLAPPED = PantallaUtileria.OVERLAPPED;
public static int MODAL = PantallaUtileria.MODAL; public static int MODAL = PantallaUtileria.MODAL;
private static Logger log = Logger.getLogger(MyGenericForwardComposer.class); private static Logger log = Logger.getLogger(MyGenericForwardComposer.class);
@ -53,8 +52,8 @@ public class MyGenericForwardComposer extends GenericForwardComposer {
@Override @Override
public boolean doCatch(Throwable ex) throws Exception { public boolean doCatch(Throwable ex) throws Exception {
if (ex instanceof WrongValueException){ if (ex instanceof WrongValueException) {
throw (WrongValueException)ex; throw (WrongValueException) ex;
} }
log.error("Erro ao abrir a janela", ex); log.error("Erro ao abrir a janela", ex);
@ -65,4 +64,5 @@ public class MyGenericForwardComposer extends GenericForwardComposer {
return true; return true;
} }
} }

View File

@ -0,0 +1,25 @@
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial;
import org.zkoss.util.resource.Labels;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
public class ItemMenuTarifasTaxaEmbLevante extends DefaultItemMenuSistema {
public ItemMenuTarifasTaxaEmbLevante() {
super("busquedaTaxaEmbLevanteController.window.title");
}
@Override
public String getClaveMenu() {
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.TAXAEMBLEVANTE";
}
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/tarifas/busquedaTaxaEmbLevante.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"), null, desktop);
}
}

View File

@ -45,212 +45,200 @@ import org.zkoss.zul.event.PagingEvent;
@Scope("prototype") @Scope("prototype")
public class PagedListWrapper<E> implements Serializable { public class PagedListWrapper<E> implements Serializable {
private static final long serialVersionUID = -7399762307122148637L; private static final long serialVersionUID = -7399762307122148637L;
static final Logger logger = Logger.getLogger(PagedListWrapper.class); static final Logger logger = Logger.getLogger(PagedListWrapper.class);
// Service that calls the DAO methods // Service that calls the DAO methods
@Autowired @Autowired
private PagedListService pagedListService; private PagedListService pagedListService;
// param. The listboxes paging component // param. The listboxes paging component
private Paging paging; private Paging paging;
// param. The SearchObject // param. The SearchObject
private HibernateSearchObject<E> hibernateSearchObject; private HibernateSearchObject<E> hibernateSearchObject;
// not used yet. so it's init to 'true'. // not used yet. so it's init to 'true'.
private final boolean supportPaging = true; private final boolean supportPaging = true;
private MyListbox listBox; private MyListbox listBox;
/** /**
* default constructor.<br> * default constructor.<br>
*/ */
public PagedListWrapper() { public PagedListWrapper() {
super(); super();
} }
public void init(HibernateSearchObject<E> hibernateSearchObject1, MyListbox listBox, Paging paging1) { public void init(HibernateSearchObject<E> hibernateSearchObject1, MyListbox listBox, Paging paging1) {
this.listBox = listBox; this.listBox = listBox;
setPaging(paging1); setPaging(paging1);
setListeners(); setListeners();
setSearchObject(hibernateSearchObject1); setSearchObject(hibernateSearchObject1);
} }
private void initModel() { private void initModel() {
getSearchObject().setFirstResult(0); getSearchObject().setFirstResult(0);
getSearchObject().setMaxResults(getPageSize()); getSearchObject().setMaxResults(getPageSize());
SearchResult<E> searchResult = getPagedListService().getSRBySearchObject(getSearchObject());
getPaging().setTotalSize(searchResult.getTotalCount());
listBox.setData(searchResult.getResult());
}
/**
* Refreshes the list by calling the DAO methode with the modified search object. <br>
*
* @param so
* SearchObject, holds the entity and properties to search. <br>
* @param start
* Row to start. <br>
* @param pageSize
* Count rows to fetch. <br>
*/
void refreshModel(int start) {
getSearchObject().setFirstResult(start);
getSearchObject().setMaxResults(getPageSize());
SearchResult<E> searchResult = getPagedListService().getSRBySearchObject(getSearchObject()); listBox.setData(getPagedListService().getBySearchObject(getSearchObject()));
getPaging().setTotalSize(searchResult.getTotalCount()); }
listBox.setData(searchResult.getResult());
}
/** boolean isSupportPagging() {
* Refreshes the list by calling the DAO methode with the modified search return supportPaging;
* object. <br> }
*
* @param so
* SearchObject, holds the entity and properties to search. <br>
* @param start
* Row to start. <br>
* @param pageSize
* Count rows to fetch. <br>
*/
void refreshModel(int start) {
getSearchObject().setFirstResult(start);
getSearchObject().setMaxResults(getPageSize());
public void clearFilters() {
getSearchObject().clearFilters();
initModel();
}
listBox.setData(getPagedListService().getBySearchObject(getSearchObject())); /**
} * Sets the listeners. <br>
* <br>
* 1. "onPaging" for the paging component. <br>
* 2. "onSort" for all listheaders that have a sortDirection declared. <br>
* All not used Listheaders must me declared as: listheader.setSortAscending(""); listheader.setSortDescending(""); <br>
*/
private void setListeners() {
boolean isSupportPagging() { // Add 'onPaging' listener to the paging component
return supportPaging; getPaging().addEventListener("onPaging", new OnPagingEventListener());
}
public void clearFilters() { Listhead listhead = listBox.getListhead();
getSearchObject().clearFilters(); List<?> list = listhead.getChildren();
initModel();
}
/** OnSortEventListener onSortEventListener = new OnSortEventListener();
* Sets the listeners. <br> for (Object object : list) {
* <br> if (object instanceof Listheader) {
* 1. "onPaging" for the paging component. <br> Listheader lheader = (Listheader) object;
* 2. "onSort" for all listheaders that have a sortDirection declared. <br>
* All not used Listheaders must me declared as:
* listheader.setSortAscending(""); listheader.setSortDescending(""); <br>
*/
private void setListeners() {
// Add 'onPaging' listener to the paging component if (lheader.getSortAscending() != null || lheader.getSortDescending() != null) {
getPaging().addEventListener("onPaging", new OnPagingEventListener()); lheader.addEventListener("onSort", onSortEventListener);
}
}
}
}
Listhead listhead = listBox.getListhead(); /**
List<?> list = listhead.getChildren(); * "onPaging" eventlistener for the paging component. <br>
* <br>
* Calculates the next page by currentPage and pageSize values. <br>
* Calls the methode for refreshing the data with the new rowStart and pageSize. <br>
*/
public final class OnPagingEventListener implements EventListener {
OnSortEventListener onSortEventListener = new OnSortEventListener(); @Override
for (Object object : list) { public void onEvent(Event event) throws Exception {
if (object instanceof Listheader) {
Listheader lheader = (Listheader) object;
if (lheader.getSortAscending() != null || lheader.getSortDescending() != null) { PagingEvent pe = (PagingEvent) event;
int pageNo = pe.getActivePage();
int start = pageNo * getPageSize();
// if (logger.isDebugEnabled()) { // if (logger.isDebugEnabled()) {
// logger.debug("--> : " + lheader.getId()); // logger.debug("--> : " + start + "/" + getPageSize());
// } // }
lheader.addEventListener("onSort", onSortEventListener);
}
}
}
}
/** // refresh the list
* "onPaging" eventlistener for the paging component. <br> refreshModel(start);
* <br> }
* Calculates the next page by currentPage and pageSize values. <br> }
* Calls the methode for refreshing the data with the new rowStart and
* pageSize. <br>
*/
public final class OnPagingEventListener implements EventListener {
@Override /**
public void onEvent(Event event) throws Exception { * "onSort" eventlistener for the listheader components. <br>
* <br>
* Checks wich listheader is clicked and checks which orderDirection must be set. <br>
*
* Calls the methode for refreshing the data with the new ordering. and the remembered rowStart and pageSize. <br>
*/
public final class OnSortEventListener implements EventListener, Serializable {
PagingEvent pe = (PagingEvent) event; private static final long serialVersionUID = 1L;
int pageNo = pe.getActivePage();
int start = pageNo * getPageSize();
// if (logger.isDebugEnabled()) { @Override
// logger.debug("--> : " + start + "/" + getPageSize()); public void onEvent(Event event) throws Exception {
// } final Listheader lh = (Listheader) event.getTarget();
final String sortDirection = lh.getSortDirection();
// refresh the list if ("ascending".equals(sortDirection)) {
refreshModel(start); final Comparator<?> cmpr = lh.getSortDescending();
} if (cmpr instanceof FieldComparator) {
} String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "DESC").trim();
/** // update SearchObject with orderBy
* "onSort" eventlistener for the listheader components. <br> getSearchObject().clearSorts();
* <br> getSearchObject().addSort(orderBy, true);
* Checks wich listheader is clicked and checks which orderDirection must be }
* set. <br> } else if ("descending".equals(sortDirection) || "natural".equals(sortDirection) || Strings.isBlank(sortDirection)) {
* final Comparator<?> cmpr = lh.getSortAscending();
* Calls the methode for refreshing the data with the new ordering. and the if (cmpr instanceof FieldComparator) {
* remembered rowStart and pageSize. <br> String orderBy = ((FieldComparator) cmpr).getOrderBy();
*/ orderBy = StringUtils.substringBefore(orderBy, "ASC").trim();
public final class OnSortEventListener implements EventListener, Serializable {
private static final long serialVersionUID = 1L; // update SearchObject with orderBy
getSearchObject().clearSorts();
getSearchObject().addSort(orderBy, false);
}
}
@Override // if (logger.isDebugEnabled()) {
public void onEvent(Event event) throws Exception { // logger.debug("--> : " + lh.getId() + "/" + sortDirection);
final Listheader lh = (Listheader) event.getTarget(); // logger.debug("--> added getSorts() : " + getSearchObject().getSorts().toString());
final String sortDirection = lh.getSortDirection(); // }
if ("ascending".equals(sortDirection)) { if (isSupportPagging()) {
final Comparator<?> cmpr = lh.getSortDescending(); // refresh the list
if (cmpr instanceof FieldComparator) { getPaging().setActivePage(0);
String orderBy = ((FieldComparator) cmpr).getOrderBy(); refreshModel(0);
orderBy = StringUtils.substringBefore(orderBy, "DESC").trim(); }
}
}
// update SearchObject with orderBy public PagedListService getPagedListService() {
getSearchObject().clearSorts(); return pagedListService;
getSearchObject().addSort(orderBy, true); }
}
} else if ("descending".equals(sortDirection) || "natural".equals(sortDirection) || Strings.isBlank(sortDirection)) {
final Comparator<?> cmpr = lh.getSortAscending();
if (cmpr instanceof FieldComparator) {
String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "ASC").trim();
// update SearchObject with orderBy // ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
getSearchObject().clearSorts(); // ++++++++++++++++++ getter / setter +++++++++++++++++++//
getSearchObject().addSort(orderBy, false); // ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
} HibernateSearchObject<E> getSearchObject() {
} return hibernateSearchObject;
}
// if (logger.isDebugEnabled()) { public int getPageSize() {
// logger.debug("--> : " + lh.getId() + "/" + sortDirection); return getPaging().getPageSize();
// logger.debug("--> added getSorts() : " + getSearchObject().getSorts().toString()); }
// }
if (isSupportPagging()) { Paging getPaging() {
// refresh the list return paging;
getPaging().setActivePage(0); }
refreshModel(0);
}
}
}
public PagedListService getPagedListService() { public void setPagedListService(PagedListService pagedListService) {
return pagedListService; this.pagedListService = pagedListService;
} }
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++// private void setPaging(Paging paging) {
// ++++++++++++++++++ getter / setter +++++++++++++++++++// this.paging = paging;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++// }
HibernateSearchObject<E> getSearchObject() {
return hibernateSearchObject;
}
public int getPageSize() { public void setSearchObject(HibernateSearchObject<E> hibernateSearchObject1) {
return getPaging().getPageSize(); this.hibernateSearchObject = hibernateSearchObject1;
} initModel();
}
Paging getPaging() {
return paging;
}
public void setPagedListService(PagedListService pagedListService) {
this.pagedListService = pagedListService;
}
private void setPaging(Paging paging) {
this.paging = paging;
}
public void setSearchObject(HibernateSearchObject<E> hibernateSearchObject1) {
this.hibernateSearchObject = hibernateSearchObject1;
initModel();
}
} }

View File

@ -0,0 +1,34 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
public class RenderPricingFormaPago implements ListitemRenderer {
@Override
public void render(Listitem lstm, Object o) throws Exception {
PricingFormapago ppg = (PricingFormapago) o;
Listcell lc = new Listcell();
lc = new Listcell(ppg.getFormaPago().getDescpago());
lc.setParent(lstm);
Checkbox ckbIndexcepcion = new Checkbox();
if (ppg.getIndexcepcion()) {
ckbIndexcepcion.setChecked(true);
} else {
ckbIndexcepcion.setChecked(false);
}
ckbIndexcepcion.setDisabled(true);
lc = new Listcell();
ckbIndexcepcion.setParent(lc);
lc.setParent(lstm);
lstm.setAttribute("data", ppg);
}
}

View File

@ -0,0 +1,26 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.text.DecimalFormat;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
public class RenderTaxaEmbLevante implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
TaxaEmbLevante t = (TaxaEmbLevante) o;
Listcell lc = new Listcell(t.getParada().getDescparada());
lc.setParent(lstm);
DecimalFormat fmt = new DecimalFormat("#,##00.00");
lc = new Listcell(fmt.format(t.getImporte()) != null ? fmt.format(t.getImporte()) : "");
lc.setParent(lstm);
lstm.setAttribute("data", t);
}
}

View File

@ -0,0 +1,30 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
public class RenderTaxaEmbLevanteCtrl implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
TaxaEmbLevanteCtrl t = (TaxaEmbLevanteCtrl) o;
Listcell lc = new Listcell(t.getTaxaEmbLevanteCtrlId().toString());
lc.setParent(lstm);
lc = new Listcell(t.getRuta().getDescruta());
lc.setParent(lstm);
lc = new Listcell(t.getOrigem().getDescparada());
lc.setParent(lstm);
lc = new Listcell(t.getDestino().getDescparada());
lc.setParent(lstm);
lstm.setAttribute("data", t);
}
}

View File

@ -22,6 +22,14 @@
<property name="annotatedClasses"> <property name="annotatedClasses">
<list> <list>
<value>com.rjconsultores.ventaboletos.entidad.AbastoBoleto</value>
<value>com.rjconsultores.ventaboletos.entidad.Clasificacion</value>
<value>com.rjconsultores.ventaboletos.entidad.DetAbastoBoleto
</value>
<value>com.rjconsultores.ventaboletos.entidad.FolioPreimpreso
</value>
<value>com.rjconsultores.ventaboletos.entidad.RequisicionBoleto
</value>
<value>com.rjconsultores.ventaboletos.entidad.ClienteFidelidad <value>com.rjconsultores.ventaboletos.entidad.ClienteFidelidad
</value> </value>
<value>com.rjconsultores.ventaboletos.entidad.EstacionImpresora <value>com.rjconsultores.ventaboletos.entidad.EstacionImpresora
@ -164,6 +172,8 @@
</value> </value>
<value>com.rjconsultores.ventaboletos.entidad.Plaza</value> <value>com.rjconsultores.ventaboletos.entidad.Plaza</value>
<value>com.rjconsultores.ventaboletos.entidad.Pricing</value> <value>com.rjconsultores.ventaboletos.entidad.Pricing</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingFormapago
</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingImporte</value> <value>com.rjconsultores.ventaboletos.entidad.PricingImporte</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingVigencia <value>com.rjconsultores.ventaboletos.entidad.PricingVigencia
</value> </value>
@ -244,6 +254,9 @@
<value>com.rjconsultores.ventaboletos.entidad.SeguroTarifa</value> <value>com.rjconsultores.ventaboletos.entidad.SeguroTarifa</value>
<value>com.rjconsultores.ventaboletos.entidad.Sistema</value> <value>com.rjconsultores.ventaboletos.entidad.Sistema</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm</value> <value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl
</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada <value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada
</value> </value>
<value>com.rjconsultores.ventaboletos.entidad.TarjetaFidelidad <value>com.rjconsultores.ventaboletos.entidad.TarjetaFidelidad

View File

@ -1 +1,2 @@
ADM_20131202_1RC269 ADM_20131030_1RC260
ADM_20131202_1RC274

View File

@ -1,4 +1,4 @@
# V. 1.4 ]# V. 1.4
# Para alterar esta planilha, seleccione Ferramentas | Planilhas # Para alterar esta planilha, seleccione Ferramentas | Planilhas
# E abrir a planilha no editor. # E abrir a planilha no editor.
@ -203,7 +203,7 @@ indexController.mniPtovtaEmpresa.label = Punto de venta empresa
indexController.mniConfRestricaoCanalVenta.label = Bloqueo de tramos por canal de venta indexController.mniConfRestricaoCanalVenta.label = Bloqueo de tramos por canal de venta
indexController.mniSelecionarServicosGerar.label = Seleccionar corridas a generar indexController.mniSelecionarServicosGerar.label = Seleccionar corridas a generar
indexController.mniOrgaoConcedente.label = Instituición concedente indexController.mniOrgaoConcedente.label = Instituición concedente
indexController.mniCoeficienteTarifa.label = Índice tarifario indexController.mniCoeficienteTarifa.label = Ã?ndice tarifario
indexController.mniGenerarTarifaOrgao.label= Generar/Actualizar tarifa oficial indexController.mniGenerarTarifaOrgao.label= Generar/Actualizar tarifa oficial
indexController.mniCopiarTarifaOficial.label= Copiar tarifa oficial indexController.mniCopiarTarifaOficial.label= Copiar tarifa oficial
indexController.mniConfigLayoutImpressaoBoleto.label = Config layout impresión pasaje indexController.mniConfigLayoutImpressaoBoleto.label = Config layout impresión pasaje
@ -1397,11 +1397,11 @@ editarTramosController.btnApagarExcepcioneKm.tooltiptext = Eliminar
editarTramosController.btnSalvarExceptioneKm.tooltiptext = Guardar tramo Km editarTramosController.btnSalvarExceptioneKm.tooltiptext = Guardar tramo Km
editarTramosController.MSG.selecioneTramoKm = Seleccione una excepción de Km editarTramosController.MSG.selecioneTramoKm = Seleccione una excepción de Km
editarTramosController.MSG.borrarTramoKm = Elimina excepción de Km? editarTramosController.MSG.borrarTramoKm = Elimina excepción de Km?
editarTramosController.labelCoeficiente1.value = Índice 1 editarTramosController.labelCoeficiente1.value = Ã?ndice 1
editarTramosController.labelKMCoeficiente1.value = KM 1 editarTramosController.labelKMCoeficiente1.value = KM 1
editarTramosController.labelCoeficiente2.value = Índice 2 editarTramosController.labelCoeficiente2.value = Ã?ndice 2
editarTramosController.labelKMCoeficiente2.value = KM 2 editarTramosController.labelKMCoeficiente2.value = KM 2
editarTramosController.labelCoeficiente3.value = Índice 3 editarTramosController.labelCoeficiente3.value = Ã?ndice 3
editarTramosController.labelKMCoeficiente3.value = KM 3 editarTramosController.labelKMCoeficiente3.value = KM 3
editarTramosController.labelOrgaoConcedente.value = Instituición concedente editarTramosController.labelOrgaoConcedente.value = Instituición concedente
editarTramosController.labelClase.value = Clase de servicio editarTramosController.labelClase.value = Clase de servicio
@ -1509,6 +1509,7 @@ editarConfiguracionCorridaController.MSG.Clase = Necesitas informar un tipo de c
editarConfiguracionCorridaController.MSG.Clase2 = Necesitas informar un tipo de clase para piso extra editarConfiguracionCorridaController.MSG.Clase2 = Necesitas informar un tipo de clase para piso extra
editarConfiguracionCorridaController.MSG.Marca = Necesitas informar una marca editarConfiguracionCorridaController.MSG.Marca = Necesitas informar una marca
editarConfiguracionCorridaController.MSG.Ruta = Necesitas informar una linea editarConfiguracionCorridaController.MSG.Ruta = Necesitas informar una linea
editarConfiguracionCorridaController.cmbId.value = Id
editarConfiguracionCorridaController.MSG.Empresa = Necesitas informar una empresa servicio editarConfiguracionCorridaController.MSG.Empresa = Necesitas informar una empresa servicio
editarConfiguracionCorridaController.MSG.Empresa1 = Necesitas informar una empresa ingresso editarConfiguracionCorridaController.MSG.Empresa1 = Necesitas informar una empresa ingresso
editarConfiguracionCorridaController.MSG.Rol = Necesitas informar un rol operativo editarConfiguracionCorridaController.MSG.Rol = Necesitas informar un rol operativo
@ -1952,6 +1953,7 @@ editarPricingController.windowImporte.title = Valor
editarPricingController.windowMarca.title = Marca editarPricingController.windowMarca.title = Marca
editarPricingController.windowClase.title = Tipo clase editarPricingController.windowClase.title = Tipo clase
editarPricingController.windowTipoServicio.title = Tipo clase editarPricingController.windowTipoServicio.title = Tipo clase
editarPricingController.windowFormaPago.title = Forma de Pago
editarPricingController.windowPuntoVenta.title = Punto de venta editarPricingController.windowPuntoVenta.title = Punto de venta
editarPricingController.windowTipoPtoVta.title = Canal venta editarPricingController.windowTipoPtoVta.title = Canal venta
editarPricingController.windowCategoria.title = Tipo pasajero editarPricingController.windowCategoria.title = Tipo pasajero
@ -1981,7 +1983,7 @@ editarPricingController.tabCor.label = Corridas
editarPricingController.tabAsi.label = Asientos editarPricingController.tabAsi.label = Asientos
editarPricingController.tabOcu.label = Ocupación editarPricingController.tabOcu.label = Ocupación
editarPricingController.tabAnti.label = Anticipación editarPricingController.tabAnti.label = Anticipación
editarPricingController.tabTipo.label = Tipo Servicio editarPricingController.tabTipo.label = Tipo Servicio/Forma de Pago
editarPricingController.lhEmpresa.label = Empresa editarPricingController.lhEmpresa.label = Empresa
editarPricingController.lhNome.label = Nombre Pricing editarPricingController.lhNome.label = Nombre Pricing
editarPricingController.lhCantidad.label = Cantidad asientos por servicio editarPricingController.lhCantidad.label = Cantidad asientos por servicio
@ -2055,6 +2057,7 @@ editarPricingController.MSG.borrarPerguntaOcupacion = Deseas eliminar la ocupaci
editarPricingController.MSG.borrarPerguntaAsiento = Deseas eliminar el asiento? editarPricingController.MSG.borrarPerguntaAsiento = Deseas eliminar el asiento?
editarPricingController.MSG.borrarPerguntaAnticipacion = Deseas eliminar anticipación? editarPricingController.MSG.borrarPerguntaAnticipacion = Deseas eliminar anticipación?
editarPricingController.MSG.borrarPerguntaTipoServicio = Deseas eliminar tipo servicio? editarPricingController.MSG.borrarPerguntaTipoServicio = Deseas eliminar tipo servicio?
editarPricingController.MSG.borrarPerguntaFormaPago = Deseas eliminar forma de pago?
editarPricingController.MSG.categoriaExiste = Registro duplicado editarPricingController.MSG.categoriaExiste = Registro duplicado
editarPricingController.MSG.rutaExiste = Registro duplicado editarPricingController.MSG.rutaExiste = Registro duplicado
editarPricingController.MSG.mercadoExiste = Registro duplicado editarPricingController.MSG.mercadoExiste = Registro duplicado
@ -2135,8 +2138,10 @@ editarPricingController.MSG.traslapa = Hora informada se traslapa con otra ya ex
editarPricingController.anticipacionMin.value = Cantidad dias mínimo editarPricingController.anticipacionMin.value = Cantidad dias mínimo
editarPricingController.anticipacionMax.value = Cantidad dias máximo editarPricingController.anticipacionMax.value = Cantidad dias máximo
editarPricingController.tipoServicio.value = Tipo Servicio editarPricingController.tipoServicio.value = Tipo Servicio
editarPricingController.formaPago.value = Forma de Pago
editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica feriado fecha venta editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica feriado fecha venta
editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica feriado fecha viaje editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica feriado fecha viaje
editarPricingFormapagoController.lblIndexcepcion = Se Excluye
# Búsqueda Sistema # Búsqueda Sistema
busquedaSistemaController.window.title = Sistema busquedaSistemaController.window.title = Sistema
@ -3688,8 +3693,8 @@ gridRutaSecuencia.paradaExisteException.msg=la parada {0} ya existe
gridRutaSecuencia.msg.eliminarPaso=Eliminar parada gridRutaSecuencia.msg.eliminarPaso=Eliminar parada
gridRutaSecuencia.msg.agregarDespues=Incluir después gridRutaSecuencia.msg.agregarDespues=Incluir después
gridRutaSecuencia.columnNumLinha.label = Nº linea gridRutaSecuencia.columnNumLinha.label = Nº linea
gridRutaSecuencia.columnCoeficiente1.label = Índice 1 gridRutaSecuencia.columnCoeficiente1.label = Ã?ndice 1
gridRutaSecuencia.columnCoeficiente2.label = Índice 2 gridRutaSecuencia.columnCoeficiente2.label = Ã?ndice 2
gridRutaSecuencia.columnKmCoeficiente2.label = Km 2 gridRutaSecuencia.columnKmCoeficiente2.label = Km 2
gridRutaSecuencia.columnKmCoeficiente1.label = Km 1 gridRutaSecuencia.columnKmCoeficiente1.label = Km 1
#TramoRutaServiceImpl #TramoRutaServiceImpl
@ -3983,30 +3988,26 @@ editarOrgaoConcedenteController.MSG.borrarPergunta = Deseas eliminar instituici
editarOrgaoConcedenteController.MSG.borrarOK = Instituición concedente se eliminó existosamente editarOrgaoConcedenteController.MSG.borrarOK = Instituición concedente se eliminó existosamente
# Busqueda Índice Tarifa # Busqueda Ã?ndice Tarifa
busquedaCoeficienteTarifaController.window.title = Índice tarifario busquedaCoeficienteTarifaController.window.title = Ã?ndice tarifario
busquedaCoeficienteTarifaController.btnRefresh.tooltiptext = Actualizar busquedaCoeficienteTarifaController.btnRefresh.tooltiptext = Actualizar
busquedaCoeficienteTarifaController.btnNovo.tooltiptext = Nuevo busquedaCoeficienteTarifaController.btnNovo.tooltiptext = Nuevo
busquedaCoeficienteTarifaController.btnCerrar.tooltiptext = Cerrar busquedaCoeficienteTarifaController.btnCerrar.tooltiptext = Cerrar
busquedaCoeficienteTarifaController.nome.label = Nombre busquedaCoeficienteTarifaController.nome.label = Nombre
busquedaCoeficienteTarifaController.btnPesquisa.label = Buscar busquedaCoeficienteTarifaController.btnPesquisa.label = Buscar
busquedaCoeficienteTarifaController.coeficien.label = Índice busquedaCoeficienteTarifaController.coeficien.label = Ã?ndice
<<<<<<< .mine
# Editar Ã<>ndice Tarifa # Editar Ã?ndice Tarifa
editarCoeficienteTarifaController.window.title = Índice tarifario editarCoeficienteTarifaController.window.title = Ã?ndice tarifario
=======
# Editar Índice Tarifa
editarCoeficienteTarifaController.window.title = Índice tarifario
>>>>>>> .r31878
editarCoeficienteTarifaController.btnApagar.tooltiptext = Eliminar editarCoeficienteTarifaController.btnApagar.tooltiptext = Eliminar
editarCoeficienteTarifaController.coeficiente.value = Índice editarCoeficienteTarifaController.coeficiente.value = Ã?ndice
editarCoeficienteTarifaController.btnSalvar.tooltiptext = Guardar editarCoeficienteTarifaController.btnSalvar.tooltiptext = Guardar
editarCoeficienteTarifaController.btnFechar.tooltiptext = Cerrar editarCoeficienteTarifaController.btnFechar.tooltiptext = Cerrar
editarCoeficienteTarifaController.lbNome.value = Nombre editarCoeficienteTarifaController.lbNome.value = Nombre
editarCoeficienteTarifaController.MSG.suscribirOK = Índice tarifario se registró existosamente editarCoeficienteTarifaController.MSG.suscribirOK = Ã?ndice tarifario se registró existosamente
editarCoeficienteTarifaController.MSG.borrarPergunta = Deseas elminar índice tarifario? editarCoeficienteTarifaController.MSG.borrarPergunta = Deseas elminar índice tarifario?
editarCoeficienteTarifaController.MSG.borrarOK = Índice tarifario se eliminó existosamente editarCoeficienteTarifaController.MSG.borrarOK = Ã?ndice tarifario se eliminó existosamente
#Generar Tarifa #Generar Tarifa
generarTarifaOrgaoController.MSG.suscribirOK=Operación se realizó existosamente generarTarifaOrgaoController.MSG.suscribirOK=Operación se realizó existosamente
@ -4035,6 +4036,16 @@ busquedaTaxaEmbarqueKmController.btnCerrar.tooltiptext = Cerrar
busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descripción busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descripción
busquedaTaxaEmbarqueKmController.orgao = Instituición busquedaTaxaEmbarqueKmController.orgao = Instituición
# Búsqueda TaxaEmbLevante
busquedaTaxaEmbLevanteController.window.title = Tasa por levante de embarque
busquedaTaxaEmbLevanteController.labelParada.value = Levante de embarque
busquedaTaxaEmbLevanteController.labelImporte.value = Importe
busquedaTaxaEmbLevanteController.editar.window.title = Editar Tasa por levante de embarque
busquedaTaxaEmbLevanteController.btnNovo.tooltiptext = Incluir nuevo levante de embarque
busquedaTaxaEmbLevanteControllerMSG.suscribirOK = Configuração de Taxa Por Local de Embarque Registrada com Sucesso.
busquedaTaxaEmbLevanteController.MSG.borrarPergunta = Deseja Eliminar configuração de Taxa de Local de Embarque?
busquedaTaxaEmbLevanteController.MSG.borrarOK = Configuração de Taxa Por Local de Embarque Excluida com Sucesso.
# Editar TaxaEmbarqueKm # Editar TaxaEmbarqueKm
editarTaxaEmbarqueKmController.window.title = Tasa de embarque por KM editarTaxaEmbarqueKmController.window.title = Tasa de embarque por KM
editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar

View File

@ -1508,6 +1508,7 @@ editarConfiguracionCorridaController.cmbClase2.value = Tipo classe Doble Piso
editarConfiguracionCorridaController.doblePiso.value = Doble Piso editarConfiguracionCorridaController.doblePiso.value = Doble Piso
editarConfiguracionCorridaController.cmbMarca.value = Marca editarConfiguracionCorridaController.cmbMarca.value = Marca
editarConfiguracionCorridaController.cmbRuta.value = Linha editarConfiguracionCorridaController.cmbRuta.value = Linha
editarConfiguracionCorridaController.cmbId.value = Id
editarConfiguracionCorridaController.cmbEmpresaCorrida.value = Empresa Serviço editarConfiguracionCorridaController.cmbEmpresaCorrida.value = Empresa Serviço
editarConfiguracionCorridaController.cmbEmpresaIngresso.value = Empresa Ingresso editarConfiguracionCorridaController.cmbEmpresaIngresso.value = Empresa Ingresso
editarConfiguracionCorridaController.cmbEmpresaRolOperativo.value = Rol Operativo editarConfiguracionCorridaController.cmbEmpresaRolOperativo.value = Rol Operativo
@ -1984,6 +1985,7 @@ editarPricingController.windowImporte.title = Valor
editarPricingController.windowMarca.title = Marca editarPricingController.windowMarca.title = Marca
editarPricingController.windowClase.title = Tipo Classe editarPricingController.windowClase.title = Tipo Classe
editarPricingController.windowTipoServicio.title = Tipo Classe editarPricingController.windowTipoServicio.title = Tipo Classe
editarPricingController.windowFormaPago.title = Forma de Pagamento
editarPricingController.windowPuntoVenta.title = Ponto Venda editarPricingController.windowPuntoVenta.title = Ponto Venda
editarPricingController.windowTipoPtoVta.title = Canal Venda editarPricingController.windowTipoPtoVta.title = Canal Venda
editarPricingController.windowCategoria.title = Tipo passageiro editarPricingController.windowCategoria.title = Tipo passageiro
@ -2014,7 +2016,7 @@ editarPricingController.tabCor.label = Serviços
editarPricingController.tabAsi.label = Poltronas editarPricingController.tabAsi.label = Poltronas
editarPricingController.tabOcu.label = Ocupação/Antecipação editarPricingController.tabOcu.label = Ocupação/Antecipação
editarPricingController.tabAnti.label = Antecipação editarPricingController.tabAnti.label = Antecipação
editarPricingController.tabTipo.label = Tipo Corrida editarPricingController.tabTipo.label = Tipo Corrida/Forma de Pagamento
editarPricingController.lhEmpresa.label = Empresa editarPricingController.lhEmpresa.label = Empresa
editarPricingController.lhNome.label = Nome Pricing editarPricingController.lhNome.label = Nome Pricing
editarPricingController.lhCantidad.label = Quantidade poltronas por serviço editarPricingController.lhCantidad.label = Quantidade poltronas por serviço
@ -2092,6 +2094,7 @@ editarPricingController.MSG.borrarPerguntaOcupacion = Deseja Eliminar a Ocupaç
editarPricingController.MSG.borrarPerguntaAsiento = Deseja Eliminar a Poltrona? editarPricingController.MSG.borrarPerguntaAsiento = Deseja Eliminar a Poltrona?
editarPricingController.MSG.borrarPerguntaAnticipacion = Deseja Eliminar Antecipação? editarPricingController.MSG.borrarPerguntaAnticipacion = Deseja Eliminar Antecipação?
editarPricingController.MSG.borrarPerguntaTipoServicio = Deseja Eliminar Tipo corrida? editarPricingController.MSG.borrarPerguntaTipoServicio = Deseja Eliminar Tipo corrida?
editarPricingController.MSG.borrarPerguntaFormaPago = Deseja Eliminar Forma de Pagamento?
editarPricingController.MSG.categoriaExiste = Registro Duplicado. editarPricingController.MSG.categoriaExiste = Registro Duplicado.
editarPricingController.MSG.rutaExiste = Registro Duplicado. editarPricingController.MSG.rutaExiste = Registro Duplicado.
editarPricingController.MSG.mercadoExiste = Registro Duplicado. editarPricingController.MSG.mercadoExiste = Registro Duplicado.
@ -2182,8 +2185,10 @@ editarPricingController.MSG.traslapa = Hora informada se sobrepõe com outra já
editarPricingController.anticipacionMin.value = Qtd. dias mínimo editarPricingController.anticipacionMin.value = Qtd. dias mínimo
editarPricingController.anticipacionMax.value = Qtd. dias máximo editarPricingController.anticipacionMax.value = Qtd. dias máximo
editarPricingController.tipoServicio.value = Tipo Corrida editarPricingController.tipoServicio.value = Tipo Corrida
editarPricingController.formaPago.value = Forma de Pagamento
editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica Feriado Data Venda editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica Feriado Data Venda
editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica Feriado Data Viagem editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica Feriado Data Viagem
editarPricingFormapagoController.lblIndexcepcion = Se Remove
# Pesquisa Sistema # Pesquisa Sistema
busquedaSistemaController.window.title = Sistema busquedaSistemaController.window.title = Sistema
@ -4077,6 +4082,16 @@ busquedaTaxaEmbarqueKmController.btnCerrar.tooltiptext = Fechar
busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descrição busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descrição
busquedaTaxaEmbarqueKmController.orgao = Orgão busquedaTaxaEmbarqueKmController.orgao = Orgão
# Pesquisa TaxaEmbLevante
busquedaTaxaEmbLevanteController.window.title = Taxa Por Local de Embarque
busquedaTaxaEmbLevanteController.labelParada.value = Local de Embarque
busquedaTaxaEmbLevanteController.labelImporte.value = Valor
busquedaTaxaEmbLevanteController.editar.window.title = Editar Taxa Por Local de Embarque
busquedaTaxaEmbLevanteController.btnNovo.tooltiptext = Incluir Novo Local de Embarque
busquedaTaxaEmbLevanteControllerMSG.suscribirOK = Configuração de Taxa Por Local de Embarque Registrada com Sucesso.
busquedaTaxaEmbLevanteController.MSG.borrarPergunta = Deseja Eliminar configuração de Taxa de Local de Embarque?
busquedaTaxaEmbLevanteController.MSG.borrarOK = Configuração de Taxa Por Local de Embarque Excluida com Sucesso.
# Editar TaxaEmbarqueKm # Editar TaxaEmbarqueKm
editarTaxaEmbarqueKmController.window.title = Taxa de Embarque Km editarTaxaEmbarqueKmController.window.title = Taxa de Embarque Km
editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar

View File

@ -20,7 +20,7 @@
<row spans="2,1"> <row spans="2,1">
<label <label
value="${c:l('atualizarCorridaFecHusoFecVeranoController.window.text')}" /> value="${c:l('atualizarCorridaFecHusoFecVeranoController.window.text')}" />
</row> </row>
<row> <row>
@ -40,7 +40,8 @@
model="@{winAtualizaCorridaHusoVerano$composer.lsEstados}" /> model="@{winAtualizaCorridaHusoVerano$composer.lsEstados}" />
</row> </row>
<row> <row>
<label value="${c:l('atualizaCorridaFecHusoFecVerano.numcorrida')}" /> <label
value="${c:l('atualizaCorridaFecHusoFecVerano.numcorrida')}" />
<intbox id="ibxCorridaId" /> <intbox id="ibxCorridaId" />
</row> </row>
</rows> </rows>

View File

@ -752,7 +752,7 @@
</grid> </grid>
</tabpanel> </tabpanel>
<!-- TipoServicio --> <!-- TipoServicio Formapago -->
<tabpanel> <tabpanel>
<grid fixedLayout="false"> <grid fixedLayout="false">
<columns> <columns>
@ -782,7 +782,7 @@
<listbox <listbox
id="pricingTipoServicioList" id="pricingTipoServicioList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" height="370px"> multiple="false" height="170px">
<listhead sizable="true"> <listhead sizable="true">
<listheader <listheader
image="/gui/img/create_doc.gif" sort="auto(tipoServicio)" image="/gui/img/create_doc.gif" sort="auto(tipoServicio)"
@ -791,10 +791,49 @@
</listhead> </listhead>
</listbox> </listbox>
</vbox> </vbox>
</row>
<row valign="top">
<vbox height="150px" width="100%">
<toolbar>
<hbox spacing="5px"
style="padding:1px" align="right">
<label
value="Forma de Pagamento: " />
<button
id="btnNovoFormaPago" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnNovoTipoServicio.tooltiptext')}" />
<button
id="btnApagarFormaPago" height="6"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
<button
id="btnModificarFormaPago"
label="${c:l('editarPricingController.btnModificar.value')}" />
</hbox>
</toolbar>
<listbox id="pricingFormapagoList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" height="170px">
<listhead sizable="true">
<listheader
image="/gui/img/create_doc.gif" sort="auto(formaPago)"
align="left"
label="${c:l('editarPricingController.formaPago.value')}" />
<listheader
image="/gui/img/create_doc.gif" sort="auto(indexcepcion)"
label="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
</listhead>
</listbox>
</vbox>
</row> </row>
</rows> </rows>
</grid> </grid>
</tabpanel> </tabpanel>
</tabpanels> </tabpanels>
</tabbox> </tabbox>
</window> </window>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPricingFormapago"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarPricingFormapago" border="normal" width="550px"
contentStyle="overflow:auto"
apply="${editarPricingFormapagoController}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnAdicionarFormaPago" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarPricingFormapago.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="50%" />
<column width="50%" />
</columns>
<rows>
<row>
<label id="lblIndexcepcion"
value="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
<radiogroup id="radioIndexcepcion">
<hbox>
<radio id="si"
label="${c:l('editarConfiguracionGeneralController.RadSi.value')}" />
<radio id="no"
label="${c:l('editarConfiguracionGeneralController.RadNo.value')}" />
</hbox>
</radiogroup>
</row>
<row>
<label id="lblFormaPago"
value="${c:l('busquedaRestriccionFormaPagoController.FormaPago')}" />
<combobox id="cmbFormaPago" width="90%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true"
model="@{winEditarPricingFormapago$composer.lsFormaPago}"
selectedItem="@{winEditarPricingFormapago$composer.pricingFormapago.formaPago}" />
</row>
</rows>
</grid>
</window>
</zk>

View File

@ -193,7 +193,7 @@
<label <label
value="${c:l('busquedaEstacionController.nomeImpressora.label')}" /> value="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<textbox id="txtNomImpressoara" <textbox id="txtNomImpressoara"
width="90%" maxlength="20" /> width="90%" maxlength="40" />
</row> </row>
<row> <row>
<label <label

View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaTaxaEmbLevante"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaTaxaEmbLevante"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${busquedaTaxaEmbLevanteController}"
contentStyle="overflow:auto" width="700px" height="355px"
border="normal">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnNovo.tooltiptext')}" />
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaTaxaEmbLevante.detach()"
image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
<combobox id="cmbRuta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsRuta}" />
</row>
<row>
<label
value="${c:l('editarTramosController.labelOrigen.value')}" />
<combobox id="cmbParadaOrigem"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsParadaOrigem}" />
<label
value="${c:l('editarTramosController.labelDestino.value')}" />
<combobox id="cmbParadaDestino"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsParadaDestino}" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaConfiguracionCorridaController.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingTaxaEmbLevanteCtrl" pageSize="20" />
<listbox id="taxaEmbLevanteCtrlList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" vflex="true" height="50%">
<listhead sizable="true">
<listheader width="10%" image="/gui/img/builder.gif"
label="${c:l('editarConfiguracionCorridaController.cmbId.value')}"
sort="auto(taxaEmbLevanteCtrlId)" />
<listheader width="45%" image="/gui/img/builder.gif"
label="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}"
sort="auto(ruta.descruta)" />
<listheader width="25%" image="/gui/img/builder.gif"
label="${c:l('editarTramosController.labelOrigen.value')}"
sort="auto(origem.descparada)" />
<listheader width="25%" image="/gui/img/builder.gif"
label="${c:l('editarTramosController.labelDestino.value')}"
sort="auto(destino.descparada)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarTaxaEmbLevante"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarTaxaEmbLevante"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${editarTaxaEmbLevanteController}" contentStyle="overflow:auto"
width="700px" height="350px" border="normal">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnSalvar" height="20"
autodisable="btnSalvar" image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<separator orient="vertical" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarTaxaEmbLevante.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
<combobox id="cmbRuta" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsRuta}" />
</row>
<row>
<label
value="${c:l('editarTramosController.labelOrigen.value')}" />
<combobox id="cmbParadaOrigem" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsParadaOrigem}" />
<label
value="${c:l('editarTramosController.labelDestino.value')}" />
<combobox id="cmbParadaDestino"
constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsParadaDestino}" />
</row>
</rows>
</grid>
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnNovo" image="/gui/img/add.png"
width="35px"
tooltiptext="${c:l('busquedaTaxaEmbLevanteController.btnNovo.tooltiptext')}" />
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
</hbox>
</toolbar>
<paging id="pagingTaxaEmbLevante" pageSize="20" />
<listbox id="taxaEmbLevanteList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" vflex="true" height="50%">
<listhead sizable="true">
<listheader width="70%" image="/gui/img/builder.gif"
label="${c:l('busquedaTaxaEmbLevanteController.labelParada.value')}"
sort="auto(parada.descparada)" />
<listheader width="30%" image="/gui/img/builder.gif"
label="${c:l('busquedaTaxaEmbLevanteController.labelImporte.value')}"
sort="auto(importe)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarTaxaEmbLevanteParada"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarTaxaEmbLevanteParada"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${editarTaxaEmbLevanteParadaController}"
contentStyle="overflow:auto" width="550px" border="normal">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<separator orient="vertical" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarTaxaEmbLevanteParada.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="2,2">
<label
value="${c:l('busquedaTaxaEmbLevanteController.labelParada.value')}" />
<combobox id="cmbParada" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
mold="rounded" buttonVisible="true" width="100%" />
</row>
<row spans="2,2">
<label
value="${c:l('busquedaTaxaEmbLevanteController.labelImporte.value')}" />
<textbox id="txImporte"
allowZero="true" defaultZero="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="5" scale="2" />
</row>
</rows>
</grid>
</window>
</zk>