diff --git a/pom.xml b/pom.xml index e224402ef..cc64cab75 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores ventaboletosadm - 1.66.1 + 1.66.2 war diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioReceitaServico.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioReceitaServico.java index 7aaac6386..6f0b12bc7 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioReceitaServico.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioReceitaServico.java @@ -74,6 +74,8 @@ public class RelatorioReceitaServico extends Relatorio { dataResult.put("dataHoraCompra", rset.getTimestamp("dataHoraCompra")); dataResult.put("passageiro", !(rset.getString("passageiro") == null) ? rset.getString("passageiro") : ""); dataResult.put("nrBilhete", !(rset.getString("nrBilhete") == null) ? rset.getString("nrBilhete") : ""); + dataResult.put("tipoServico", !(rset.getString("tipoServico") == null) ? rset.getString("tipoServico") : ""); + dataResult.put("prefixo", !(rset.getString("prefixo") == null) ? rset.getString("prefixo") : ""); this.dados.add(dataResult); } @@ -106,8 +108,20 @@ public class RelatorioReceitaServico extends Relatorio { sql.append("b.fechorventa AS dataHoraCompra, "); sql.append("b.nombpasajero AS passageiro, "); sql.append("b.desctelefono AS telefone, "); - sql.append("b.NUMFOLIOSISTEMA AS nrBilhete "); + sql.append("b.NUMFOLIOSISTEMA AS nrBilhete, "); + + sql.append(" CASE "); + sql.append(" WHEN c.tiposervicio_id = 1 THEN 'O' "); + sql.append(" WHEN c.tiposervicio_id = 2 THEN 'E' "); + sql.append(" ELSE '' "); + sql.append(" END AS tipoServico,"); + sql.append(" r.prefixo "); + sql.append("FROM BOLETO b "); + + sql.append(" left join corrida c on (b.corrida_id = c.corrida_id and b.feccorrida = c.feccorrida)"); + sql.append(" left join ruta r on (b.ruta_id = r.ruta_id and r.activo = 1) "); + sql.append("INNER JOIN marca mar ON b.marca_id = mar.marca_id "); sql.append("INNER JOIN clase_servicio cl_ser ON cl_ser.claseservicio_id = b.claseservicio_id "); sql.append("LEFT JOIN PARADA levante ON levante.parada_id = b.levante_id "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jasper index 791c36621..633292342 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jrxml index 391ca4409..7e8afa96b 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioReceitaServico.jrxml @@ -1,7 +1,7 @@ - + - + @@ -30,6 +30,8 @@ + + @@ -48,7 +50,7 @@ - + @@ -88,14 +90,14 @@ - + - + @@ -103,7 +105,7 @@ - + @@ -111,7 +113,7 @@ - + @@ -119,7 +121,7 @@ - + @@ -127,7 +129,7 @@ - + @@ -138,7 +140,7 @@ - + @@ -160,7 +162,7 @@ - + @@ -170,7 +172,7 @@ - + @@ -180,7 +182,7 @@ - + @@ -190,7 +192,7 @@ - + @@ -200,7 +202,7 @@ - + @@ -210,7 +212,7 @@ - + @@ -220,7 +222,7 @@ - + @@ -230,7 +232,7 @@ - + @@ -240,7 +242,7 @@ - + @@ -250,7 +252,7 @@ - + @@ -260,7 +262,7 @@ - + @@ -270,7 +272,7 @@ - + @@ -280,7 +282,7 @@ - + @@ -290,7 +292,7 @@ - + @@ -300,7 +302,7 @@ - + @@ -310,7 +312,7 @@ - + @@ -320,7 +322,7 @@ - + @@ -330,7 +332,7 @@ - + @@ -339,149 +341,183 @@ + + + + + + + + + + + + + + + + + + + + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - - + + - + + + + + + + + + + + + + + + - + @@ -489,40 +525,40 @@ - + - + - + - + - + - + - + @@ -531,7 +567,7 @@ - +