git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20853 d1611594-4594-4d17-8e1d-87c2c4800839
parent
e363575cf3
commit
481e87e6be
|
@ -319,10 +319,8 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void validarObligatorio() {
|
||||
//dbPrecioTarifaCategoria.getValue();
|
||||
txtPrecio.getValue();
|
||||
txtPrecioRedAbierto.getValue();
|
||||
//dbPrecioTipoPuntoVenta.getValue();
|
||||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
|
@ -366,24 +364,15 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
|||
plaza = cidadeOrigem.getPlaza();
|
||||
}
|
||||
|
||||
// checando se opode alterar o valor da tarifa de acordo com o catalogo de tarifas minimas:
|
||||
Boolean podeAlterarTarifaMinima =
|
||||
tarifaService.podeAlterarTarifaMinima(tarifa, marca,
|
||||
origem, destino, claseServicio, plaza, moneda);
|
||||
// checando se opode alterar o valor da tarifa de acordo com
|
||||
// o catalogo de tarifas minimas:
|
||||
Boolean podeAlterarTarifaMinima =tarifaService.podeAlterarTarifaMinima(tarifa, marca,origem, destino, claseServicio, plaza, moneda);
|
||||
|
||||
// buscando por Mercado Competido.
|
||||
boolean existeMercadoCompetido = mercadoCompetidoService.existe(claseServicio, origem, destino);
|
||||
|
||||
if (podeAlterarTarifaMinima) {
|
||||
List<Tarifa> lsTarifas = tarifaService.pesquisar(marca, tarifa.getTramo(),
|
||||
tarifa.getMoneda(), claseServicio, tarifa.getVigenciaTarifa());
|
||||
|
||||
if (lsTarifas.size() >= 2) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarTarifaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (!existeMercadoCompetido) {
|
||||
tarifaService.actualizacion(tarifa);
|
||||
tarifaList.updateItem(tarifa);
|
||||
|
@ -412,7 +401,7 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
|||
closeWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
String stTarifa = tarifa.getTramo() + " - "
|
||||
+ tarifa.getPrecio().setScale(2).toString();
|
||||
|
@ -481,15 +470,14 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
|||
dbPrecioTarifaCategoria.setConstraint("no empty, no zero");
|
||||
dbPrecioTarifaCategoria.getValue();
|
||||
|
||||
// dbPrecioAbiertoTarifaCategoria.setConstraint("no empty, no zero");
|
||||
// dbPrecioAbiertoTarifaCategoria.getValue();
|
||||
// dbPrecioAbiertoTarifaCategoria.setConstraint("no empty, no zero");
|
||||
// dbPrecioAbiertoTarifaCategoria.getValue();
|
||||
|
||||
Comboitem ciCategoria = cmbCategoria.getSelectedItem();
|
||||
Categoria categoria = null;
|
||||
if (ciCategoria != null) {
|
||||
categoria = (Categoria) ciCategoria.getValue();
|
||||
|
||||
|
||||
TarifaCategoria tc = new TarifaCategoria();
|
||||
tc.setCategoria(categoria);
|
||||
tc.setPrecio((dbPrecioTarifaCategoria.getValueDecimal() == null) ? new BigDecimal(BigInteger.ZERO) : dbPrecioTarifaCategoria.getValueDecimal());
|
||||
|
@ -532,15 +520,14 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
|||
dbPrecioTipoPuntoVenta.setConstraint("no empty, no zero");
|
||||
dbPrecioTipoPuntoVenta.getValue();
|
||||
|
||||
// dbPrecioAbiertoTipoPuntoVenta.setConstraint("no empty, no zero");
|
||||
// dbPrecioAbiertoTipoPuntoVenta.getValue();
|
||||
// dbPrecioAbiertoTipoPuntoVenta.setConstraint("no empty, no zero");
|
||||
// dbPrecioAbiertoTipoPuntoVenta.getValue();
|
||||
|
||||
Comboitem ciTipoPontoVenta = cmbTipoPontoVenta.getSelectedItem();
|
||||
TipoPuntoVenta tipoPuntoVenta = null;
|
||||
if (ciTipoPontoVenta != null) {
|
||||
tipoPuntoVenta = (TipoPuntoVenta) ciTipoPontoVenta.getValue();
|
||||
|
||||
|
||||
TarifaTipoptovta tt = new TarifaTipoptovta();
|
||||
tt.setTipoPuntoVenta(tipoPuntoVenta);
|
||||
tt.setPrecio((dbPrecioTipoPuntoVenta.getValueDecimal() == null) ? new BigDecimal(BigInteger.ZERO) : dbPrecioTipoPuntoVenta.getValueDecimal());
|
||||
|
|
|
@ -55,7 +55,6 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
|||
private Checkbox chkTarifa;
|
||||
private Checkbox chkTaxaEmbarque;
|
||||
private Checkbox chkSeguro;
|
||||
private Checkbox chkPedagio;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
|
|
@ -28,7 +28,6 @@ public class RenderTarifa implements ListitemRenderer {
|
|||
lc.setParent(lstm);
|
||||
|
||||
if (t.getPrecio() != null) {
|
||||
//lc = new Listcell(t.getPrecio().setScale(2).toString());
|
||||
lc = new Listcell(df.format(t.getPrecio()));
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
|
@ -36,7 +35,6 @@ public class RenderTarifa implements ListitemRenderer {
|
|||
lc.setParent(lstm);
|
||||
|
||||
if (t.getPreciooriginal() != null) {
|
||||
//lc = new Listcell(t.getPreciooriginal().setScale(2).toString());
|
||||
lc = new Listcell(df.format(t.getPreciooriginal()));
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
|
@ -98,14 +96,19 @@ public class RenderTarifa implements ListitemRenderer {
|
|||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (t.getMoneda() != null) {
|
||||
lc = new Listcell(t.getMoneda().getDescmoneda());
|
||||
if (t.getOrgaoConcedente() != null){
|
||||
lc = new Listcell(t.getOrgaoConcedente().getDescOrgao());
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
|
||||
if (t.getRuta() != null){
|
||||
lc = new Listcell(t.getRuta().getPrefixo());
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", t);
|
||||
}
|
||||
|
|
|
@ -1304,6 +1304,9 @@ busquedaTarifaController.lhRuta.label = Linha
|
|||
busquedaTarifaController.lhTipoPuntoVenta.label = Canal de Venda
|
||||
busquedaTarifaController.lhCategoria.label = Tipo de Passageiro
|
||||
busquedaTarifaController.lhTramo.label = Trecho
|
||||
busquedaTarifaController.lhOrgao.label = Órgão
|
||||
busquedaTarifaController.lhLinha.label = Linha
|
||||
busquedaTarifaController.lhPedagio.label = Pedágio
|
||||
busquedaTarifaController.btnPesquisa.label = Pesquisa
|
||||
busquedaTarifaController.lhVigencia.label = Vigência
|
||||
busquedaTarifaController.lhStatusTarifa.label = Status Tarifa
|
||||
|
|
|
@ -83,26 +83,28 @@
|
|||
<listhead sizable="true">
|
||||
<listheader width="5%" image="/gui/img/builder.gif"
|
||||
label="${c:l('lb.id')}" sort="auto(tarifaId)"/>
|
||||
<listheader id="lhPrecio" width="9%" image="/gui/img/builder.gif" align="right"
|
||||
<listheader id="lhPrecio" width="8%" image="/gui/img/builder.gif" align="right"
|
||||
label="${c:l('busquedaTarifaController.lhPrecio.label')}" sort="auto(precio)"/>
|
||||
<listheader id="lhPrecioOriginal" width="9%" image="/gui/img/builder.gif" align="right"
|
||||
<listheader id="lhPrecioOriginal" width="8%" image="/gui/img/builder.gif" align="right"
|
||||
label="${c:l('busquedaTarifaController.lhPrecioOriginal.label')}" sort="auto(preciooriginal)"/>
|
||||
<listheader id="lhStatusTarifa" width="9%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhStatusTarifa" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhStatusTarifa.label')}" sort="auto(statustarifa)"/>
|
||||
<listheader id="lhOrigen" width="13%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhOrigen" width="10%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhOrigen.label')}" sort="auto(tramo.origem.descparada)"/>
|
||||
<listheader id="lhDestino" width="13%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhDestino" width="10%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhDestino.label')}" sort="auto(tramo.destino.descparada)"/>
|
||||
<listheader id="lhVia" width="9%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhVia" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhVia.label')}" sort="auto(tramo.via.nombvia)"/>
|
||||
<listheader id="lhMarca" width="9%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhMarca" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhMarca.label')}" sort="auto(marca.descmarca)"/>
|
||||
<listheader id="lhFeciniciovigencia" width="9%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhFeciniciovigencia" width="11%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhFeciniciovigencia.label')}" sort="auto(vigenciaTarifa.feciniciovigencia)"/>
|
||||
<listheader id="lhClaseServicio" width="9%" image="/gui/img/builder.gif"
|
||||
<listheader id="lhClaseServicio" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhClaseServicio.label')}" sort="auto(claseServicio.descclase)"/>
|
||||
<listheader id="lhMoneda" width="9%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhMoneda.label')}" sort="auto(moneda.descmoneda)"/>
|
||||
<listheader id="lhOrgao" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhOrgao.label')}" sort="auto(orgaoConcedente.descOrgao)"/>
|
||||
<listheader id="lhRuta" width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTarifaController.lhLinha.label')}" sort="auto(ruta.prefixo)"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
<textbox id="txtPrecio" value="@{winEditarTarifa$composer.tarifa.precio,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="7" scale="2"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaTarifaController.lhPedagio.label')}"/>
|
||||
<textbox id="txtPedagio" value="@{winEditarTarifa$composer.tarifa.importepedagio,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="7" scale="2"/>
|
||||
</row>
|
||||
<row>
|
||||
|
||||
<!-- value="@{winEditarTarifa$composer.tarifa.preciooriginal}" -->
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
<checkbox id="chkTarifa" label="${c:l('generarTarifaOrgaoController.labelComponenteTarifa.value')}" checked="true"/>
|
||||
<checkbox id="chkTaxaEmbarque" label="${c:l('generarTarifaOrgaoController.labelComponenteTaxaEmbarque.value')}"/>
|
||||
<checkbox id="chkSeguro" label="${c:l('generarTarifaOrgaoController.labelComponenteSeguro.value')}"/>
|
||||
<checkbox id="chkPedagio" label="${c:l('generarTarifaOrgaoController.labelComponentePedagio.value')}"/>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
|
|
Loading…
Reference in New Issue