rodrigo 2012-08-10 15:05:09 +00:00
parent 7a1c5155f6
commit 979b61407e
35 changed files with 658 additions and 751 deletions

View File

@ -52,6 +52,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConver
* *
*/ */
public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl { public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
private static final long serialVersionUID = 1L;
private List<Via> lsVias; private List<Via> lsVias;
private List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO; private List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO;
private ClaseServicio claseServicio; private ClaseServicio claseServicio;
@ -94,7 +96,8 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
} }
/** /**
* Indica cuál es la clase de servicio usada para hacer la búsqueda de los tramos * Indica cuál es la clase de servicio usada para hacer la búsqueda de los
* tramos
* *
* @param claseServicio * @param claseServicio
*/ */
@ -122,7 +125,8 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
} }
/** /**
* Agrega un nuevo tramo. Si la origen es la ultima parada, agrega al fin. Sino agrega al medio de la secuencia. * Agrega un nuevo tramo. Si la origen es la ultima parada, agrega al fin.
* Sino agrega al medio de la secuencia.
* *
* La parada destino es la que tienes que agregar. * La parada destino es la que tienes que agregar.
* *
@ -367,18 +371,20 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
@Override @Override
public void onEvent(Event evt) throws Exception { public void onEvent(Event evt) throws Exception {
if (cboVia.getSelectedItem() != null) { if (cboVia.getSelectedItem() != null) {
BigDecimal kmPagoConductorAntigo = secuenciaRutaTramoVO.getKmPagoConductor(); BigDecimal kmPagoConductorAntigo = secuenciaRutaTramoVO.getKmPagoConductor();
BigDecimal kmRealAntigo = secuenciaRutaTramoVO.getKmReal(); BigDecimal kmRealAntigo = secuenciaRutaTramoVO.getKmReal();
Hora tiempoRecorridoAntigo = secuenciaRutaTramoVO.getTiempoRecorrido(); Hora tiempoRecorridoAntigo = secuenciaRutaTramoVO.getTiempoRecorrido();
secuenciaRutaTramoVO.setVia((Via) cboVia.getSelectedItem().getValue()); secuenciaRutaTramoVO.setVia((Via) cboVia.getSelectedItem().getValue());
llenarTramo(secuenciaRutaTramoVO); llenarTramo(secuenciaRutaTramoVO);
boolean tramoEditable = (secuenciaRutaTramoVO.getTramoId() == null); boolean tramoEditable = (secuenciaRutaTramoVO.getTramoId() == null);
boolean tramoServicioEditable = (secuenciaRutaTramoVO.getTramoServicioId() == null); boolean tramoServicioEditable = (secuenciaRutaTramoVO.getTramoServicioId() == null);
if (!tramoEditable) {// cuando el tramo no es editable, es porque ya existe. Entonces lleno la pantalla con los nuevos if (!tramoEditable) {// cuando el tramo no es editable, es
// porque ya existe. Entonces lleno
// la pantalla con los nuevos
// valores // valores
dKmsReal.setValueBigDecimal(secuenciaRutaTramoVO.getKmReal()); dKmsReal.setValueBigDecimal(secuenciaRutaTramoVO.getKmReal());
dKmsConductor.setValueBigDecimal(secuenciaRutaTramoVO.getKmPagoConductor()); dKmsConductor.setValueBigDecimal(secuenciaRutaTramoVO.getKmPagoConductor());
@ -390,7 +396,10 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
lblID.setValue((secuenciaRutaTramoVO.getTramoId() != null) ? secuenciaRutaTramoVO.getTramoId().toString() : ""); lblID.setValue((secuenciaRutaTramoVO.getTramoId() != null) ? secuenciaRutaTramoVO.getTramoId().toString() : "");
if (!tramoServicioEditable) {// cuando el tramoServicio no es editable, es porque ya existe. Entonces lleno la pantalla if (!tramoServicioEditable) {// cuando el tramoServicio no
// es editable, es porque ya
// existe. Entonces lleno la
// pantalla
// con los nuevos valores // con los nuevos valores
spHora.setValue(secuenciaRutaTramoVO.getTiempoRecorrido().getHora()); spHora.setValue(secuenciaRutaTramoVO.getTiempoRecorrido().getHora());
spMinuto.setValue(secuenciaRutaTramoVO.getTiempoRecorrido().getMinuto()); spMinuto.setValue(secuenciaRutaTramoVO.getTiempoRecorrido().getMinuto());
@ -437,8 +446,8 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
spMinuto.setWidth("40px"); spMinuto.setWidth("40px");
spMinuto.setConstraint("max 59,no negative,no empty"); spMinuto.setConstraint("max 59,no negative,no empty");
spMinuto.setReadonly(!esTramoServicioEditable); spMinuto.setReadonly(!esTramoServicioEditable);
spMinuto.setButtonVisible(esTramoServicioEditable); spMinuto.setButtonVisible(esTramoServicioEditable);
hbox.appendChild(spMinuto); hbox.appendChild(spMinuto);
if (secuenciaRutaTramoVO.getTiempoRecorrido() != null) { if (secuenciaRutaTramoVO.getTiempoRecorrido() != null) {
@ -505,7 +514,8 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
SecuenciaRutaTramoVO s = buscarSecuencia(origenTramo, destinoTramo); SecuenciaRutaTramoVO s = buscarSecuencia(origenTramo, destinoTramo);
if (s == null) { if (s == null) {
s = new SecuenciaRutaTramoVO(origenTramo, destinoTramo, i, null); s = new SecuenciaRutaTramoVO(origenTramo, destinoTramo, i, null);
// si no existe, es el tramo nuevo. Entonces agrego los valores eliminados // si no existe, es el tramo nuevo. Entonces agrego los valores
// eliminados
s.setKmPagoConductor(totalKmConductorRemovido); s.setKmPagoConductor(totalKmConductorRemovido);
s.setKmReal(totalKmRealRemovido); s.setKmReal(totalKmRealRemovido);
s.setTiempoRecorrido(totalTiempoRecorridoRemovido); s.setTiempoRecorrido(totalTiempoRecorridoRemovido);
@ -515,7 +525,7 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
} }
lsSecuenciaRutaTramoVO.clear(); lsSecuenciaRutaTramoVO.clear();
lsSecuenciaRutaTramoVO.addAll(lsSecuenciaRutaTramoNuevoVO); lsSecuenciaRutaTramoVO.addAll(lsSecuenciaRutaTramoNuevoVO);
actualizaModel(); actualizaModel();
} }
@ -613,14 +623,10 @@ public class GridRutaTramo extends Grid implements RowRenderer, RendererCtrl {
@Override @Override
public void doFinally() { public void doFinally() {
// TODO Auto-generated method stub
} }
@Override @Override
public void doTry() { public void doTry() {
// TODO Auto-generated method stub
} }
public void debugList() { public void debugList() {

View File

@ -1,10 +1,10 @@
package com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional; package com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional;
public class ParadaExisteException extends Exception { public class ParadaExisteException extends Exception {
private static final long serialVersionUID = 1L;
public ParadaExisteException(String msg) { public ParadaExisteException(String msg) {
super(msg); super(msg);
} }
} }

View File

@ -34,11 +34,11 @@ import com.rjconsultores.ventaboletos.web.utilerias.menu.MenuFactoryPropertiesIm
@Scope("prototype") @Scope("prototype")
public class IndexController extends MyGenericForwardComposer { public class IndexController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired @Autowired
private UsuarioService usuarioService; private UsuarioService usuarioService;
@Autowired @Autowired
private ConstanteService constanteService; private ConstanteService constanteService;
private static Logger log = Logger.getLogger(IndexController.class);
private Usuario usuario; private Usuario usuario;
private Toolbarbutton toolBar; private Toolbarbutton toolBar;
private Toolbarbutton toolBarUser; private Toolbarbutton toolBarUser;
@ -78,7 +78,7 @@ public class IndexController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp); super.doAfterCompose(comp);
//cargarNombreAmbiente(); // cargarNombreAmbiente();
usuario = UsuarioLogado.getUsuarioLogado(); usuario = UsuarioLogado.getUsuarioLogado();

View File

@ -32,177 +32,114 @@ import org.zkoss.zul.Row;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
@Controller("busquedaEstadoController") @Controller("busquedaEstadoController")
@Scope("prototype") @Scope("prototype")
public class BusquedaEstadoController extends MyGenericForwardComposer { public class BusquedaEstadoController extends MyGenericForwardComposer {
@Autowired private static final long serialVersionUID = 1L;
private PaisService paisService; @Autowired
@Autowired private PaisService paisService;
private transient PagedListWrapper<Estado> plwEstado; @Autowired
private MyListbox estadoList; private transient PagedListWrapper<Estado> plwEstado;
private Paging pagingEstado; private MyListbox estadoList;
private Textbox txtNombre; private Paging pagingEstado;
private Textbox txtEquivalencia; private Textbox txtNombre;
private Combobox cmbPais; private Textbox txtEquivalencia;
private List<Pais> lsPais; private Combobox cmbPais;
private Row rowEquivalencia; private List<Pais> lsPais;
private Listheader headerEquivalencia; private Row rowEquivalencia;
private Listheader headerEquivalencia;
public Combobox getCmbPais() { public List<Pais> getLsPais() {
return cmbPais; return lsPais;
} }
public void setCmbPais(Combobox cmbPais) { public void setLsPais(List<Pais> lsPais) {
this.cmbPais = cmbPais; this.lsPais = lsPais;
} }
public MyListbox getEstadoList() { @Override
return estadoList; public void doAfterCompose(Component comp) throws Exception {
}
public void setEstadoList(MyListbox estadoList) { lsPais = paisService.obtenerTodos();
this.estadoList = estadoList; super.doAfterCompose(comp);
}
public List<Pais> getLsPais() { estadoList.setItemRenderer(new RenderEstado());
return lsPais; estadoList.addEventListener("onDoubleClick", new EventListener() {
}
public void setLsPais(List<Pais> lsPais) { @Override
this.lsPais = lsPais; public void onEvent(Event event) throws Exception {
} Estado est = (Estado) estadoList.getSelected();
verPeriodo(est);
}
});
public Paging getPagingEstado() { refreshLista();
return pagingEstado;
}
public void setPagingEstado(Paging pagingEstado) { if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
this.pagingEstado = pagingEstado; rowEquivalencia.setVisible(Boolean.FALSE);
} headerEquivalencia.setVisible(Boolean.FALSE);
}
public PaisService getPaisService() { txtNombre.focus();
return paisService; }
}
public void setPaisService(PaisService paisService) { @SuppressWarnings({ "rawtypes", "unchecked" })
this.paisService = paisService; private void verPeriodo(Estado e) {
} if (e == null) {
return;
}
public Textbox getTxtNombre() { Map args = new HashMap();
return txtNombre; args.put("estado", e);
} args.put("estadoList", estadoList);
public void setTxtNombre(Textbox txtNombre) { openWindow("/gui/catalogos/editarEstado.zul",
this.txtNombre = txtNombre; Labels.getLabel("editarEstadoController.window.title"), args, MODAL);
} }
public Textbox getTxtEquivalencia() { private void refreshLista() throws InterruptedException {
return txtEquivalencia; HibernateSearchObject<Estado> estadoBusqueda =
} new HibernateSearchObject<Estado>(Estado.class, pagingEstado.getPageSize());
public void setTxtEquivalencia(Textbox txtEquivalencia) { estadoBusqueda.addFilterLike("nombestado", "%" + txtNombre.getText().trim().concat("%"));
this.txtEquivalencia = txtEquivalencia;
}
public Listheader getHeaderEquivalencia() { Comboitem itemPais = cmbPais.getSelectedItem();
return headerEquivalencia; if (itemPais != null) {
} Pais pais = (Pais) itemPais.getValue();
estadoBusqueda.addFilterEqual("pais", pais);
}
public void setHeaderEquivalencia(Listheader headerEquivalencia) { if (!txtEquivalencia.getText().isEmpty()) {
this.headerEquivalencia = headerEquivalencia; estadoBusqueda.addFilterLike("equivalenciaId", txtEquivalencia.getText().trim().concat("%"));
} }
public Row getRowEquivalencia() { estadoBusqueda.addFilterEqual("activo", Boolean.TRUE);
return rowEquivalencia; estadoBusqueda.addSortAsc("nombestado");
} estadoBusqueda.addFilterNotEqual("estadoId", -1);
public void setRowEquivalencia(Row rowEquivalencia) { plwEstado.init(estadoBusqueda, estadoList, pagingEstado);
this.rowEquivalencia = rowEquivalencia;
}
@Override if (estadoList.getData().length == 0) {
public void doAfterCompose(Component comp) throws Exception { Messagebox.show(
Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
lsPais = paisService.obtenerTodos(); public void onClick$btnRefresh(Event ev) throws InterruptedException {
super.doAfterCompose(comp); refreshLista();
}
estadoList.setItemRenderer(new RenderEstado()); public void onClick$btnPesquisa(Event ev) throws InterruptedException {
estadoList.addEventListener("onDoubleClick", new EventListener() { refreshLista();
}
@Override public void onClick$btnNovo(Event ev) throws InterruptedException {
public void onEvent(Event event) throws Exception { verPeriodo(new Estado());
Estado est = (Estado) estadoList.getSelected(); }
verPeriodo(est);
}
});
refreshLista();
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
rowEquivalencia.setVisible(Boolean.FALSE);
headerEquivalencia.setVisible(Boolean.FALSE);
}
txtNombre.focus();
}
public void onClick$btnRefresh(Event ev) throws InterruptedException {
refreshLista();
}
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
refreshLista();
}
public void onClick$btnNovo(Event ev) throws InterruptedException {
verPeriodo(new Estado());
}
private void verPeriodo(Estado e) {
if (e == null) {
return;
}
Map args = new HashMap();
args.put("estado", e);
args.put("estadoList", estadoList);
openWindow("/gui/catalogos/editarEstado.zul",
Labels.getLabel("editarEstadoController.window.title"), args, MODAL);
}
private void refreshLista() throws InterruptedException {
HibernateSearchObject<Estado> estadoBusqueda =
new HibernateSearchObject<Estado>(Estado.class, pagingEstado.getPageSize());
estadoBusqueda.addFilterLike("nombestado", "%" + txtNombre.getText().trim().concat("%"));
Comboitem itemPais = cmbPais.getSelectedItem();
if (itemPais != null) {
Pais pais = (Pais) itemPais.getValue();
estadoBusqueda.addFilterEqual("pais", pais);
}
if (!txtEquivalencia.getText().isEmpty()) {
estadoBusqueda.addFilterLike("equivalenciaId", txtEquivalencia.getText().trim().concat("%"));
}
estadoBusqueda.addFilterEqual("activo", Boolean.TRUE);
estadoBusqueda.addSortAsc("nombestado");
estadoBusqueda.addFilterNotEqual("estadoId", -1);
plwEstado.init(estadoBusqueda, estadoList, pagingEstado);
if (estadoList.getData().length == 0) {
Messagebox.show(
Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
} }

View File

@ -29,196 +29,141 @@ import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Row; import org.zkoss.zul.Row;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
@Controller("editarEstadoController") @Controller("editarEstadoController")
@Scope("prototype") @Scope("prototype")
public class EditarEstadoController extends MyGenericForwardComposer { public class EditarEstadoController extends MyGenericForwardComposer {
@Autowired private static final long serialVersionUID = 1L;
private EstadoService estadoService; @Autowired
@Autowired private EstadoService estadoService;
private PaisService paisService; @Autowired
private Estado estado; private PaisService paisService;
private List<Pais> lsPais; private Estado estado;
private MyListbox estadoList; private List<Pais> lsPais;
private static Logger log = Logger.getLogger(EditarEstadoController.class); private MyListbox estadoList;
private MyTextbox txtNome; private static Logger log = Logger.getLogger(EditarEstadoController.class);
private Combobox cmbPais; private MyTextbox txtNome;
private Button btnApagar; private Combobox cmbPais;
private Row rowEquivalencia; private Button btnApagar;
private Row rowEquivalencia;
public Estado getEstado() { public Estado getEstado() {
return estado; return estado;
} }
public void setEstado(Estado estado) { public void setEstado(Estado estado) {
this.estado = estado; this.estado = estado;
} }
public MyListbox getEstadoList() { public List<Pais> getLsPais() {
return estadoList; return lsPais;
} }
public void setEstadoList(MyListbox estadoList) { public void setLsPais(List<Pais> lsPais) {
this.estadoList = estadoList; this.lsPais = lsPais;
} }
public EstadoService getEstadoService() { @Override
return estadoService; public void doAfterCompose(Component comp) throws Exception {
}
public void setEstadoService(EstadoService estadoService) { lsPais = paisService.obtenerTodos();
this.estadoService = estadoService; super.doAfterCompose(comp);
}
public Button getBtnApagar() { estado = (Estado) Executions.getCurrent().getArg().get("estado");
return btnApagar; estadoList = (MyListbox) Executions.getCurrent().getArg().get("estadoList");
}
public void setBtnApagar(Button btnApagar) { if (estado.getEstadoId() == null) {
this.btnApagar = btnApagar; btnApagar.setVisible(Boolean.FALSE);
} }
public MyTextbox getTxtNome() { if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
return txtNome; rowEquivalencia.setVisible(Boolean.FALSE);
} }
public void setTxtNome(MyTextbox txtNome) { txtNome.focus();
this.txtNome = txtNome; }
}
public List<Pais> getLsPais() { public void onClick$btnSalvar(Event ev) throws InterruptedException {
return lsPais; txtNome.getValue();
} cmbPais.getValue();
try {
public void setLsPais(List<Pais> lsPais) { estado.setActivo(Boolean.TRUE);
this.lsPais = lsPais; estado.setFecmodif(Calendar.getInstance().getTime());
} estado.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
public PaisService getPaisService() { List<Estado> lsEstado = estadoService.buscar(estado.getNombestado(), estado.getPais());
return paisService;
}
public void setPaisService(PaisService paisService) { boolean podeSalvar = false;
this.paisService = paisService; if (lsEstado.isEmpty()) {
} podeSalvar = true;
} else {
if (estado.getEstadoId() == null) {
podeSalvar = false;
} else {
for (Estado e : lsEstado) {
if (e.getEstadoId().equals(estado.getEstadoId())) {
podeSalvar = true;
}
}
}
}
public Combobox getCmbPais() { if (podeSalvar) {
return cmbPais; if (estado.getEstadoId() == null) {
} estadoService.suscribir(estado);
estadoList.addItem(estado);
} else {
estadoService.actualizacion(estado);
estadoList.updateItem(estado);
}
Messagebox.show(
Labels.getLabel("editarEstadoController.MSG.suscribirOK"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
public void setCmbPais(Combobox cmbPais) { closeWindow();
this.cmbPais = cmbPais; } else {
} Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
public Row getRowEquivalencia() { } catch (Exception ex) {
return rowEquivalencia; log.error("editarEstadoController: " + ex);
} Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void setRowEquivalencia(Row rowEquivalencia) { public void onClick$btnApagar(Event ev) {
this.rowEquivalencia = rowEquivalencia; try {
} int resp = Messagebox.show(
Labels.getLabel("editarEstadoController.MSG.borrarPergunta"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
@Override if (resp == Messagebox.YES) {
public void doAfterCompose(Component comp) throws Exception {
lsPais = paisService.obtenerTodos(); estadoService.borrar(estado);
super.doAfterCompose(comp);
estado = (Estado) Executions.getCurrent().getArg().get("estado"); Messagebox.show(
estadoList = (MyListbox) Executions.getCurrent().getArg().get("estadoList"); Labels.getLabel("editarEstadoController.MSG.borrarOK"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
if (estado.getEstadoId() == null) { estadoList.removeItem(estado);
btnApagar.setVisible(Boolean.FALSE);
}
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) { closeWindow();
rowEquivalencia.setVisible(Boolean.FALSE); }
} } catch (Exception ex) {
log.error(ex);
txtNome.focus(); }
} }
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
cmbPais.getValue();
try {
estado.setActivo(Boolean.TRUE);
estado.setFecmodif(Calendar.getInstance().getTime());
estado.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
List<Estado> lsEstado = estadoService.buscar(estado.getNombestado(), estado.getPais());
boolean podeSalvar = false;
if (lsEstado.isEmpty()) {
podeSalvar = true;
} else {
if (estado.getEstadoId() == null) {
podeSalvar = false;
} else {
for (Estado e : lsEstado) {
if (e.getEstadoId().equals(estado.getEstadoId())) {
podeSalvar = true;
}
}
}
}
if (podeSalvar) {
if (estado.getEstadoId() == null) {
estadoService.suscribir(estado);
estadoList.addItem(estado);
} else {
estadoService.actualizacion(estado);
estadoList.updateItem(estado);
}
Messagebox.show(
Labels.getLabel("editarEstadoController.MSG.suscribirOK"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} catch (Exception ex) {
log.error("editarEstadoController: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarEstadoController.MSG.borrarPergunta"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
estadoService.borrar(estado);
Messagebox.show(
Labels.getLabel("editarEstadoController.MSG.borrarOK"),
Labels.getLabel("editarEstadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
estadoList.removeItem(estado);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
} }

View File

@ -195,6 +195,7 @@ public class MenuFactoryPropertiesImpl implements MenuFactory {
* @param strClass * @param strClass
* @return * @return
*/ */
@SuppressWarnings("rawtypes")
private ItemMenuSistema crearNueboItem(String strClass) { private ItemMenuSistema crearNueboItem(String strClass) {
ItemMenuSistema classe = null; ItemMenuSistema classe = null;
try { try {

View File

@ -2,6 +2,8 @@ package com.rjconsultores.ventaboletos.web.utilerias.menu.exception;
public class MenuConfiguracionException extends RuntimeException { public class MenuConfiguracionException extends RuntimeException {
private static final long serialVersionUID = 1L;
public MenuConfiguracionException(String arg0, Throwable arg1) { public MenuConfiguracionException(String arg0, Throwable arg1) {
super(arg0, arg1); super(arg0, arg1);
} }

View File

@ -2,6 +2,8 @@ package com.rjconsultores.ventaboletos.web.utilerias.menu.exception;
public class MenuNoExisteException extends RuntimeException { public class MenuNoExisteException extends RuntimeException {
private static final long serialVersionUID = 1L;
public MenuNoExisteException(String arg0, Throwable arg1) { public MenuNoExisteException(String arg0, Throwable arg1) {
super(arg0, arg1); super(arg0, arg1);
} }

View File

@ -2,21 +2,14 @@ package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperaciona
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Messagebox; import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.Constante;
import com.rjconsultores.ventaboletos.service.ConstanteService;
import com.rjconsultores.ventaboletos.service.CorridaService; import com.rjconsultores.ventaboletos.service.CorridaService;
import com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional.GeracionCorridaController;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext; import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
public class ItemMenuGeneracionCorrida extends DefaultItemMenuSistema { public class ItemMenuGeneracionCorrida extends DefaultItemMenuSistema {
private static Logger log = Logger.getLogger(ItemMenuGeneracionCorrida.class);
public ItemMenuGeneracionCorrida() { public ItemMenuGeneracionCorrida() {
super("indexController.mniGeracionCorrida.label"); super("indexController.mniGeracionCorrida.label");

View File

@ -4,18 +4,18 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.AlertaCtrl;
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import java.math.BigDecimal;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Checkbox; import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.AlertaCtrl;
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
/** /**
* *
* @author Administrador * @author Administrador

View File

@ -4,9 +4,6 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Cortesia;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;

View File

@ -11,26 +11,26 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
public class RenderCancelacionCargo implements ListitemRenderer { public class RenderCancelacionCargo implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
CancelacionCargo cc = (CancelacionCargo) o; CancelacionCargo cc = (CancelacionCargo) o;
Listcell lc = lc = new Listcell((cc.getTiempominimo() == null) ? "" : cc.getTiempominimo().setScale(2, RoundingMode.HALF_UP).toString()); Listcell lc = new Listcell((cc.getTiempominimo() == null) ? "" : cc.getTiempominimo().setScale(2, RoundingMode.HALF_UP).toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell((cc.getTiempomaximo() == null) ? "" : cc.getTiempomaximo().setScale(2, RoundingMode.HALF_UP).toString()); lc = new Listcell((cc.getTiempomaximo() == null) ? "" : cc.getTiempomaximo().setScale(2, RoundingMode.HALF_UP).toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell((cc.getPorccargo() == null) ? "" : cc.getPorccargo().setScale(2, RoundingMode.HALF_UP).toString()); lc = new Listcell((cc.getPorccargo() == null) ? "" : cc.getPorccargo().setScale(2, RoundingMode.HALF_UP).toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell((cc.getImportecargo() == null) ? "" : cc.getImportecargo().setScale(2, RoundingMode.HALF_UP).toString()); lc = new Listcell((cc.getImportecargo() == null) ? "" : cc.getImportecargo().setScale(2, RoundingMode.HALF_UP).toString());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", cc); lstm.setAttribute("data", cc);
} }
} }

View File

@ -10,23 +10,23 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
public class RenderCatalogoDeParadas implements ListitemRenderer { public class RenderCatalogoDeParadas implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
Parada parada = (Parada) o; Parada parada = (Parada) o;
Listcell lc = lc = new Listcell(parada.getParadaId().toString()); Listcell lc = new Listcell(parada.getParadaId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(parada.getDescparada()); lc = new Listcell(parada.getDescparada());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(parada.getCveparada()); lc = new Listcell(parada.getCveparada());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", parada); lstm.setAttribute("data", parada);
} }
} }

View File

@ -23,75 +23,79 @@ import org.zkoss.zul.Radio;
import org.zkoss.zul.Radiogroup; import org.zkoss.zul.Radiogroup;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
@Scope("prototype") @Scope("prototype")
public class RenderCatalogoDeRutasCombinacion extends MyGenericForwardComposer implements ListitemRenderer { public class RenderCatalogoDeRutasCombinacion extends MyGenericForwardComposer implements ListitemRenderer {
@Autowired private static final long serialVersionUID = 1L;
private ViaService viaService; @Autowired
private ViaService viaService;
@Override @Override
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
RutaCombinacion rutaCombinacion = (RutaCombinacion) o; RutaCombinacion rutaCombinacion = (RutaCombinacion) o;
// Listcell lc = new Listcell((rutaCombinacion.getIndventa() == Boolean.TRUE) ? "Si" : "No"); // Listcell lc = new Listcell((rutaCombinacion.getIndventa() ==
Listcell lc = new Listcell(); // Boolean.TRUE) ? "Si" : "No");
// <radiogroup Id="radioGroup" > Listcell lc = new Listcell();
// <radio value="si" id="si" label="${c:l('editarCatalogoDeRutaController.RadSi.value')}" checked="@{rutaCombinacionList.ventaSi}"/> // <radiogroup Id="radioGroup" >
// <radio value="no" id="no" label="${c:l('editarCatalogoDeRutaController.RadNo.value')}" checked="@{rutaCombinacionList.ventaNo}"/> // <radio value="si" id="si"
// </radiogroup> // label="${c:l('editarCatalogoDeRutaController.RadSi.value')}"
final Radiogroup rg = new Radiogroup(); // checked="@{rutaCombinacionList.ventaSi}"/>
//rc.setId("radioGroup2"); // <radio value="no" id="no"
Radio r1 = new Radio(); // label="${c:l('editarCatalogoDeRutaController.RadNo.value')}"
r1.setValue("si"); // checked="@{rutaCombinacionList.ventaNo}"/>
r1.setLabel("Si"); // </radiogroup>
final Radiogroup rg = new Radiogroup();
// rc.setId("radioGroup2");
Radio r1 = new Radio();
r1.setValue("si");
r1.setLabel("Si");
//r1.setId("si"); // r1.setId("si");
Radio r2 = new Radio(); Radio r2 = new Radio();
r2.setValue("no"); r2.setValue("no");
r2.setLabel("No"); r2.setLabel("No");
//r2.setId("no"); // r2.setId("no");
r1.setParent(rg); r1.setParent(rg);
r2.setParent(rg); r2.setParent(rg);
if (rutaCombinacion.getIndventa() == Boolean.TRUE) { if (rutaCombinacion.getIndventa() == Boolean.TRUE) {
r1.setChecked(true); r1.setChecked(true);
} else { } else {
r2.setChecked(true); r2.setChecked(true);
} }
rg.addEventListener("onClick", new EventListener() { rg.addEventListener("onClick", new EventListener() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
Radio a = rg.getSelectedItem(); rg.getSelectedItem();
}
});
lc.appendChild(rg);
lc.setParent(lstm);
} lc = new Listcell(rutaCombinacion.getTramo().getDesctramo());
}); lc.setParent(lstm);
lc.appendChild(rg);
lc.setParent(lstm);
lc = new Listcell(rutaCombinacion.getTramo().getDesctramo()); lc = new Listcell(rutaCombinacion.getTramo().getVia().getNombvia());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(rutaCombinacion.getTramo().getVia().getNombvia()); lc = new Listcell();
lc.setParent(lstm); Combobox combo = new Combobox();
combo.setMold("rounded");
combo.setWidth("100%");
lc = new Listcell(); viaService.obtenerTodos();
Combobox combo = new Combobox(); List<Via> lsVia = viaService.obtenerTodos();
combo.setMold("rounded"); combo.setModel(new ListModelList(lsVia));
combo.setWidth("100%"); combo.setSelectedItem(new Comboitem(rutaCombinacion.getTramo().getVia().getNombvia()));
viaService.obtenerTodos(); lc.appendChild(combo);
List<Via> lsVia = viaService.obtenerTodos(); lc.setParent(lstm);
combo.setModel(new ListModelList(lsVia));
combo.setSelectedItem(new Comboitem(rutaCombinacion.getTramo().getVia().getNombvia()));
lc.appendChild(combo); lstm.setAttribute("data", rutaCombinacion);
lc.setParent(lstm); }
lstm.setAttribute("data", rutaCombinacion);
}
} }

View File

@ -4,89 +4,81 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.ArrayList;
import java.util.List;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Button; import org.zkoss.zul.Button;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Grid;
import org.zkoss.zul.Label; import org.zkoss.zul.Label;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Radio; import org.zkoss.zul.Radio;
import org.zkoss.zul.Radiogroup; import org.zkoss.zul.Radiogroup;
import org.zkoss.zul.Row; import org.zkoss.zul.Row;
import org.zkoss.zul.RowRenderer; import org.zkoss.zul.RowRenderer;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
public class RenderCatalogoDeRutasCombinacionRow implements RowRenderer { public class RenderCatalogoDeRutasCombinacionRow implements RowRenderer {
private Grid demoGrid; public void render(Row row, java.lang.Object data) {
private MyListbox rutaCombinacionList;
public void render(Row row, java.lang.Object data) { RutaCombinacion rutaCombinacion = (RutaCombinacion) data;
RutaCombinacion rutaCombinacion = (RutaCombinacion) data; // the data append to each row with simple label
Textbox text = new Textbox((rutaCombinacion.getIndventa() == Boolean.TRUE) ? "Si" : "No");
text.setInplace(true);
row.appendChild(text);
// the data append to each row with simple label Radio radio = new Radio();
Textbox text = new Textbox((rutaCombinacion.getIndventa() == Boolean.TRUE) ? "Si" : "No"); radio.setLabel("Si");
text.setInplace(true); // radio.setId("Si");
row.appendChild(text); radio.setChecked((rutaCombinacion.getIndventa() == Boolean.TRUE) ? Boolean.TRUE : Boolean.FALSE);
Radio radio2 = new Radio();
radio2.setLabel("No");
// radio2.setId("No");
radio2.setChecked((rutaCombinacion.getIndventa() == Boolean.TRUE) ? Boolean.FALSE : Boolean.TRUE);
Radio radio = new Radio(); final Radiogroup radioGroup = new Radiogroup();
radio.setLabel("Si"); radioGroup.setId("radioGroup" + rutaCombinacion.getTramo().getDesctramo());
//radio.setId("Si"); radioGroup.appendChild(radio);
radio.setChecked((rutaCombinacion.getIndventa() == Boolean.TRUE) ? Boolean.TRUE : Boolean.FALSE); radioGroup.appendChild(radio2);
Radio radio2 = new Radio(); final Div d = new Div();
radio2.setLabel("No"); radioGroup.setParent(d);
//radio2.setId("No"); radioGroup.addEventListener(Events.ON_CLICK, new EventListener() {
radio2.setChecked((rutaCombinacion.getIndventa() == Boolean.TRUE) ? Boolean.FALSE : Boolean.TRUE);
final Radiogroup radioGroup = new Radiogroup(); public void onEvent(Event event) throws Exception {
radioGroup.setId("radioGroup" + rutaCombinacion.getTramo().getDesctramo());
radioGroup.appendChild(radio);
radioGroup.appendChild(radio2);
final Div d = new Div();
radioGroup.setParent(d);
radioGroup.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception { String retorno = radioGroup.getSelectedItem().getLabel();
d.appendChild(new Label(retorno));
}
});
row.appendChild(radioGroup);
row.appendChild(new Label(rutaCombinacion.getTramo().getDesctramo()));
String retorno = radioGroup.getSelectedItem().getLabel(); // we create a thumb up/down comment to each row
d.appendChild(new Label(retorno)); final Div d2 = new Div();
} final Button thumbBtn = new Button(null, "/gui/img/create_doc.gif");
}); thumbBtn.setParent(d2);
row.appendChild(radioGroup); thumbBtn.addEventListener(Events.ON_CLICK, new EventListener() {
row.appendChild(new Label(rutaCombinacion.getTramo().getDesctramo()));
// we create a thumb up/down comment to each row public void onEvent(Event event) throws Exception {
final Div d2 = new Div(); d2.appendChild(new Label("Desativado!!!"));
final Button thumbBtn = new Button(null, "/gui/img/create_doc.gif"); thumbBtn.setDisabled(true);
thumbBtn.setParent(d2); // Pega o MysListBox
thumbBtn.addEventListener(Events.ON_CLICK, new EventListener() { // List<RutaCombinacion> rc = new ArrayList<RutaCombinacion>();
// rutaCombinacionList = (MyListbox)
// d2.getFellow("rutaCombinacionList");
public void onEvent(Event event) throws Exception { // Pegar o dataGrid
d2.appendChild(new Label("Desativado!!!"));
thumbBtn.setDisabled(true);
//Pega o MysListBox
// List<RutaCombinacion> rc = new ArrayList<RutaCombinacion>();
// rutaCombinacionList = (MyListbox) d2.getFellow("rutaCombinacionList");
//Pegar o dataGrid d2.getFellow("demoGrid");
demoGrid = (Grid) d2.getFellow("demoGrid"); }
});
row.appendChild(d2); // Any component could created as a child of grid
}
}
});
row.appendChild(d2); // Any component could created as a child of grid
}
} }

View File

@ -10,26 +10,26 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
/** /**
* *
* @author Administrador * @author Administrador
*/ */
public class RenderClaseservicioEquivalencia implements ListitemRenderer { public class RenderClaseservicioEquivalencia implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
ClaseservicioEquivalencia claseservicioEquivalencia = (ClaseservicioEquivalencia) o; ClaseservicioEquivalencia claseservicioEquivalencia = (ClaseservicioEquivalencia) o;
Listcell lc = lc = new Listcell(claseservicioEquivalencia.getClaseservicioequivalenciaId().toString()); Listcell lc = new Listcell(claseservicioEquivalencia.getClaseservicioequivalenciaId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(claseservicioEquivalencia.getClaseservicio().getDescclase()); lc = new Listcell(claseservicioEquivalencia.getClaseservicio().getDescclase());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(claseservicioEquivalencia.getComisionistaExterno().getDesccomisionista()); lc = new Listcell(claseservicioEquivalencia.getComisionistaExterno().getDesccomisionista());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(claseservicioEquivalencia.getEquivalenciaId()); lc = new Listcell(claseservicioEquivalencia.getEquivalenciaId());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", claseservicioEquivalencia); lstm.setAttribute("data", claseservicioEquivalencia);
} }
} }

View File

@ -4,14 +4,14 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.CategoriaPeriodo;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.CategoriaPeriodo;
/** /**
* *
* @author Administrador * @author Administrador

View File

@ -4,58 +4,59 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.CortesiaBeneficiario;
import com.rjconsultores.ventaboletos.entidad.TipoCortesiaDescuento;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.CortesiaBeneficiario;
import com.rjconsultores.ventaboletos.entidad.TipoCortesiaDescuento;
/** /**
* *
* @author Shiro * @author Shiro
*/ */
public class RenderCortesiaBeneficiario implements ListitemRenderer { public class RenderCortesiaBeneficiario implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
CortesiaBeneficiario cortesiaBeneficiario = (CortesiaBeneficiario) o; CortesiaBeneficiario cortesiaBeneficiario = (CortesiaBeneficiario) o;
DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US)); DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US));
StringBuilder sb = new StringBuilder("");
if (cortesiaBeneficiario.getNombBenef() != null){
sb.append(cortesiaBeneficiario.getNombBenef()).append(" ");
}
if (cortesiaBeneficiario.getNombPaterno()!= null){
sb.append(cortesiaBeneficiario.getNombPaterno()).append(" ");
}
if (cortesiaBeneficiario.getNombMaterno()!= null){
sb.append(cortesiaBeneficiario.getNombMaterno());
}
Listcell lc = new Listcell(sb.toString());
lc.setParent(lstm);
if (cortesiaBeneficiario.getIndtipobenef() != null) { StringBuilder sb = new StringBuilder("");
String status; if (cortesiaBeneficiario.getNombBenef() != null) {
if (cortesiaBeneficiario.getIndtipobenef().equals("E")) { sb.append(cortesiaBeneficiario.getNombBenef()).append(" ");
status = "Empleado"; }
} else { if (cortesiaBeneficiario.getNombPaterno() != null) {
status = "Familiar"; sb.append(cortesiaBeneficiario.getNombPaterno()).append(" ");
} }
lc = new Listcell(status); if (cortesiaBeneficiario.getNombMaterno() != null) {
} else { sb.append(cortesiaBeneficiario.getNombMaterno());
lc = new Listcell("-"); }
} Listcell lc = new Listcell(sb.toString());
lc.setParent(lstm); lc.setParent(lstm);
TipoCortesiaDescuento tcd = cortesiaBeneficiario.getDescuento(); if (cortesiaBeneficiario.getIndtipobenef() != null) {
if (tcd != null) { String status;
lc = new Listcell(df.format(tcd.getPorcdescuento())); if (cortesiaBeneficiario.getIndtipobenef().equals("E")) {
} else { status = "Empleado";
lc = new Listcell("-"); } else {
} status = "Familiar";
lc.setParent(lstm); }
lc = new Listcell(status);
} else {
lc = new Listcell("-");
}
lc.setParent(lstm);
lstm.setAttribute("data", cortesiaBeneficiario); TipoCortesiaDescuento tcd = cortesiaBeneficiario.getDescuento();
} if (tcd != null) {
lc = new Listcell(df.format(tcd.getPorcdescuento()));
} else {
lc = new Listcell("-");
}
lc.setParent(lstm);
lstm.setAttribute("data", cortesiaBeneficiario);
}
} }

View File

@ -4,33 +4,32 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.ProdMarca;
import java.math.BigDecimal;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.ProdMarca;
/** /**
* *
* @author Administrador * @author Administrador
*/ */
public class RenderCyberViajeProdMarca implements ListitemRenderer { public class RenderCyberViajeProdMarca implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
ProdMarca prodMarca = (ProdMarca) o; ProdMarca prodMarca = (ProdMarca) o;
Listcell lc = null; Listcell lc = null;
Marca marca = prodMarca.getMarca(); Marca marca = prodMarca.getMarca();
if (marca != null) { if (marca != null) {
lc = new Listcell(marca.getDescmarca()); lc = new Listcell(marca.getDescmarca());
} else { } else {
lc = new Listcell(""); lc = new Listcell("");
} }
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", prodMarca);
lstm.setAttribute("data", prodMarca); }
}
} }

