diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/expressos/CotizarExpresoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/expressos/CotizarExpresoController.java index dd5e0847f..077080d68 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/expressos/CotizarExpresoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/expressos/CotizarExpresoController.java @@ -53,6 +53,7 @@ import org.zkoss.zul.Paging; import com.rjconsultores.ventaboletos.entidad.Articulo; import com.rjconsultores.ventaboletos.entidad.Ciudad; +import com.rjconsultores.ventaboletos.entidad.Constante; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso; import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos; @@ -86,6 +87,9 @@ public class CotizarExpresoController extends MyGenericForwardComposer{ @Autowired SolicitudExpresosService solicitudExpresosService; + @Autowired + ConstanteService constanteService; + SolicitudExpreso expreso; TrayectosExpresos trayecto; @@ -262,10 +266,10 @@ public class CotizarExpresoController extends MyGenericForwardComposer{ this.closeWindow(); } - public String valorConstante(String constante) { - ConstanteService constanteService = (ConstanteService) AppContext.getApplicationContext().getBean("constanteService"); + public String valorConstante(String nombreConstante) { + Constante constante = constanteService.buscarPorNomeConstante(nombreConstante); - return constanteService.buscarPorNomeConstante(constante) != null ? constanteService.buscarPorNomeConstante(constante).getValorconstante() : null ; + return constante != null ? constante.getValorconstante() : null ; } public SolicitudExpreso getExpreso() {