git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@24796 d1611594-4594-4d17-8e1d-87c2c4800839
parent
1e4024349a
commit
76a936bc7c
|
@ -14,6 +14,8 @@ import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.WrongValueException;
|
import org.zkoss.zk.ui.WrongValueException;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Checkbox;
|
import org.zkoss.zul.Checkbox;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Row;
|
import org.zkoss.zul.Row;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
@ -45,6 +47,7 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
||||||
private Timebox timeTempoPermitir;
|
private Timebox timeTempoPermitir;
|
||||||
private Radio rdCuotaSi;
|
private Radio rdCuotaSi;
|
||||||
private Radio rdTrecho;
|
private Radio rdTrecho;
|
||||||
|
private Combobox cmbIndGeneraFeriado;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
@ -53,6 +56,8 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
popularCombobox(cmbIndGeneraFeriado);
|
||||||
|
|
||||||
if ((categoriaDescuento.getDescuentoimporte() != null) && (!categoriaDescuento.getDescuentoimporte().equals(BigDecimal.ZERO))) {
|
if ((categoriaDescuento.getDescuentoimporte() != null) && (!categoriaDescuento.getDescuentoimporte().equals(BigDecimal.ZERO))) {
|
||||||
radioImp.setSelected(true);
|
radioImp.setSelected(true);
|
||||||
descuentoPorc.setDisabled(true);
|
descuentoPorc.setDisabled(true);
|
||||||
|
@ -77,6 +82,17 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
||||||
}else{
|
}else{
|
||||||
mudarCamposCuota(false);
|
mudarCamposCuota(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (categoriaDescuento.getIndAplicaFeriado() != null) {
|
||||||
|
if (categoriaDescuento.getIndAplicaFeriado() .equals("S")) {
|
||||||
|
cmbIndGeneraFeriado.setSelectedIndex(0);
|
||||||
|
} else if (categoriaDescuento.getIndAplicaFeriado() .equals("F")) {
|
||||||
|
cmbIndGeneraFeriado.setSelectedIndex(1);
|
||||||
|
} else if (categoriaDescuento.getIndAplicaFeriado() .equals("N")) {
|
||||||
|
cmbIndGeneraFeriado.setSelectedIndex(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) {
|
public void onClick$btnSalvar(Event ev) {
|
||||||
|
@ -85,7 +101,7 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
||||||
} else if (radioNaoImprimePassagem.isSelected()) {
|
} else if (radioNaoImprimePassagem.isSelected()) {
|
||||||
categoriaDescuento.setIndImprimeBoleto(Boolean.FALSE);
|
categoriaDescuento.setIndImprimeBoleto(Boolean.FALSE);
|
||||||
}
|
}
|
||||||
|
categoriaDescuento.setIndAplicaFeriado((String) cmbIndGeneraFeriado.getSelectedItem().getValue());
|
||||||
categoriaDescuento.setIndCuota(false);
|
categoriaDescuento.setIndCuota(false);
|
||||||
categoriaDescuento.setIndCuotaTramo(false);
|
categoriaDescuento.setIndCuotaTramo(false);
|
||||||
|
|
||||||
|
@ -144,4 +160,22 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
||||||
public void onClick$rdCuotaNo(Event ev) {
|
public void onClick$rdCuotaNo(Event ev) {
|
||||||
mudarCamposCuota(false);
|
mudarCamposCuota(false);
|
||||||
}
|
}
|
||||||
|
public void popularCombobox(Combobox cmb) throws Exception {
|
||||||
|
|
||||||
|
clearCombobox(cmb);
|
||||||
|
for (CategoriaDescuento.DisponibilidadeFeriado p : CategoriaDescuento.DisponibilidadeFeriado.values()) {
|
||||||
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
|
comboItem.setValue(p.valor());
|
||||||
|
comboItem.setParent(cmb);
|
||||||
|
}
|
||||||
|
|
||||||
|
cmb.setSelectedIndex(0);
|
||||||
|
}
|
||||||
|
public void clearCombobox(Combobox combobox) {
|
||||||
|
int size = combobox.getItemCount();
|
||||||
|
|
||||||
|
for (int i = size - 1; i >= 0; i--) {
|
||||||
|
combobox.removeItemAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,18 +4,16 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.CategoriaDescuento;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.CategoriaPeriodo;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.zkoss.zul.Comboitem;
|
|
||||||
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.CategoriaDescuento;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CategoriaPeriodo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
|
@ -66,7 +64,7 @@ public class RenderConfiguracionCategoriaDecuento implements ListitemRenderer {
|
||||||
|
|
||||||
String aplicaFeriado = "";
|
String aplicaFeriado = "";
|
||||||
if (categoria.getIndAplicaFeriado() != null) {
|
if (categoria.getIndAplicaFeriado() != null) {
|
||||||
for (EsquemaCorrida.GerarFeriado p : EsquemaCorrida.GerarFeriado.values()) {
|
for (CategoriaDescuento.DisponibilidadeFeriado p : CategoriaDescuento.DisponibilidadeFeriado.values()) {
|
||||||
if (p.valor().equals(categoria.getIndAplicaFeriado())) {
|
if (p.valor().equals(categoria.getIndAplicaFeriado())) {
|
||||||
aplicaFeriado = p.descricao();
|
aplicaFeriado = p.descricao();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20130228_1RC123
|
versao = ADM_20130228_1RC124
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
|
|
@ -80,6 +80,13 @@
|
||||||
maxValue="100" constraint="no empty" width="50%" maxlength="9"
|
maxValue="100" constraint="no empty" width="50%" maxlength="9"
|
||||||
value="@{winEditarConfiguracionCategoriasDatosCategoria$composer.categoriaDescuento.descuentoporc,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
value="@{winEditarConfiguracionCategoriasDatosCategoria$composer.categoriaDescuento.descuentoporc,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarConfiguracionCategoriaController.lblFeriado.value')}" />
|
||||||
|
<combobox id="cmbIndGeneraFeriado"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
constraint="no empty" mold="rounded" width="99%" />
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarConfiguracionCategoriaController.lblCotaObli.value')}" />
|
<label value="${c:l('editarConfiguracionCategoriaController.lblCotaObli.value')}" />
|
||||||
<radiogroup>
|
<radiogroup>
|
||||||
|
|
Loading…
Reference in New Issue