View File

@ -4,37 +4,35 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.ProdPrecio;
import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.ProdPrecio;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
public class RenderCyberViajeProdPrecio implements ListitemRenderer { public class RenderCyberViajeProdPrecio implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
ProdPrecio prodMarca = (ProdPrecio) o; ProdPrecio prodMarca = (ProdPrecio) o;
SimpleDateFormat formatoData = new SimpleDateFormat("dd/MM/yyyy"); DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US));
DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US));
Listcell lc = null; Listcell lc = null;
lc = new Listcell(prodMarca.getMarca() == null ? "" : prodMarca.getMarca().getDescmarca()); lc = new Listcell(prodMarca.getMarca() == null ? "" : prodMarca.getMarca().getDescmarca());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(prodMarca.getImporteinicial() == null ? "" : df.format(prodMarca.getImporteinicial())); lc = new Listcell(prodMarca.getImporteinicial() == null ? "" : df.format(prodMarca.getImporteinicial()));
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(prodMarca.getImportefinal() == null ? "" : df.format(prodMarca.getImportefinal())); lc = new Listcell(prodMarca.getImportefinal() == null ? "" : df.format(prodMarca.getImportefinal()));
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(prodMarca.getPrecio() == null ? "" : df.format(prodMarca.getPrecio())); lc = new Listcell(prodMarca.getPrecio() == null ? "" : df.format(prodMarca.getPrecio()));
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", prodMarca);
lstm.setAttribute("data", prodMarca); }
}
} }

