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() {
|
private void validarObligatorio() {
|
||||||
//dbPrecioTarifaCategoria.getValue();
|
|
||||||
txtPrecio.getValue();
|
txtPrecio.getValue();
|
||||||
txtPrecioRedAbierto.getValue();
|
txtPrecioRedAbierto.getValue();
|
||||||
//dbPrecioTipoPuntoVenta.getValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
|
@ -366,24 +364,15 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
||||||
plaza = cidadeOrigem.getPlaza();
|
plaza = cidadeOrigem.getPlaza();
|
||||||
}
|
}
|
||||||
|
|
||||||
// checando se opode alterar o valor da tarifa de acordo com o catalogo de tarifas minimas:
|
// checando se opode alterar o valor da tarifa de acordo com
|
||||||
Boolean podeAlterarTarifaMinima =
|
// o catalogo de tarifas minimas:
|
||||||
tarifaService.podeAlterarTarifaMinima(tarifa, marca,
|
Boolean podeAlterarTarifaMinima =tarifaService.podeAlterarTarifaMinima(tarifa, marca,origem, destino, claseServicio, plaza, moneda);
|
||||||
origem, destino, claseServicio, plaza, moneda);
|
|
||||||
|
|
||||||
// buscando por Mercado Competido.
|
// buscando por Mercado Competido.
|
||||||
boolean existeMercadoCompetido = mercadoCompetidoService.existe(claseServicio, origem, destino);
|
boolean existeMercadoCompetido = mercadoCompetidoService.existe(claseServicio, origem, destino);
|
||||||
|
|
||||||
if (podeAlterarTarifaMinima) {
|
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) {
|
if (!existeMercadoCompetido) {
|
||||||
tarifaService.actualizacion(tarifa);
|
tarifaService.actualizacion(tarifa);
|
||||||
tarifaList.updateItem(tarifa);
|
tarifaList.updateItem(tarifa);
|
||||||
|
@ -412,7 +401,7 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
String stTarifa = tarifa.getTramo() + " - "
|
String stTarifa = tarifa.getTramo() + " - "
|
||||||
+ tarifa.getPrecio().setScale(2).toString();
|
+ tarifa.getPrecio().setScale(2).toString();
|
||||||
|
@ -481,15 +470,14 @@ public class EditarTarifaController extends MyGenericForwardComposer {
|
||||||
dbPrecioTarifaCategoria.setConstraint("no empty, no zero");
|
dbPrecioTarifaCategoria.setConstraint("no empty, no zero");
|
||||||
dbPrecioTarifaCategoria.getValue();
|
dbPrecioTarifaCategoria.getValue();
|
||||||
|
|
||||||
// dbPrecioAbiertoTarifaCategoria.setConstraint("no empty, no zero");
|
// dbPrecioAbiertoTarifaCategoria.setConstraint("no empty, no zero");
|
||||||
// dbPrecioAbiertoTarifaCategoria.getValue();
|
// dbPrecioAbiertoTarifaCategoria.getValue();
|
||||||
|
|
||||||
Comboitem ciCategoria = cmbCategoria.getSelectedItem();
|
Comboitem ciCategoria = cmbCategoria.getSelectedItem();
|
||||||
Categoria categoria = null;
|
Categoria categoria = null;
|
||||||
if (ciCategoria != null) {
|
if (ciCategoria != null) {
|
||||||
categoria = (Categoria) ciCategoria.getValue();
|
categoria = (Categoria) ciCategoria.getValue();
|
||||||
|
|
||||||
|
|
||||||
TarifaCategoria tc = new TarifaCategoria();
|
TarifaCategoria tc = new TarifaCategoria();
|
||||||
tc.setCategoria(categoria);
|
tc.setCategoria(categoria);
|
||||||
tc.setPrecio((dbPrecioTarifaCategoria.getValueDecimal() == null) ? new BigDecimal(BigInteger.ZERO) : dbPrecioTarifaCategoria.getValueDecimal());
|
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.setConstraint("no empty, no zero");
|
||||||
dbPrecioTipoPuntoVenta.getValue();
|
dbPrecioTipoPuntoVenta.getValue();
|
||||||
|
|
||||||
// dbPrecioAbiertoTipoPuntoVenta.setConstraint("no empty, no zero");
|
// dbPrecioAbiertoTipoPuntoVenta.setConstraint("no empty, no zero");
|
||||||
// dbPrecioAbiertoTipoPuntoVenta.getValue();
|
// dbPrecioAbiertoTipoPuntoVenta.getValue();
|
||||||
|
|
||||||
Comboitem ciTipoPontoVenta = cmbTipoPontoVenta.getSelectedItem();
|
Comboitem ciTipoPontoVenta = cmbTipoPontoVenta.getSelectedItem();
|
||||||
TipoPuntoVenta tipoPuntoVenta = null;
|
TipoPuntoVenta tipoPuntoVenta = null;
|
||||||
if (ciTipoPontoVenta != null) {
|
if (ciTipoPontoVenta != null) {
|
||||||
tipoPuntoVenta = (TipoPuntoVenta) ciTipoPontoVenta.getValue();
|
tipoPuntoVenta = (TipoPuntoVenta) ciTipoPontoVenta.getValue();
|
||||||
|
|
||||||
|
|
||||||
TarifaTipoptovta tt = new TarifaTipoptovta();
|
TarifaTipoptovta tt = new TarifaTipoptovta();
|
||||||
tt.setTipoPuntoVenta(tipoPuntoVenta);
|
tt.setTipoPuntoVenta(tipoPuntoVenta);
|
||||||
tt.setPrecio((dbPrecioTipoPuntoVenta.getValueDecimal() == null) ? new BigDecimal(BigInteger.ZERO) : dbPrecioTipoPuntoVenta.getValueDecimal());
|
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 chkTarifa;
|
||||||
private Checkbox chkTaxaEmbarque;
|
private Checkbox chkTaxaEmbarque;
|
||||||
private Checkbox chkSeguro;
|
private Checkbox chkSeguro;
|
||||||
private Checkbox chkPedagio;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class RenderTarifa implements ListitemRenderer {
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
if (t.getPrecio() != null) {
|
if (t.getPrecio() != null) {
|
||||||
//lc = new Listcell(t.getPrecio().setScale(2).toString());
|
|
||||||
lc = new Listcell(df.format(t.getPrecio()));
|
lc = new Listcell(df.format(t.getPrecio()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
|
@ -36,7 +35,6 @@ public class RenderTarifa implements ListitemRenderer {
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
if (t.getPreciooriginal() != null) {
|
if (t.getPreciooriginal() != null) {
|
||||||
//lc = new Listcell(t.getPreciooriginal().setScale(2).toString());
|
|
||||||
lc = new Listcell(df.format(t.getPreciooriginal()));
|
lc = new Listcell(df.format(t.getPreciooriginal()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
|
@ -98,14 +96,19 @@ public class RenderTarifa implements ListitemRenderer {
|
||||||
}
|
}
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
if (t.getMoneda() != null) {
|
if (t.getOrgaoConcedente() != null){
|
||||||
lc = new Listcell(t.getMoneda().getDescmoneda());
|
lc = new Listcell(t.getOrgaoConcedente().getDescOrgao());
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
if (t.getRuta() != null){
|
||||||
|
lc = new Listcell(t.getRuta().getPrefixo());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lstm.setAttribute("data", t);
|
lstm.setAttribute("data", t);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1304,6 +1304,9 @@ busquedaTarifaController.lhRuta.label = Linha
|
||||||
busquedaTarifaController.lhTipoPuntoVenta.label = Canal de Venda
|
busquedaTarifaController.lhTipoPuntoVenta.label = Canal de Venda
|
||||||
busquedaTarifaController.lhCategoria.label = Tipo de Passageiro
|
busquedaTarifaController.lhCategoria.label = Tipo de Passageiro
|
||||||
busquedaTarifaController.lhTramo.label = Trecho
|
busquedaTarifaController.lhTramo.label = Trecho
|
||||||
|
busquedaTarifaController.lhOrgao.label = Órgão
|
||||||
|
busquedaTarifaController.lhLinha.label = Linha
|
||||||
|
busquedaTarifaController.lhPedagio.label = Pedágio
|
||||||
busquedaTarifaController.btnPesquisa.label = Pesquisa
|
busquedaTarifaController.btnPesquisa.label = Pesquisa
|
||||||
busquedaTarifaController.lhVigencia.label = Vigência
|
busquedaTarifaController.lhVigencia.label = Vigência
|
||||||
busquedaTarifaController.lhStatusTarifa.label = Status Tarifa
|
busquedaTarifaController.lhStatusTarifa.label = Status Tarifa
|
||||||
|
|
|
@ -83,26 +83,28 @@
|
||||||
<listhead sizable="true">
|
<listhead sizable="true">
|
||||||
<listheader width="5%" image="/gui/img/builder.gif"
|
<listheader width="5%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('lb.id')}" sort="auto(tarifaId)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
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)"/>
|
label="${c:l('busquedaTarifaController.lhClaseServicio.label')}" sort="auto(claseServicio.descclase)"/>
|
||||||
<listheader id="lhMoneda" width="9%" image="/gui/img/builder.gif"
|
<listheader id="lhOrgao" width="8%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('busquedaTarifaController.lhMoneda.label')}" sort="auto(moneda.descmoneda)"/>
|
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>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</window>
|
</window>
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
<textbox id="txtPrecio" value="@{winEditarTarifa$composer.tarifa.precio,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"
|
<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"/>
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="7" scale="2"/>
|
||||||
</row>
|
</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>
|
<row>
|
||||||
|
|
||||||
<!-- value="@{winEditarTarifa$composer.tarifa.preciooriginal}" -->
|
<!-- value="@{winEditarTarifa$composer.tarifa.preciooriginal}" -->
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
<checkbox id="chkTarifa" label="${c:l('generarTarifaOrgaoController.labelComponenteTarifa.value')}" checked="true"/>
|
<checkbox id="chkTarifa" label="${c:l('generarTarifaOrgaoController.labelComponenteTarifa.value')}" checked="true"/>
|
||||||
<checkbox id="chkTaxaEmbarque" label="${c:l('generarTarifaOrgaoController.labelComponenteTaxaEmbarque.value')}"/>
|
<checkbox id="chkTaxaEmbarque" label="${c:l('generarTarifaOrgaoController.labelComponenteTaxaEmbarque.value')}"/>
|
||||||
<checkbox id="chkSeguro" label="${c:l('generarTarifaOrgaoController.labelComponenteSeguro.value')}"/>
|
<checkbox id="chkSeguro" label="${c:l('generarTarifaOrgaoController.labelComponenteSeguro.value')}"/>
|
||||||
<checkbox id="chkPedagio" label="${c:l('generarTarifaOrgaoController.labelComponentePedagio.value')}"/>
|
|
||||||
</vbox>
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
|
Loading…
Reference in New Issue