fixed bug #9685 - Alteração para aceitar a configuração de tipo de passagem normal.
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@73347 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5d4f4153f9
commit
27b4200c9c
|
@ -71,6 +71,7 @@ import com.rjconsultores.ventaboletos.service.CorridaCtrlService;
|
|||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.service.impl.CategoriaCtrlServiceImpl;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
@ -437,6 +438,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
|
||||
popularCombobox(cmbIndGeneraFeriado);
|
||||
|
||||
|
||||
categoriaCtrlList = (MyListbox) Executions.getCurrent().getArg().get("categoriaCtrlList");
|
||||
categoriaCtrl = (CategoriaCtrl) Executions.getCurrent().getArg().get("categoriaCtrl");
|
||||
|
||||
|
@ -471,9 +473,6 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
if (categoriaCtrl.getCategoriactrlId() != null) {
|
||||
categoriaCtrl = categoriaCtrlService.obtenerID(categoriaCtrl.getCategoriactrlId());
|
||||
|
||||
lsCategoriaDescuento = categoriaCtrl.getCategoriaDescuentoVisiblesList();
|
||||
categoriaDescuentoList.setData(lsCategoriaDescuento);
|
||||
|
||||
lsCategoriaClase = categoriaCtrl.getCategoriaClaseList();
|
||||
categoriaClaseList.setData(lsCategoriaClase);
|
||||
|
||||
|
@ -492,6 +491,10 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
lsCategoriaCorrida = categoriaCtrl.getCategoriaCorridaList();
|
||||
categoriaCorridaList.setData(lsCategoriaCorrida);
|
||||
}
|
||||
categoriaCtrl = categoriaCtrlService.checarCategoriaAdulto(categoriaCtrl);
|
||||
lsCategoriaDescuento = categoriaCtrl.getCategoriaDescuentoVisiblesList();
|
||||
categoriaDescuentoList.setData(lsCategoriaDescuento);
|
||||
|
||||
descuentoImporte.setValue(BigDecimal.ZERO);
|
||||
descuentoPorc.setValue(BigDecimal.ZERO);
|
||||
|
||||
|
@ -504,6 +507,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
linhaLiberarPoltronasQuandoOnibus.setVisible(false);
|
||||
linhaAssentosReservados.setVisible(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
|
@ -540,6 +544,12 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
if (cd.getCategoria().getCategoriaId().equals(CategoriaCtrlServiceImpl.CATEGORIA_ADULTO)) {
|
||||
Messagebox.show(Labels.getLabel("editarConfiguracionCategoriaController.MSG.categoriaNormal"),
|
||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("categoriaDescuento", cd);
|
||||
|
@ -889,10 +899,9 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
|||
categoriaDescuentoList.removeItem(cDescuento);
|
||||
lsCategoriaDescuento.add(cDescuento);
|
||||
categoriaCtrl.setCategoriaDescuentoList(lsCategoriaDescuento);
|
||||
// categoriaCtrl.setCategoriaDescuentoList(lsCategoriaDescuento);
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarConfiguracionCategoriaController.MSG.selectItem"),
|
||||
Labels.getLabel("editarConfiguracionCategoriaController.MSG.categoriaNormal"),
|
||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
|
|
|
@ -94,6 +94,10 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
|||
private Checkbox chkSexta;
|
||||
private Checkbox chkSabado;
|
||||
private Checkbox chkDomingo;
|
||||
private Checkbox chkPrecoTxEmbarque;
|
||||
private Checkbox chkPrecoPedagio;
|
||||
private Checkbox chkPrecoSeguro;
|
||||
private Checkbox chkPrecoOutros;
|
||||
|
||||
private Radio radioHorarioLiberacaoVendaOrigem;
|
||||
private Radio radioHorarioLiberacaoVendaTrecho;
|
||||
|
@ -174,7 +178,7 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
|||
rdVendaAbertoNao.setChecked(true);
|
||||
}
|
||||
|
||||
if(categoriaDescuento.getIndCuota()== true){
|
||||
if (categoriaDescuento.getIndCuota() != null && categoriaDescuento.getIndCuota()) {
|
||||
linhaLiberarPoltronasQuandoOnibus.setVisible(true);
|
||||
linhaAssentosReservados.setVisible(true);
|
||||
}else{
|
||||
|
@ -226,6 +230,51 @@ public class EditarConfiguracionCategoriaDatosCategoriaController extends MyGene
|
|||
radioCorVerde.setChecked(true);
|
||||
}
|
||||
|
||||
if (categoriaDescuento.getCategoria().getCategoriaId().equals(1)) {
|
||||
desabilitarItensCategoriaNormal();
|
||||
}
|
||||
|
||||
}
|
||||
private void desabilitarItensCategoriaNormal() {
|
||||
cantAutorizada.setDisabled(true);
|
||||
timeTempoPermitir.setDisabled(true);
|
||||
descuentoPorc.setDisabled(true);
|
||||
descuentoImporte.setDisabled(true);
|
||||
desccomppreco.setDisabled(true);
|
||||
radioImprimePassagem.setDisabled(true);
|
||||
radioCompPrecoImp.setDisabled(true);
|
||||
radioCompPrecoPor.setDisabled(true);
|
||||
radioCorLaranja.setDisabled(true);
|
||||
radioCorVerde.setDisabled(true);
|
||||
radioHorarioLiberacaoVendaOrigem.setDisabled(true);
|
||||
radioHorarioLiberacaoVendaTrecho.setDisabled(true);
|
||||
radioImp.setDisabled(true);
|
||||
radioNaoImprimePassagem.setDisabled(true);
|
||||
radioNaoVentaSolamenteReserva.setDisabled(true);
|
||||
radioPor.setDisabled(true);
|
||||
radioSimVentaSolamenteReserva.setDisabled(true);
|
||||
chkDomingo.setDisabled(true);
|
||||
chkQuarta.setDisabled(true);
|
||||
chkTerca.setDisabled(true);
|
||||
chkQuinta.setDisabled(true);
|
||||
chkSabado.setDisabled(true);
|
||||
chkSegunda.setDisabled(true);
|
||||
chkSexta.setDisabled(true);
|
||||
asientosReservados.setDisabled(true);
|
||||
cmbIndGeneraFeriado.setDisabled(true);
|
||||
rdCuotaSi.setDisabled(true);
|
||||
rdTrecho.setDisabled(true);
|
||||
rdVendaAbertoNao.setDisabled(true);
|
||||
rdVendaAntecipadaNo.setDisabled(true);
|
||||
rdVendaAntecipadaSi.setDisabled(true);
|
||||
rdVendeAbertoSi.setDisabled(true);
|
||||
spnHora.setDisabled(true);
|
||||
spnMinuto.setDisabled(true);
|
||||
chkPrecoTxEmbarque.setDisabled(true);
|
||||
chkPrecoOutros.setDisabled(true);
|
||||
chkPrecoPedagio.setDisabled(true);
|
||||
chkPrecoSeguro.setDisabled(true);
|
||||
|
||||
}
|
||||
private void preencherDataHora(Integer tiempoMinutos){
|
||||
if (tiempoMinutos != null){
|
||||
|
|
|
@ -4,14 +4,8 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.TarifaService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -22,6 +16,14 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.TarifaService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -30,7 +32,11 @@ import org.zkoss.zul.Combobox;
|
|||
@Scope("prototype")
|
||||
public class GenerarTarifaController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private MarcaService marcaService;
|
||||
@Autowired
|
||||
private VigenciaTarifaService vigenciaTarifaService;
|
||||
|
|
|
@ -1797,6 +1797,7 @@ editarConfiguracionCategoriaController.MSG.suscribirOK = Tipo de configuración
|
|||
editarConfiguracionCategoriaController.MSG.borrarPergunta = Desea eliminar tipo de configuración de pasajero?
|
||||
editarConfiguracionCategoriaController.MSG.editarPeriodo = Antes de editar el período de vigencia es necesário guardar la configuración de pasajero
|
||||
editarConfiguracionCategoriaController.MSG.borrarOK = Tipo de configuración pasajero se eliminó exitosamente
|
||||
editarConfiguracionCategoriaController.MSG.categoriaNormal = No es permitido cambiar la vigencia o apagar la categoria Normal.
|
||||
editarConfiguracionCategoriaController.MSG.categoriaPeriodoObligatorio = Hay descuentos sin vigencias. Guardar sin informar a los viegencias de descuentos ?
|
||||
editarConfiguracionCategoriaController.lblCategorias.value = Tipo de pasaje
|
||||
editarConfiguracionCategoriaController.lblEmpresa.value = Empresa
|
||||
|
|
|
@ -1953,6 +1953,7 @@ editarConfiguracionCategoriaController.MSG.suscribirOK = Tipo de configuração
|
|||
editarConfiguracionCategoriaController.MSG.borrarPergunta = Deseja Eliminar tipo de configuração de passageiro?
|
||||
editarConfiguracionCategoriaController.MSG.editarPeriodo = Antes de editar o período de vigência é necessário salvar a configuração de passageiro.
|
||||
editarConfiguracionCategoriaController.MSG.borrarOK = Tipo de configuração passageiro Excluido com Sucesso.
|
||||
editarConfiguracionCategoriaController.MSG.categoriaNormal = Não é permitido alterar a vigencia ou apagar a categoria Normal.
|
||||
editarConfiguracionCategoriaController.MSG.categoriaPeriodoObligatorio = Exite(m) desconto(s) sem vigência. Salvar sem informar as viegencias para o(s) desconto(s) ?
|
||||
editarConfiguracionCategoriaController.lblCategorias.value = Tipo de Passagem
|
||||
editarConfiguracionCategoriaController.lblEmpresa.value = Empresa
|
||||
|
|
Loading…
Reference in New Issue