View File

@ -10,26 +10,26 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
/** /**
* *
* @author Administrador * @author Administrador
*/ */
public class RenderEmpresaEquivalencia implements ListitemRenderer { public class RenderEmpresaEquivalencia implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
EmpresaEquivalencia empresaEquivalencia = (EmpresaEquivalencia) o; EmpresaEquivalencia empresaEquivalencia = (EmpresaEquivalencia) o;
Listcell lc = lc = new Listcell(empresaEquivalencia.getEmpresaequivalenciaId().toString()); Listcell lc = new Listcell(empresaEquivalencia.getEmpresaequivalenciaId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(empresaEquivalencia.getEmpresa().getNombempresa()); lc = new Listcell(empresaEquivalencia.getEmpresa().getNombempresa());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(empresaEquivalencia.getComisionistaExterno().getDesccomisionista()); lc = new Listcell(empresaEquivalencia.getComisionistaExterno().getDesccomisionista());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(empresaEquivalencia.getEquivalenciaId()); lc = new Listcell(empresaEquivalencia.getEquivalenciaId());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", empresaEquivalencia); lstm.setAttribute("data", empresaEquivalencia);
} }
} }

View File

@ -4,41 +4,53 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Estado; import java.math.BigDecimal;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
/** /**
* *
* @author MCosso * @author MCosso
*/ */
public class RenderEstado implements ListitemRenderer { public class RenderEstado implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
Estado estado = (Estado) o; Estado estado = (Estado) o;
Listcell lc = new Listcell(); Listcell lc = new Listcell();
lc = new Listcell(estado.getEstadoId().toString()); lc = new Listcell(estado.getEstadoId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(estado.getNombestado()); lc = new Listcell(estado.getNombestado());
lc.setParent(lstm); lc.setParent(lstm);
if (estado.getPais() != null) { if (estado.getPais() != null) {
lc = new Listcell(estado.getPais().getNombpais()); lc = new Listcell(estado.getPais().getNombpais());
} else { } else {
lc = new Listcell(""); lc = new Listcell("");
} }
lc.setParent(lstm); lc.setParent(lstm);
if (ApplicationProperties.getInstance().mostrarEquivalencia()) { BigDecimal icms = estado.getIcms();
lc = new Listcell(estado.getEquivalenciaId()); if (icms != null) {
lc.setParent(lstm); lc = new Listcell(icms.setScale(3).toString());
}
lstm.setAttribute("data", estado); } else {
} lc = new Listcell("");
}
lc.setParent(lstm);
if (ApplicationProperties.getInstance().mostrarEquivalencia()) {
lc = new Listcell(estado.getEquivalenciaId());
lc.setParent(lstm);
}
lstm.setAttribute("data", estado);
}
} }

