diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java index cef843e4c..feedd8a2e 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java @@ -25,11 +25,13 @@ import org.zkoss.zkplus.databind.BindingListModelList; import org.zkoss.zul.Button; import org.zkoss.zul.Combobox; import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Datebox; import org.zkoss.zul.Doublebox; import org.zkoss.zul.Image; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Radio; import org.zkoss.zul.Textbox; +import org.zkoss.zul.api.Timebox; import com.rjconsultores.ventaboletos.entidad.Ciudad; import com.rjconsultores.ventaboletos.entidad.Colonia; @@ -41,8 +43,11 @@ import com.rjconsultores.ventaboletos.entidad.Nodo; import com.rjconsultores.ventaboletos.entidad.ParamRecoleccion; import com.rjconsultores.ventaboletos.entidad.PtoVtaUsuarioBancario; import com.rjconsultores.ventaboletos.entidad.PtovtaAgenciaBancaria; +import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao; import com.rjconsultores.ventaboletos.entidad.PtovtaBanco; import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresa; +import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque; +import com.rjconsultores.ventaboletos.entidad.PtovtaHorario; import com.rjconsultores.ventaboletos.entidad.PtovtaTitular; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta; @@ -67,7 +72,9 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal; import com.rjconsultores.ventaboletos.web.utilerias.render.FormaPagoDetRender; import com.rjconsultores.ventaboletos.web.utilerias.render.ParamRecoleccionRender; +import com.rjconsultores.ventaboletos.web.utilerias.render.PtovtaAntecipacomissaoRender; import com.rjconsultores.ventaboletos.web.utilerias.render.PtovtaEmpresaRender; +import com.rjconsultores.ventaboletos.web.utilerias.render.PtovtaHorarioRender; import com.rjconsultores.ventaboletos.web.utilerias.render.PtovtaUsuarioBancarioRender; /** @@ -111,6 +118,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { private MyListbox formaPagoList; private MyListbox ptovtaEmpresaList; private MyListbox ptovtaUsuarioBancarioList; + private MyListbox ptovtaAntecipaList; + private MyListbox ptovtaHorarioList; + private MyListbox ptovtaEstoqueList; private static Logger log = Logger.getLogger(EditarPuntoVentaController.class); private List lsEmpresas; private List lsBanco; @@ -125,7 +135,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { private List lsUsuarioBancario; private List lsPtovtaEmpresa; private List lsPtovtaUsuarioBancario; - private List lsAgencia; + private List lsAntecipacomissao; + private List lsHorario; + private List lsEstoque; private MyTextbox txtNome; @@ -144,20 +156,22 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { private Combobox cmbBanco; private Combobox cmbPessoa; private Combobox cmbTipoConta; + private Combobox cmbForm; + private Combobox cmbLote; private Button btnSalvarFormaPago; private Doublebox txtCargosExtras; private MyTextbox txtNumFax; private MyTextbox txtCompl; - private Textbox txtNumAg; - private Textbox txtConta; - private Textbox txtDigito; - private Textbox txtBilhetes; - private Textbox txtCarga; + private MyTextbox txtNumAg; + private MyTextbox txtConta; + private MyTextbox txtDigito; + private MyTextbox txtBilhetes; + private MyTextbox txtCarga; private Textbox txtNomeBanco; - private Textbox txtTitularNome; - private Textbox txtTitularCpf; - private Textbox txtTitularRg; - private Textbox txtTitularEmissor; + private MyTextbox txtTitularNome; + private MyTextbox txtTitularCpf; + private MyTextbox txtTitularRg; + private MyTextbox txtTitularEmissor; private Button btnApagar; private Combobox cmbCiudad; private Combobox cmbColonia; @@ -166,9 +180,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { private Combobox cmbUsuarioBancarioPtoVtaUsuarioBancario; private MyTextboxDecimal importeInicial; private MyTextboxDecimal importeAdicional; + private Datebox dateAntecipData; + private MyTextboxDecimal txtAntecipRetem; + private MyTextboxDecimal txtAntecipPercentual; private Image img; + private Timebox timeboxInicio; + private Timebox timeboxFim; + + public Button getBtnApagar() { return btnApagar; } @@ -188,6 +209,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { popularCombobox(cmbPessoa, this.getPessoa()); popularCombobox(cmbTipoConta, this.getTipoConta()); + popularCombobox(cmbForm, this.getForm()); + popularCombobox(cmbLote, this.getLote()); lsEmpresas = empresaService.obtenerIndTipo1(); lsMoneda = monedaService.obtenerTodos(); @@ -248,7 +271,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { if (puntoVenta.getPuntoventaId() != null) { if(puntoVenta.getTitularId() != null){ - + if (puntoVenta.getTitularId().getImagem() != null) { + img.setContent(new org.zkoss.image.AImage("imagem", + puntoVenta.getTitularId().getImagem() )); + } }else{ puntoVenta.setTitularId(new PtovtaTitular()); } @@ -282,10 +308,25 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { puntoVenta.setLsPtovtaEmpresa(new ArrayList()); } - - lsPtovtaEmpresa = puntoVenta.getLsPtovtaEmpresa(); ptovtaEmpresaList.setData(lsPtovtaEmpresa); + + + ptovtaAntecipaList.setItemRenderer(new PtovtaAntecipacomissaoRender()); + if(puntoVenta.getPtovtaAntecipacomissaoList() == null){ + puntoVenta.setPtovtaAntecipacomissaoList(new ArrayList()); + } + + lsAntecipacomissao = puntoVenta.getPtovtaAntecipacomissaoList(); + ptovtaAntecipaList.setData(lsAntecipacomissao); + + ptovtaHorarioList.setItemRenderer(new PtovtaHorarioRender()); + if(puntoVenta.getPtovtaHorarioList() == null){ + puntoVenta.setPtovtaHorarioList(new ArrayList()); + } + + lsHorario = puntoVenta.getPtovtaHorarioList(); + ptovtaHorarioList.setData(lsHorario); ptovtaUsuarioBancarioList.setItemRenderer(new PtovtaUsuarioBancarioRender()); if (puntoVenta.getLsPtovtaUsuarioBancario() == null) { @@ -374,6 +415,14 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { txtNumFax.getValue(); txtCompl.getValue(); txtNumAg.getValue(); + txtConta.getValue(); + txtDigito.getValue(); + txtBilhetes.getValue(); + txtCarga.getValue(); + txtTitularNome.getValue(); + txtTitularCpf.getValue(); + txtTitularRg.getValue(); + txtTitularEmissor.getValue(); cmbEmpresa.getValue(); cmbParada.getValue(); cmbTipoPontoVenta.getValue(); @@ -448,8 +497,21 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { puntoVenta.setLsParamRecoleccion(lsParamRecoleccion); puntoVenta.setLsPtovtaEmpresa(lsPtovtaEmpresa); puntoVenta.setLsPtovtaUsuarioBancario(lsPtovtaUsuarioBancario); - puntoVenta.setAgenciaId(preencherAgenciaBancaria()); - puntoVenta.setTitularId(preencherTitular()); + puntoVenta.setPtovtaAntecipacomissaoList(lsAntecipacomissao); + puntoVenta.setPtovtaHorarioList(lsHorario); + + if(cmbBanco.getSelectedItem()== null){ + puntoVenta.setAgenciaId(null); + } + + if(txtTitularCpf.getValue().equals("")){ + puntoVenta.setTitularId(null); + } + + + + + List lsPto = new ArrayList(); @@ -559,69 +621,191 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { } - public PtovtaTitular preencherTitular(){ +// public PtovtaTitular preencherTitular(){ +// +// txtTitularNome.getValue(); +// txtTitularCpf.getValue(); +// txtTitularRg.getValue(); +// txtTitularEmissor.getValue(); +// +// PtovtaTitular titular = new PtovtaTitular(); +// titular.setNome(txtTitularNome.getValue()); +// titular.setCpf(txtTitularCpf.getValue()); +// titular.setRg(txtTitularRg.getValue()); +// titular.setOrgaoemissor(txtTitularEmissor.getValue()); +// if (img.getContent() != null) { +// titular.setImagem(img.getContent().getByteData()); +// } +// +// +// titular.setActivo(Boolean.TRUE); +// titular.setFecmodif(Calendar.getInstance().getTime()); +// titular.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); +// +// return titular; +// +// } +// +// +// public PtovtaAgenciaBancaria preencherAgenciaBancaria() { +// cmbBanco.getValue(); +// cmbPessoa.getValue(); +// txtNumAg.getValue(); +// +// txtConta.getValue(); +// txtDigito.getValue(); +// txtBilhetes.getValue(); +// txtCarga.getValue(); +// +// +// PtovtaAgenciaBancaria agencia = new PtovtaAgenciaBancaria(); +// if (cmbBanco.getSelectedItem() != null){ +// agencia.setBancoId((PtovtaBanco) cmbBanco.getSelectedItem().getValue()); +// } +// +// if (cmbPessoa.getSelectedItem() != null){ +// agencia.setPessoa((String) cmbPessoa.getSelectedItem().getValue()); +// } +// if (cmbTipoConta.getSelectedItem() != null){ +// agencia.setTipo((String) cmbTipoConta.getSelectedItem().getValue()); +// } +// +// agencia.setActivo(Boolean.TRUE); +// agencia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); +// agencia.setFecmodif(Calendar.getInstance().getTime()); +// +// return agencia; +// +// +// } + + public void onClick$btnSalvarAntecipa()throws InterruptedException{ + dateAntecipData.getValue(); + txtAntecipRetem.getValue(); + txtAntecipPercentual.getValue(); + try { + PtovtaAntecipacomissao antecipa = new PtovtaAntecipacomissao(); + + + antecipa.setData(dateAntecipData.getValue()); + antecipa.setPercentual(txtAntecipPercentual.getValueDecimal()); + antecipa.setRetem(txtAntecipRetem.getValueDecimal()); + antecipa.setPuntoventaId(puntoVenta); - txtTitularNome.getValue(); - txtTitularCpf.getValue(); - txtTitularRg.getValue(); - txtTitularEmissor.getValue(); - - PtovtaTitular titular = new PtovtaTitular(); - titular.setNome(txtTitularNome.getValue()); - titular.setCpf(txtTitularCpf.getValue()); - titular.setRg(txtTitularRg.getValue()); - titular.setNome(txtTitularEmissor.getValue()); - if (img.getContent() != null) { - titular.setImagem(img.getContent().getByteData()); + antecipa.setActivo(Boolean.TRUE); + antecipa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + antecipa.setFecmodif(Calendar.getInstance().getTime()); + + lsAntecipacomissao.add(antecipa); + ptovtaAntecipaList.setData(lsAntecipacomissao); + + + + } catch (Exception ex) { + log.error(ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarPuntoVentaController.window.title"), + Messagebox.OK, Messagebox.ERROR); } - - - titular.setActivo(Boolean.TRUE); - titular.setFecmodif(Calendar.getInstance().getTime()); - titular.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); - - return titular; - } - public PtovtaAgenciaBancaria preencherAgenciaBancaria() { - cmbBanco.getValue(); - cmbPessoa.getValue(); - txtNumAg.getValue(); + public void onClick$btnApagarAntecipa() { + try { + PtovtaAntecipacomissao antecipa = (PtovtaAntecipacomissao) ptovtaAntecipaList.getSelected(); + if (antecipa != null) { + antecipa.setActivo(Boolean.FALSE); + antecipa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + antecipa.setFecmodif(Calendar.getInstance().getTime()); - txtConta.getValue(); - txtDigito.getValue(); - txtBilhetes.getValue(); - txtCarga.getValue(); + ptovtaAntecipaList.removeItem(antecipa); + lsAntecipacomissao.remove(antecipa); + } + } catch (Exception ex) { + log.error(ex); + } + } - PtovtaBanco banco = new PtovtaBanco(); - PtovtaAgenciaBancaria agencia = new PtovtaAgenciaBancaria(); - banco = (PtovtaBanco) cmbBanco.getSelectedItem().getValue(); - agencia.setBancoId(banco); - agencia.setNumagencia(txtNumAg.getValue()); - agencia.setNumconta(txtConta.getValue()); - agencia.setDigito(txtDigito.getValue()); + + public void onClick$btnSalvarHorario()throws InterruptedException{ + timeboxInicio.getValue(); + timeboxFim.getValue(); + try { + PtovtaHorario horario = new PtovtaHorario(); - agencia.setCarga(txtCarga.getValue()); - agencia.setBilhetes(txtBilhetes.getValue()); - agencia.setBancoId(banco); - agencia.setPessoa((String) cmbPessoa.getSelectedItem().getValue()); - agencia.setTipo((String) cmbTipoConta.getSelectedItem().getValue()); - - agencia.setActivo(Boolean.TRUE); - agencia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); - agencia.setFecmodif(Calendar.getInstance().getTime()); - - return agencia; - + + horario.setInicio(timeboxInicio.getValue()); + horario.setFim(timeboxFim.getValue()); + horario.setPuntoventaId(puntoVenta); + horario.setActivo(Boolean.TRUE); + horario.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + horario.setFecmodif(Calendar.getInstance().getTime()); + + lsHorario.add(horario); + ptovtaHorarioList.setData(lsHorario); + + + + } catch (Exception ex) { + log.error(ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarPuntoVentaController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } + } + + public void onClick$btnApagarHorario() { + try { + PtovtaHorario horario = (PtovtaHorario) ptovtaHorarioList.getSelected(); + if (horario != null) { + horario.setActivo(Boolean.FALSE); + horario.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + horario.setFecmodif(Calendar.getInstance().getTime()); + + ptovtaHorarioList.removeItem(horario); + lsHorario.remove(horario); + } + } catch (Exception ex) { + log.error(ex); + } + } + + + public void onClick$btnSalvarEstoque()throws InterruptedException{ + dateAntecipData.getValue(); + txtAntecipRetem.getValue(); + txtAntecipPercentual.getValue(); + try { + PtovtaEstoque estoque = new PtovtaEstoque(); + + + + estoque.setPuntoventaId(puntoVenta); + + estoque.setActivo(Boolean.TRUE); + estoque.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + estoque.setFecmodif(Calendar.getInstance().getTime()); + + lsEstoque.add(estoque); + ptovtaEstoqueList.setData(lsEstoque); + + + + } catch (Exception ex) { + log.error(ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarPuntoVentaController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } } public void onClick$btnSalvarFormaPago(Event ev) throws InterruptedException { cmbFormaPago.getValue(); txtCargosExtras.getValue(); - txtNumFax.getValue(); try { FormaPago formaPago = new FormaPago(); try { @@ -898,6 +1082,14 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { public List getTipoConta() { return PtovtaAgenciaBancaria.getTipoContaList(); } + + public List getForm() { + return PtovtaEstoque.getFormList(); + } + + public List getLote() { + return PtovtaEstoque.getLoteList(); + } public PuntoVenta getPuntoVenta() { return puntoVenta; @@ -911,6 +1103,15 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { return puntoVentaList; } + + public MyListbox getAntecipaList() { + return ptovtaAntecipaList; + } + + public void setAntecipaList(MyListbox antecipaList) { + this.ptovtaAntecipaList = antecipaList; + } + public void setPuntoVentaList(MyListbox puntoVentaList) { this.puntoVentaList = puntoVentaList; } @@ -938,7 +1139,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { public void setTipoPuntoVentaService(TipoPuntoVentaService tipoPuntoVentaService) { this.tipoPuntoVentaService = tipoPuntoVentaService; } - + public List getLsEmpresas() { return lsEmpresas; } @@ -947,6 +1148,23 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { this.lsEmpresas = lsEmpresas; } + public List getLsPtovtaAntecipa() { + return lsAntecipacomissao; + } + + public void setLsPtovtaAntecipa(List lsAntecipacomissao) { + this.lsAntecipacomissao = lsAntecipacomissao; + } + + + public List getLsHorario() { + return lsHorario; + } + + public void setLsHorario(List lsHorario) { + this.lsHorario = lsHorario; + } + public List getLsTipoPuntoVenta() { return lsTipoPuntoVenta; } @@ -1051,6 +1269,38 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { public void setTxtNome(MyTextbox txtNome) { this.txtNome = txtNome; } + + public MyTextbox getTxtTitularNome() { + return txtTitularNome; + } + + public void setTxtTitularNome(MyTextbox txtTitularNome) { + this.txtTitularNome = txtTitularNome; + } + + public MyTextbox getTxtTitularCpf() { + return txtTitularCpf; + } + + public void setTxtTitularCpf(MyTextbox txtTitularCpf) { + this.txtTitularCpf = txtTitularCpf; + } + + public MyTextbox getTxtTitularRg() { + return txtTitularRg; + } + + public void setTxtTitularRg(MyTextbox txtTitularRg) { + this.txtTitularRg = txtTitularRg; + } + + public MyTextbox getTxtTitularEmissor() { + return txtTitularEmissor; + } + + public void setTxtTitularEmissor(MyTextbox txtTitularEmissor) { + this.txtTitularEmissor = txtTitularEmissor; + } public MyListbox getFormaPagoList() { return formaPagoList; @@ -1224,11 +1474,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { this.txtCP = txtCP; } - public Textbox getTxtNumAg() { + public MyTextbox getTxtNumAg() { return txtNumAg; } - public void setTxtNumAg(Textbox txtNumAg) { + public void setTxtNumAg(MyTextbox txtNumAg) { this.txtNumAg = txtNumAg; } @@ -1252,37 +1502,80 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { - public Textbox getTxtConta() { + public MyTextbox getTxtConta() { return txtConta; } - public void setTxtConta(Textbox txtConta) { + public void setTxtConta(MyTextbox txtConta) { this.txtConta = txtConta; } - public Textbox getTxtDigito() { + public MyTextbox getTxtDigito() { return txtDigito; } - public void setTxtDigito(Textbox txtDigito) { + public void setTxtDigito(MyTextbox txtDigito) { this.txtDigito = txtDigito; } - public Textbox getTxtBilhetes() { + public MyTextbox getTxtBilhetes() { return txtBilhetes; } - public void setTxtBilhetes(Textbox txtBilhetes) { + public void setTxtBilhetes(MyTextbox txtBilhetes) { this.txtBilhetes = txtBilhetes; } - public Textbox getTxtCarga() { + public MyTextbox getTxtCarga() { return txtCarga; } - public void setTxtCarga(Textbox txtCarga) { + public void setTxtCarga(MyTextbox txtCarga) { this.txtCarga = txtCarga; } + + + + public Datebox getDateAntecipData() { + return dateAntecipData; + } + + public void setDateAntecipData(Datebox dateAntecipData) { + this.dateAntecipData = dateAntecipData; + } + + public MyTextboxDecimal getTxtAntecipRetem() { + return txtAntecipRetem; + } + + public void setTxtAntecipRetem(MyTextboxDecimal txtAntecipRetem) { + this.txtAntecipRetem = txtAntecipRetem; + } + + public MyTextboxDecimal getTxtAntecipPercentual() { + return txtAntecipPercentual; + } + + public void setTxtAntecipPercentual(MyTextboxDecimal txtAntecipPercentual) { + this.txtAntecipPercentual = txtAntecipPercentual; + } + + + public Timebox getTimeboxInicio() { + return timeboxInicio; + } + + public void setTimeboxInicio(Timebox timeboxInicio) { + this.timeboxInicio = timeboxInicio; + } + + public Timebox getTimeboxFim() { + return timeboxFim; + } + + public void setTimeboxFim(Timebox timeboxFim) { + this.timeboxFim = timeboxFim; + } public MyListbox getParamRecoleccionList() { return paramRecoleccionList; @@ -1326,4 +1619,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { public void setPtovtaUsuarioBancarioList(MyListbox ptovtaUsuarioBancarioList) { this.ptovtaUsuarioBancarioList = ptovtaUsuarioBancarioList; } + + } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaAntecipacomissaoRender.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaAntecipacomissaoRender.java new file mode 100644 index 000000000..298f28f4c --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaAntecipacomissaoRender.java @@ -0,0 +1,38 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import java.text.SimpleDateFormat; + +import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +/** + * + * @author Administrador + */ +public class PtovtaAntecipacomissaoRender implements ListitemRenderer { + + public void render(Listitem lstm, Object o) throws Exception { + PtovtaAntecipacomissao antecipa = (PtovtaAntecipacomissao) o; + + + + SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yy"); + Listcell lc = new Listcell(dt.format(antecipa.getData())); + lc.setParent(lstm); + + lc = new Listcell(antecipa.getRetem().toString()); + lc.setParent(lstm); + + lc = new Listcell(antecipa.getPercentual().toString()); + lc.setParent(lstm); + + lstm.setAttribute("data", antecipa); + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaHorarioRender.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaHorarioRender.java new file mode 100644 index 000000000..497bec313 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/PtovtaHorarioRender.java @@ -0,0 +1,37 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import java.text.SimpleDateFormat; + + + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.PtovtaHorario; + +/** + * + * @author Administrador + */ +public class PtovtaHorarioRender implements ListitemRenderer { + + public void render(Listitem lstm, Object o) throws Exception { + PtovtaHorario horario = (PtovtaHorario) o; + + + + SimpleDateFormat dt = new SimpleDateFormat("HH:mm:ss"); + Listcell lc = new Listcell(dt.format(horario.getInicio())); + lc.setParent(lstm); + + lc = new Listcell(dt.format(horario.getFim())); + lc.setParent(lstm); + + lstm.setAttribute("data", horario); + } +} diff --git a/web/gui/catalogos/editarPuntoVenta.zul b/web/gui/catalogos/editarPuntoVenta.zul index 1adeb30be..327857d78 100644 --- a/web/gui/catalogos/editarPuntoVenta.zul +++ b/web/gui/catalogos/editarPuntoVenta.zul @@ -312,7 +312,8 @@ @@ -329,11 +330,13 @@ @@ -353,12 +356,14 @@ @@ -375,21 +380,25 @@ @@ -413,17 +422,19 @@ @@ -440,7 +451,7 @@ - @@ -466,13 +477,13 @@ @@ -489,7 +500,7 @@ - @@ -662,18 +673,23 @@ @@ -690,7 +706,7 @@ -