diff --git a/src/com/rjconsultores/ventaboletos/dao/sqlbuilder/impl/SQLBuilderOracle.java b/src/com/rjconsultores/ventaboletos/dao/sqlbuilder/impl/SQLBuilderOracle.java index e1178dd30..4bd6912af 100644 --- a/src/com/rjconsultores/ventaboletos/dao/sqlbuilder/impl/SQLBuilderOracle.java +++ b/src/com/rjconsultores/ventaboletos/dao/sqlbuilder/impl/SQLBuilderOracle.java @@ -6,6 +6,7 @@ import java.util.List; import com.rjconsultores.ventaboletos.dao.sqlbuilder.SQLBuilder; import com.rjconsultores.ventaboletos.dao.util.DBUtil; +import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties; public class SQLBuilderOracle implements SQLBuilder { private static final Integer HORAS_NO_DIA = Integer.valueOf(24); @@ -333,7 +334,9 @@ public class SQLBuilderOracle implements SQLBuilder { sb.append(" and mc.activo = 1 "); sb.append(" and re.activo = 1 "); sb.append(" and r.orgaoconcedente_id <> 21 "); - sb.append(" and rc.indventa = 1 "); + if(ApplicationProperties.getInstance().criarTarifaApenasTrechoVendido()){ + sb.append(" and rc.indventa = 1 "); + } if (idsEmpresas != null) { sb.append(" and re.empresa_id in ( ").append(idsEmpresas.toString().substring(1, idsEmpresas.toString().length()-1)).append(" ) "); } diff --git a/src/com/rjconsultores/ventaboletos/utilerias/ApplicationProperties.java b/src/com/rjconsultores/ventaboletos/utilerias/ApplicationProperties.java index 316f710d0..bda64b8e2 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/ApplicationProperties.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/ApplicationProperties.java @@ -169,4 +169,10 @@ public class ApplicationProperties { String property = p.getProperty("maxSizeNumCorrida", "-1"); return Integer.parseInt(property); } + + public boolean criarTarifaApenasTrechoVendido() { + String property = p.getProperty("criarTarifaApenasTrechoVendido", "0"); + return property.equals("1"); + } + }