View File

@ -10,29 +10,29 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
/** /**
* *
* @author Administrador * @author Administrador
*/ */
public class RenderParadaEquivalencia implements ListitemRenderer { public class RenderParadaEquivalencia implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
ParadaEquivalencia paradaEquivalencia = (ParadaEquivalencia) o; ParadaEquivalencia paradaEquivalencia = (ParadaEquivalencia) o;
Listcell lc = lc = new Listcell(paradaEquivalencia.getParadaequivalenciaId().toString()); Listcell lc = new Listcell(paradaEquivalencia.getParadaequivalenciaId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(paradaEquivalencia.getParada().getDescparada()); lc = new Listcell(paradaEquivalencia.getParada().getDescparada());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(paradaEquivalencia.getParada().getCveparada()); lc = new Listcell(paradaEquivalencia.getParada().getCveparada());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(paradaEquivalencia.getComisionistaExterno().getDesccomisionista()); lc = new Listcell(paradaEquivalencia.getComisionistaExterno().getDesccomisionista());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(paradaEquivalencia.getEquivalenciaId()); lc = new Listcell(paradaEquivalencia.getEquivalenciaId());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", paradaEquivalencia); lstm.setAttribute("data", paradaEquivalencia);
} }
} }

View File

@ -4,18 +4,19 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.text.SimpleDateFormat;
import java.util.List;
import org.zkoss.zkplus.spring.SpringUtil;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.PricingCorrida; import com.rjconsultores.ventaboletos.entidad.PricingCorrida;
import com.rjconsultores.ventaboletos.entidad.Ruta; import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia; import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
import com.rjconsultores.ventaboletos.entidad.Tramo; import com.rjconsultores.ventaboletos.entidad.Tramo;
import com.rjconsultores.ventaboletos.service.RutaSecuenciaService; import com.rjconsultores.ventaboletos.service.RutaSecuenciaService;
import java.text.SimpleDateFormat;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.zkoss.zkplus.spring.SpringUtil;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
/** /**
* *

View File

@ -4,14 +4,12 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.ProdMarca;
import com.rjconsultores.ventaboletos.entidad.ProductoServicio;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.ProductoServicio;
/** /**
* *
* @author Shiro * @author Shiro

View File

@ -4,13 +4,13 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Ciudad;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
/** /**
* *
* @author Administrador * @author Administrador

View File

@ -4,34 +4,34 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.ParamCostoTarjeta;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.ParamCostoTarjeta;
/** /**
* *
* @author Rafius * @author Rafius
*/ */
public class RenderSendaAmigoParamCostoTarjeta implements ListitemRenderer { public class RenderSendaAmigoParamCostoTarjeta implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
SimpleDateFormat formatoData = new SimpleDateFormat("dd/MM/yyyy"); DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US));
DecimalFormat df = new DecimalFormat("###,###,##0.00",new java.text.DecimalFormatSymbols(java.util.Locale.US));
ParamCostoTarjeta pct = (ParamCostoTarjeta) o;
Listcell lc = new Listcell(pct.getParamcostotarjetaId().toString()); ParamCostoTarjeta pct = (ParamCostoTarjeta) o;
lc.setParent(lstm);
lc = new Listcell(pct.getEmpresa().getNombempresa()); Listcell lc = new Listcell(pct.getParamcostotarjetaId().toString());
lc.setParent(lstm); lc.setParent(lstm);
lc = new Listcell(df.format(pct.getValcostoinicial())); lc = new Listcell(pct.getEmpresa().getNombempresa());
lc.setParent(lstm); lc.setParent(lstm);
lstm.setAttribute("data", pct); lc = new Listcell(df.format(pct.getValcostoinicial()));
} lc.setParent(lstm);
lstm.setAttribute("data", pct);
}
} }

