fixes bug #9035
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@70941 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
59ca35dc93
commit
ba140b66e0
|
@ -29,6 +29,7 @@ import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
|||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Moneda;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Plaza;
|
||||
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
|
@ -177,6 +178,28 @@ public class EditarTarifaMinimaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
cmbCoeficienteTarifa.setSelectedItem(null);
|
||||
cmbOrigem.setSelectedItem(null);
|
||||
cmbOrigem.setValue("");
|
||||
cmbDestino.setSelectedItem(null);
|
||||
cmbDestino.setValue("");
|
||||
}
|
||||
|
||||
public void onChange$cmbOrigem(InputEvent ev) {
|
||||
|
||||
if (ev.isChangingBySelectBack()) {
|
||||
return;
|
||||
}
|
||||
|
||||
cmbRegionMetropolitana.setSelectedItem(null);
|
||||
}
|
||||
|
||||
public void onChange$cmbDestino(InputEvent ev) {
|
||||
|
||||
if (ev.isChangingBySelectBack()) {
|
||||
return;
|
||||
}
|
||||
|
||||
cmbRegionMetropolitana.setSelectedItem(null);
|
||||
}
|
||||
|
||||
public void onChange$cmbCoeficienteTarifa(InputEvent ev) {
|
||||
|
@ -194,8 +217,8 @@ public class EditarTarifaMinimaController extends MyGenericForwardComposer {
|
|||
cmbMoneda.getValue();
|
||||
cmbPlaza.getValue();
|
||||
cmbMarca.getValue();
|
||||
cmbOrigem.getValue(true);
|
||||
cmbDestino.getValue(true);
|
||||
// cmbOrigem.getValue(true);
|
||||
// cmbDestino.getValue(true);
|
||||
cmbClaseServicio.getValue();
|
||||
cmbOrgaoConcedente.getValue();
|
||||
|
||||
|
@ -210,7 +233,23 @@ public class EditarTarifaMinimaController extends MyGenericForwardComposer {
|
|||
}
|
||||
tarifaMinima.setRuta(ruta);
|
||||
|
||||
Comboitem cbiVigenciaTarifa = cmbVigencia.getSelectedItem();
|
||||
Comboitem cbiOrigem = cmbOrigem.getSelectedItem();
|
||||
Parada origem = null;
|
||||
if (cbiOrigem != null) {
|
||||
cmbOrigem.getValue(true);
|
||||
origem = cmbOrigem.getSelectedObject();
|
||||
}
|
||||
tarifaMinima.setOrigem(origem);
|
||||
|
||||
Comboitem cbiDestino = cmbDestino.getSelectedItem();
|
||||
Parada destino = null;
|
||||
if (cbiDestino != null) {
|
||||
cmbDestino.getValue(true);
|
||||
destino = cmbDestino.getSelectedObject();
|
||||
}
|
||||
tarifaMinima.setDestino(destino);
|
||||
|
||||
Comboitem cbiVigenciaTarifa = cmbVigencia.getSelectedItem();
|
||||
VigenciaTarifa vigenciaTarifa = null;
|
||||
if (cbiVigenciaTarifa != null) {
|
||||
vigenciaTarifa = (VigenciaTarifa) cbiVigenciaTarifa.getValue();
|
||||
|
@ -252,27 +291,29 @@ public class EditarTarifaMinimaController extends MyGenericForwardComposer {
|
|||
Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.marca"),
|
||||
Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (tarifaMinima.getOrigem() == null) {
|
||||
} else if (tarifaMinima.getOrigem() == null && tarifaMinima.getDestino() == null &&
|
||||
tarifaMinima.getRegionMetropolitana() == null) {
|
||||
// } else if (tarifaMinima.getOrigem() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.origen"),
|
||||
Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (tarifaMinima.getDestino() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.destino"),
|
||||
Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.parada"),
|
||||
Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
// } else if (tarifaMinima.getDestino() == null) {
|
||||
// Messagebox.show(
|
||||
// Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.destino"),
|
||||
// Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
// Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (tarifaMinima.getClaseServicio() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarTarifaMinimaController.btnFechar.MSG.tipo"),
|
||||
Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (tarifaMinima.getOrigem().getParadaId().equals(tarifaMinima.getDestino().getParadaId())
|
||||
&& (!tarifaMinima.getOrigem().getParadaId().equals(-1) && !tarifaMinima.getDestino().getParadaId().equals(-1))) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Origem.Igual.Destino"),
|
||||
Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
// } else if (tarifaMinima.getOrigem().getParadaId().equals(tarifaMinima.getDestino().getParadaId())
|
||||
// && (!tarifaMinima.getOrigem().getParadaId().equals(-1) && !tarifaMinima.getDestino().getParadaId().equals(-1))) {
|
||||
// Messagebox.show(
|
||||
// Labels.getLabel("MSG.Origem.Igual.Destino"),
|
||||
// Labels.getLabel("editarTarifaMinimaController.window.title"),
|
||||
// Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
} else {
|
||||
if (tarifaMinima.getTarifaminimaId() == null) {
|
||||
|
|
|
@ -2360,6 +2360,7 @@ editarTarifaMinimaController.btnFechar.MSG.moneda = Necesita informar una moneda
|
|||
editarTarifaMinimaController.btnFechar.MSG.plaza = Necesita informar una plaza
|
||||
editarTarifaMinimaController.btnFechar.MSG.marca = Necesita informar una marca
|
||||
editarTarifaMinimaController.btnFechar.MSG.origen = Necesita informar un origen
|
||||
editarTarifaMinimaController.btnFechar.MSG.parada = Necessita informar un origen o region
|
||||
editarTarifaMinimaController.btnFechar.MSG.destino = Necesita informar un destino
|
||||
editarTarifaMinimaController.btnFechar.MSG.orgao = Necessita informar una instituición Concedente
|
||||
editarTarifaMinimaController.btnFechar.MSG.tipo = Necesita informar un tipo de clase
|
||||
|
|
|
@ -2394,6 +2394,7 @@ editarTarifaMinimaController.btnFechar.MSG.moneda = Necessita informar uma moeda
|
|||
editarTarifaMinimaController.btnFechar.MSG.plaza = Necessita informar uma praça
|
||||
editarTarifaMinimaController.btnFechar.MSG.marca = Necessita informar uma marca
|
||||
editarTarifaMinimaController.btnFechar.MSG.origen = Necessita informar um origem
|
||||
editarTarifaMinimaController.btnFechar.MSG.parada = Necessita informar uma origem e destino ou região metropolitana
|
||||
editarTarifaMinimaController.btnFechar.MSG.destino = Necessita informar um destino
|
||||
editarTarifaMinimaController.btnFechar.MSG.orgao = Necessita informar um Órgão Concedente
|
||||
editarTarifaMinimaController.btnFechar.MSG.tipo = Necessita informar um tipo de classe
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
|
||||
<row>
|
||||
<label value="${c:l('busquedaTarifasMinimasController.lhOrigem.label')}"/>
|
||||
<combobox id="cmbOrigem" constraint="no empty"
|
||||
<combobox id="cmbOrigem"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
initialValue="@{winEditarTarifaMinima$composer.tarifaMinima.origem}"
|
||||
|
@ -135,7 +135,7 @@
|
|||
|
||||
<row>
|
||||
<label value="${c:l('busquedaTarifasMinimasController.lhDestino.label')}"/>
|
||||
<combobox id="cmbDestino" constraint="no empty"
|
||||
<combobox id="cmbDestino"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
initialValue="@{winEditarTarifaMinima$composer.tarifaMinima.destino}"
|
||||
|
|
Loading…
Reference in New Issue