bug#10974
dev:thiago qua:junia git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@81328 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
392038a1f1
commit
130b24247b
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -23,6 +24,7 @@ import org.zkoss.zul.api.Comboitem;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.GrupoCategoria;
|
||||
import com.rjconsultores.ventaboletos.enums.TipoDescontoMonitrip;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.GrupoCategoriaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
@ -53,18 +55,22 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
|
|||
private MyTextbox txtCvecategoria;
|
||||
private MyTextbox txtDescImpresionGratuidade;
|
||||
private Combobox cmbGrupoCategoria;
|
||||
private Combobox cmbDescontoMonitrip;
|
||||
|
||||
private Checkbox chkIndemitetermorecusa;
|
||||
private Checkbox chkIndnaousaassento;
|
||||
|
||||
private List<GrupoCategoria> lsGrupoCategoria;
|
||||
|
||||
private List<TipoDescontoMonitrip> lsTipoDescontoMonitrips;
|
||||
|
||||
private static String CVESISTEMA_FIDELIDADE = "FIDELIDADE";
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
lsGrupoCategoria = grupoCategoriaService.obtenerTodos();
|
||||
lsTipoDescontoMonitrips = Arrays.asList(TipoDescontoMonitrip.values());
|
||||
|
||||
GrupoCategoria branco = new GrupoCategoria();
|
||||
branco.setDescGrupo("\t\t");
|
||||
|
@ -130,16 +136,11 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
|
|||
categoria.setGrupoCategoria(null);
|
||||
}
|
||||
|
||||
/*if (categoria.getCategoriaId() != null) {
|
||||
List<Categoria> lsCategoria = categoriaService.buscar(categoria.getDesccategoria());
|
||||
if (!lsCategoria.isEmpty()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarCategoriaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
Comboitem cbDescontoMonitrip = cmbDescontoMonitrip.getSelectedItem();
|
||||
categoria.setTipoDescontoMonitrip(null);
|
||||
if(cbDescontoMonitrip != null) {
|
||||
categoria.setTipoDescontoMonitrip((TipoDescontoMonitrip) cbDescontoMonitrip.getValue());
|
||||
}
|
||||
|
||||
if (categoria.getCategoriaId() == null) {
|
||||
List<Categoria> lsCategoria =
|
||||
|
@ -242,4 +243,12 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
|
|||
this.grupoCategoriaService = grupoCategoriaService;
|
||||
}
|
||||
|
||||
public List<TipoDescontoMonitrip> getLsTipoDescontoMonitrips() {
|
||||
return lsTipoDescontoMonitrips;
|
||||
}
|
||||
|
||||
public void setLsTipoDescontoMonitrips(List<TipoDescontoMonitrip> lsTipoDescontoMonitrips) {
|
||||
this.lsTipoDescontoMonitrips = lsTipoDescontoMonitrips;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1065,6 +1065,7 @@ editarCategoriaController.lbIndconferenciafisicacomissao.value = Requerir Comisi
|
|||
editarCategoriaController.lbIndemitetermorecusa.value = Emite término de rechaza
|
||||
editarCategoriaController.lbIndnaousaassento.value = No usar asiento en la venta de paquetes
|
||||
editarCategoriaController.lbCvecategoria.value = Sigla
|
||||
editarCategoriaController.lbDescontoMonitrip.value=Descuento Monitrip
|
||||
|
||||
# Muestra a Moneda da Búsqueda
|
||||
busquedaMonedaController.window.title = Moneda
|
||||
|
|
|
@ -1147,6 +1147,7 @@ editarCategoriaController.lbIndconferenciafisicacomissao.value = Exigir Conferê
|
|||
editarCategoriaController.lbIndemitetermorecusa.value = Emite Termo de Recusa
|
||||
editarCategoriaController.lbIndnaousaassento.value = Não usar assento na venda de pacote
|
||||
editarCategoriaController.lbCvecategoria.value = Sigla
|
||||
editarCategoriaController.lbDescontoMonitrip.value=Desconto Monitrip
|
||||
|
||||
# Muestra a Moeda da Pesquisa
|
||||
busquedaMonedaController.window.title = Moeda
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarCategoria" border="normal"
|
||||
apply="${editarCategoriaController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
width="500px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarCategoriaController.window.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
|
@ -54,6 +54,15 @@
|
|||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarCategoria$composer.lsGrupoCategoria}"
|
||||
selectedItem="@{winEditarCategoria$composer.categoria.grupoCategoria}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarCategoriaController.lbDescontoMonitrip.value')}" />
|
||||
<combobox id="cmbDescontoMonitrip"
|
||||
mold="rounded" buttonVisible="true" width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarCategoria$composer.lsTipoDescontoMonitrips}"
|
||||
selectedItem="@{winEditarCategoria$composer.categoria.tipoDescontoMonitrip}" />
|
||||
</row>
|
||||
<row>
|
||||
<label id="lbIndemitetermorecusa"
|
||||
|
|
Loading…
Reference in New Issue