View File

@ -4,14 +4,15 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Tarifa;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.Tarifa;
/** /**
* *
* @author rodrigo * @author rodrigo

View File

@ -1,7 +1,5 @@
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.math.RoundingMode;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;

View File

@ -4,12 +4,12 @@
*/ */
package com.rjconsultores.ventaboletos.web.utilerias.render; package com.rjconsultores.ventaboletos.web.utilerias.render;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.TramoKmServicio;
import org.zkoss.zul.Listcell; import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer; import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.TramoKmServicio;
/** /**
* *
* @author Desenvolvimento * @author Desenvolvimento

View File

@ -1,12 +1,9 @@
package com.rjconsultores.ventaboletos.web.utilerias.servlet; package com.rjconsultores.ventaboletos.web.utilerias.servlet;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import javax.servlet.ServletContext;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;

View File

@ -2943,6 +2943,7 @@ busquedaEstadoController.lhId.label = ID
busquedaEstadoController.lhDesc.label = Descrição busquedaEstadoController.lhDesc.label = Descrição
busquedaEstadoController.txtNombre.label = Estado busquedaEstadoController.txtNombre.label = Estado
busquedaEstadoController.lhPais.label = País busquedaEstadoController.lhPais.label = País
busquedaEstadoController.ICMS.label = ICMS
# Pantalla Editar Estado # Pantalla Editar Estado
editarEstadoController.window.title = Estado editarEstadoController.window.title = Estado

View File

@ -7,7 +7,7 @@
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaEstado" title="${c:l('busquedaEstadoController.window.title')}" <window id="winBusquedaEstado" title="${c:l('busquedaEstadoController.window.title')}"
apply="${busquedaEstadoController}" contentStyle="overflow:auto" apply="${busquedaEstadoController}" contentStyle="overflow:auto"
height="450px" width="600px" border="normal" > height="400px" width="650px" border="normal" >
<toolbar> <toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px" <button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
@ -53,7 +53,7 @@
<listbox id="estadoList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" <listbox id="estadoList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false"> vflex="true" multiple="false">
<listhead sizable="true"> <listhead sizable="true">
<listheader width="70px" image="/gui/img/builder.gif" <listheader width="15%" image="/gui/img/builder.gif"
label="${c:l('busquedaEstadoController.lhId.label')}" label="${c:l('busquedaEstadoController.lhId.label')}"
sort="auto(estadoId)"/> sort="auto(estadoId)"/>
<listheader image="/gui/img/builder.gif" <listheader image="/gui/img/builder.gif"
@ -62,6 +62,9 @@
<listheader image="/gui/img/builder.gif" <listheader image="/gui/img/builder.gif"
label="${c:l('busquedaEstadoController.lhPais.label')}" label="${c:l('busquedaEstadoController.lhPais.label')}"
sort="auto(pais.paisId)"/> sort="auto(pais.paisId)"/>
<listheader image="/gui/img/builder.gif" width="20%"
label="${c:l('busquedaEstadoController.ICMS.label')}"
sort="auto(icms)"/>
<listheader id="headerEquivalencia" image="/gui/img/create_doc.gif" <listheader id="headerEquivalencia" image="/gui/img/create_doc.gif"
label="${c:l('lb.Equivalencia')}" label="${c:l('lb.Equivalencia')}"
sort="auto(equivalenciaId)"/> sort="auto(equivalenciaId)"/>

View File

@ -5,47 +5,56 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?> <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaTipoVenta" title="${c:l('busquedaTipoVentaController.window.title')}" <window id="winBusquedaTipoVenta"
apply="${busquedaTipoVentaController}" contentStyle="overflow:auto" title="${c:l('busquedaTipoVentaController.window.title')}"
height="350px" width="600px" border="normal" > apply="${busquedaTipoVentaController}" contentStyle="overflow:auto"
<toolbar> height="350px" width="600px" border="normal">
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px" <toolbar>
tooltiptext="${c:l('busquedaTipoVentaController.btnRefresh.tooltiptext')}" /> <button id="btnRefresh" image="/gui/img/refresh.png"
<separator orient="vertical" /> width="35px"
<button id="btnNovo" image="/gui/img/add.png" width="35px" tooltiptext="${c:l('busquedaTipoVentaController.btnRefresh.tooltiptext')}" />
tooltiptext="${c:l('busquedaTipoVentaController.btnNovo.tooltiptext')}" /> <separator orient="vertical" />
<separator orient="vertical" /> <button id="btnNovo" image="/gui/img/add.png" width="35px"
<button id="btnCerrar" onClick="winBusquedaTipoVenta.detach()" image="/gui/img/exit.png" width="35px" tooltiptext="${c:l('busquedaTipoVentaController.btnNovo.tooltiptext')}" />
tooltiptext="${c:l('busquedaTipoVentaController.btnCerrar.tooltiptext')}"/> <separator orient="vertical" />
</toolbar> <button id="btnCerrar"
onClick="winBusquedaTipoVenta.detach()" image="/gui/img/exit.png"
width="35px"
tooltiptext="${c:l('busquedaTipoVentaController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true"> <grid fixedLayout="true">
<columns> <columns>
<column width="80px" /> <column width="20%" />
<column width="100px" /> <column width="80%" />
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${c:l('busquedaTipoVentaController.txtNombre.label')}"/> <label
<textbox id="txtNombre" width="300px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/> value="${c:l('busquedaTipoVentaController.txtNombre.label')}" />
</row> <textbox id="txtNombre" width="98%"
</rows> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</grid> </row>
</rows>
<toolbar> </grid>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaTipoVentaController.btnPesquisa.label')}"/>
</toolbar>
<paging id="pagingTipoVenta" pageSize="20" /> <toolbar>
<listbox id="tipoVentaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" <button id="btnPesquisa" image="/gui/img/find.png"
vflex="true" multiple="false"> label="${c:l('busquedaTipoVentaController.btnPesquisa.label')}" />
<listhead sizable="true"> </toolbar>
<listheader image="/gui/img/create_doc.gif" width="55px"
label="${c:l('busquedaTipoVentaController.lhId.label')}" sort="auto(tipoventaId)"/> <paging id="pagingTipoVenta" pageSize="20" />
<listheader id="lhDesc" image="/gui/img/create_doc.gif" <listbox id="tipoVentaList"
label="${c:l('busquedaTipoVentaController.lhDesc.label')}" sort="auto(desctipoventa)"/> use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
</listhead> vflex="true" multiple="false">
</listbox> <listhead sizable="true">
</window> <listheader image="/gui/img/create_doc.gif" width="55px"
label="${c:l('busquedaTipoVentaController.lhId.label')}"
sort="auto(tipoventaId)" />
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaTipoVentaController.lhDesc.label')}"
sort="auto(desctipoventa)" />
</listhead>
</listbox>
</window>
</zk> </zk>

View File

@ -5,52 +5,62 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?> <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarEstado" border="normal" <window id="winEditarEstado" border="normal"
apply="${editarEstadoController}" apply="${editarEstadoController}" width="400px" height="557x"
width="400px" height="557x" contentStyle="overflow:auto" contentStyle="overflow:auto"
title="${c:l('editarEstadoController.window.title')}"> title="${c:l('editarEstadoController.window.title')}">
<toolbar> <toolbar>
<hbox spacing="5px" style="padding:1px" align="right"> <hbox spacing="5px" style="padding:1px" align="right">
<button id="btnApagar" height="20" <button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px" image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarEstadoController.btnApagar.tooltiptext')}"/> tooltiptext="${c:l('editarEstadoController.btnApagar.tooltiptext')}" />
<button id="btnSalvar" height="20" <button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px" image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarEstadoController.btnSalvar.tooltiptext')}"/> tooltiptext="${c:l('editarEstadoController.btnSalvar.tooltiptext')}" />
<button id="btnFechar" height="20" <button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px" image="/gui/img/exit.png" width="35px"
onClick="winEditarEstado.detach()" onClick="winEditarEstado.detach()"
tooltiptext="${c:l('editarEstadoController.btnFechar.tooltiptext')}"/> tooltiptext="${c:l('editarEstadoController.btnFechar.tooltiptext')}" />
</hbox> </hbox>
</toolbar> </toolbar>
<grid fixedLayout="true"> <grid fixedLayout="true">
<columns> <columns>
<column width="40%" /> <column width="40%" />
<column width="60%" /> <column width="60%" />
</columns> </columns>
<rows> <rows>
<row> <row>
<label id="lbNome" value="${c:l('busquedaEstadoController.lhDesc.label')}"/> <label id="lbNome"
<textbox id="txtNome" constraint="no empty" width="90%" maxlength="30" value="${c:l('busquedaEstadoController.lhDesc.label')}" />
value="@{winEditarEstado$composer.estado.nombestado}" <textbox id="txtNome" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/> width="90%" maxlength="30"
</row> value="@{winEditarEstado$composer.estado.nombestado}"
<row> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
<label value="${c:l('editarEstadoController.lbPais.value')}"/> </row>
<combobox id="cmbPais" width="90%" mold="rounded" buttonVisible="true" <row>
constraint="no empty" <label
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarEstadoController.lbPais.value')}" />
model="@{winEditarEstado$composer.lsPais}" <combobox id="cmbPais" width="90%" mold="rounded"
selectedItem="@{winEditarEstado$composer.estado.pais}" /> buttonVisible="true" constraint="no empty"
</row> use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
<row id="rowEquivalencia"> model="@{winEditarEstado$composer.lsPais}"
<label value="${c:l('lb.Equivalencia')}"/> selectedItem="@{winEditarEstado$composer.estado.pais}" />
<textbox id="txtEquivalencia" width="100px" maxlength="10" </row>
value="@{winEditarEstado$composer.estado.equivalenciaId}" <row>
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/> <label
</row> value="${c:l('busquedaEstadoController.ICMS.label')}" />
</rows> <decimalbox id="txtIcms"
</grid> value="@{winEditarEstado$composer.estado.icms}" />
</window> </row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}" />
<textbox id="txtEquivalencia" width="100px"
maxlength="10"
value="@{winEditarEstado$composer.estado.equivalenciaId}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
</rows>
</grid>
</window>
</zk> </zk>