fixed bug #6310 - alteração de valor de categoria para buscar valor em tabela de constantes. - Alteração 0,5 horas
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@44071 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
b76b970dcf
commit
afa3598acf
|
@ -18,8 +18,10 @@ import com.rjconsultores.ventaboletos.relatorios.utilitarios.AproveitamentoBean;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioAproveitamentoBean;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioAproveitamentoBean;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.CurrencyUtil;
|
import com.rjconsultores.ventaboletos.web.utilerias.CurrencyUtil;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bruno H. G. Gouvêa <bruno@rjconsultores.com.br>
|
* @author Bruno H. G. Gouvêa <bruno@rjconsultores.com.br>
|
||||||
|
@ -259,6 +261,7 @@ public class RelatorioAproveitamento extends Relatorio {
|
||||||
|
|
||||||
private String getSql() {
|
private String getSql() {
|
||||||
|
|
||||||
|
ConstanteService constanteService = (ConstanteService) AppContext.getApplicationContext().getBean("constanteService");
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.append("SELECT ");
|
sql.append("SELECT ");
|
||||||
sql.append(" SUM(TRECHOS_VG.PRECIOPAGADO) AS TOTAL_ARRECADADO, ");
|
sql.append(" SUM(TRECHOS_VG.PRECIOPAGADO) AS TOTAL_ARRECADADO, ");
|
||||||
|
@ -311,7 +314,8 @@ public class RelatorioAproveitamento extends Relatorio {
|
||||||
sql.append(" AND CR.ACTIVO = 1 ");
|
sql.append(" AND CR.ACTIVO = 1 ");
|
||||||
sql.append(" AND BO.ACTIVO = 1 ");
|
sql.append(" AND BO.ACTIVO = 1 ");
|
||||||
sql.append(" AND BO.INDSTATUSOPERACION = 'F' ");
|
sql.append(" AND BO.INDSTATUSOPERACION = 'F' ");
|
||||||
sql.append(" AND BO.CATEGORIA_ID <> 52 ");
|
sql.append(" AND BO.CATEGORIA_ID <> ");
|
||||||
|
sql.append(constanteService.buscarPorNomeConstante("GRATUIDADE_CRIANCA").getValorconstante());
|
||||||
sql.append(" AND BO.MOTIVOCANCELACION_ID IS NULL ");
|
sql.append(" AND BO.MOTIVOCANCELACION_ID IS NULL ");
|
||||||
sql.append(" GROUP BY ");
|
sql.append(" GROUP BY ");
|
||||||
sql.append(" BO.PRECIOPAGADO, ");
|
sql.append(" BO.PRECIOPAGADO, ");
|
||||||
|
|
Loading…
Reference in New Issue