fixes bug #7867
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@60259 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2ba7d8d144
commit
6f95a3c519
|
@ -175,24 +175,28 @@ public class EditarOrgaoConcedenteController extends MyGenericForwardComposer {
|
|||
|
||||
public void onClick$btnAdicionarClassePeaje(Event ev) throws InterruptedException {
|
||||
cmbClasseServicio.setConstraint("no empty");
|
||||
txtIndicePeajClasse.setConstraint("no empty,no negative, /[0-9]+(\\,[0-9][0-9]?)?|/ ");
|
||||
|
||||
if (!classeExistente((ClaseServicio) cmbClasseServicio.getSelectedItem().getValue())
|
||||
&& txtIndicePeajClasse.getValueDecimal() != null) {
|
||||
if (!classeExistente((ClaseServicio) cmbClasseServicio.getSelectedItem().getValue())) {
|
||||
if (txtIndicePeajClasse.getValueDecimal() != null
|
||||
&& !txtIndicePeajClasse.getValueDecimal().equals(BigDecimal.ZERO)) {
|
||||
ClasseIndicePeaje classeIndicePeaje = new ClasseIndicePeaje();
|
||||
classeIndicePeaje.setActivo(true);
|
||||
classeIndicePeaje.setClasseServicio((ClaseServicio) cmbClasseServicio.getSelectedItem().getValue());
|
||||
classeIndicePeaje.setOrgaoConcedente(orgaoConcedente);
|
||||
classeIndicePeaje.setIndicePeaje(txtIndicePeajClasse.getValueDecimal());
|
||||
|
||||
ClasseIndicePeaje classeIndicePeaje = new ClasseIndicePeaje();
|
||||
classeIndicePeaje.setActivo(true);
|
||||
classeIndicePeaje.setClasseServicio((ClaseServicio) cmbClasseServicio.getSelectedItem().getValue());
|
||||
classeIndicePeaje.setOrgaoConcedente(orgaoConcedente);
|
||||
classeIndicePeaje.setIndicePeaje(txtIndicePeajClasse.getValueDecimal());
|
||||
cmbClasseServicio.setConstraint("");
|
||||
txtIndicePeajClasse.setConstraint("");
|
||||
|
||||
cmbClasseServicio.setConstraint("");
|
||||
txtIndicePeajClasse.setConstraint("");
|
||||
|
||||
lsClasseIndicePeajes.add(classeIndicePeaje);
|
||||
listBoxIndicePeaj.addItemNovo(classeIndicePeaje);
|
||||
cmbClasseServicio.setSelectedItem(null);
|
||||
txtIndicePeajClasse.setText("");
|
||||
lsClasseIndicePeajes.add(classeIndicePeaje);
|
||||
listBoxIndicePeaj.addItemNovo(classeIndicePeaje);
|
||||
cmbClasseServicio.setSelectedItem(null);
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarOrgaoConcedenteController.MSG.indicePeajeZeroInvalido"),
|
||||
Labels.getLabel("editarOrgaoConcedenteController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClasseIndicePeaje;
|
||||
|
||||
public class RenderClasseIndicePeaj implements ListitemRenderer {
|
||||
public class RenderClasseIndicePeaj implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem arg0, Object arg1) throws Exception {
|
||||
ClasseIndicePeaje classeIndicePeaje = (ClasseIndicePeaje) arg1;
|
||||
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#0.00");
|
||||
|
||||
Listcell lc = new Listcell(classeIndicePeaje.getClasseServicio().getDescclase());
|
||||
lc.setParent(arg0);
|
||||
|
||||
lc = new Listcell(classeIndicePeaje.getIndicePeaje().toString());
|
||||
lc = new Listcell(decimalFormat.format(classeIndicePeaje.getIndicePeaje()));
|
||||
lc.setParent(arg0);
|
||||
|
||||
arg0.setAttribute("data", classeIndicePeaje);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
DELETE FROM CLASSE_INDICE_PEAJE;
|
||||
|
||||
ALTER TABLE CLASSE_INDICE_PEAJE
|
||||
MODIFY (INDICE_PEAJE NUMERIC(7,2));
|
|
@ -84,7 +84,8 @@
|
|||
<label style="margin-left:5px;"
|
||||
value="${c:l('busquedaOrgaoConcedenteController.indicePeaje.label')}" />
|
||||
<textbox id="txtIndicePeajClasse"
|
||||
maxlength="8" mold="rounded"
|
||||
maxlength="8" mold="rounded"
|
||||
constraint=" no negative, /[0-9]+(\,[0-9][0-9]?)?|/ "
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
|
||||
<button id="btnAdicionarClassePeaje"
|
||||
|
|
Loading…
Reference in New Issue