diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaVia.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaVia.java index 9e7113ffb..53ad765fc 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaVia.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaVia.java @@ -106,6 +106,7 @@ public class RelatorioSegundaVia extends Relatorio { r.setSiglaTipoPassagem(rset.getString("siglaTipoPassagem")); r.setTipoPassagem(rset.getString("tipoPassagem")); r.setValorTotal(rset.getBigDecimal("valortotal")); + r.setNumBpe(rset.getString("numBpe")); return r; } }); @@ -144,7 +145,8 @@ public class RelatorioSegundaVia extends Relatorio { sql.append("c.importeseguro as seguro, "); sql.append("c.importepedagio as pedagio, "); sql.append("c.importetaxaembarque as taxa, "); - sql.append("c.importetpp as tpp "); + sql.append("c.importetpp as tpp, "); + sql.append("c.num_bpe as numBpe "); sql.append("from caja c "); sql.append("inner join boleto b on (c.transacao_id = b.boleto_id)"); sql.append("inner join usuario usuario on c.usuario_id = usuario.usuario_id "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaViaBoleto.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaViaBoleto.java new file mode 100644 index 000000000..f1328d635 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioSegundaViaBoleto.java @@ -0,0 +1,175 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioSegundaViaBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioSegundaViaBoleto extends Relatorio { + + private static Logger log = Logger.getLogger(RelatorioSegundaVia.class); + private SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + private List lsDadosRelatorio; + + public RelatorioSegundaViaBoleto(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + Map parametros = this.relatorio.getParametros(); + + Date dataInicial = (Date) parametros.get("dataInicial"); + Date dataFinal = (Date) parametros.get("dataFinal"); + Integer empresaId = (Integer) parametros.get("empresaId"); + Integer puntoVentaId = (Integer) parametros.get("puntoVentaId"); + + String sql = getSqlDados(dataInicial, dataFinal, empresaId, puntoVentaId); + ResultSet rset = null; + NamedParameterStatement stmt = null; + Connection conexao = this.relatorio.getConexao(); + + stmt = new NamedParameterStatement(conexao, sql); + stmt.setTimestamp("dataInicial", getDataHoraInicial(dataInicial)); + stmt.setTimestamp("dataFinal", getDataHoraFinal(dataFinal)); + + parametros.put("dataInicial", sdf.format(dataInicial)); + parametros.put("dataFinal", sdf.format(dataFinal)); + try { + rset = stmt.executeQuery(); + + lsDadosRelatorio = new ArrayList(); + while (rset.next()) { + lsDadosRelatorio.add(criarRelatorioSegundaViaBean(rset)); + } + setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + } catch (Exception e) { + log.error(e.getMessage(), e); + } finally { + try { + if (rset != null) { + rset.close(); + } + if (stmt != null) { + stmt.close(); + } + } catch (SQLException e) { + log.error(e.getMessage(), e); + } + } + } + + private RelatorioSegundaViaBean criarRelatorioSegundaViaBean(ResultSet rset) throws SQLException { + RelatorioSegundaViaBean r = new RelatorioSegundaViaBean(); + r.setBilheteiro(rset.getString("bilheteiro")); + r.setBilhete(rset.getString("bilhete")); + r.setCoo(rset.getInt("coo") == 0 ? null : rset.getInt("coo")); + r.setDataVenda(rset.getTimestamp("dataVenda")); + r.setDataViagem(rset.getDate("dataViagem")); + r.setDestino(rset.getString("destino")); + r.setOrigem(rset.getString("origem")); + r.setPedagio(rset.getBigDecimal("pedagio")); + r.setPoltrona(rset.getString("poltrona")); + r.setPreImpresso(rset.getString("preImpresso")); + r.setPuntoVenta(rset.getInt("puntoVenta")); + r.setSeguro(rset.getBigDecimal("seguro")); + r.setSerieImpFiscal(rset.getString("serieImpFiscal")); + r.setServico(rset.getString("servico")); + r.setTaxa(rset.getBigDecimal("taxa")); + r.setTarifa(rset.getBigDecimal("tarifa")); + r.setNumBpe(rset.getString("numBpe")); + return r; + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + private String getSqlDados(Date dataInicial, Date dataFinal, Integer empresaId, Integer puntoVentaId) { + StringBuilder sql = new StringBuilder(); + sql.append("SELECT boleto.CORRIDA_ID AS servico, "); + sql.append("boleto.FECHORVIAJE AS dataViagem, "); + sql.append("ori.CVEPARADA AS origem, "); + sql.append("des.CVEPARADA AS destino, "); + sql.append("boleto.NUMASIENTO AS poltrona, "); + sql.append("boleto.FECHORVENTA AS dataVenda, "); + sql.append("boleto.NUMFOLIOSISTEMA AS bilhete, "); + sql.append("usuario.NOMBUSUARIO AS bilheteiro, "); + sql.append("boleto.PUNTOVENTA_ID AS puntoVenta, "); + sql.append("boleto.PRECIOPAGADO AS tarifa, "); + sql.append("boleto.IMPORTETAXAEMBARQUE AS taxa, "); + sql.append("boleto.IMPORTESEGURO AS seguro, "); + sql.append("boleto.IMPORTEPEDAGIO AS pedagio, "); + sql.append("r4.COO AS coo, "); + sql.append("boleto.NUMFOLIOPREIMPRESO AS preimpresso, "); + sql.append("boleto.NUMSERIEPREIMPRESA AS seriePreImpresso, "); + sql.append("boleto.SERIEIMPFISCAL AS serieImpFiscal, "); + sql.append("boleto.NUM_BPE AS numBpe "); + + sql.append("FROM BOLETO boleto "); + sql.append("INNER JOIN USUARIO usuario ON boleto.USUARIO_ID = usuario.USUARIO_ID "); + sql.append("left join fiscal_impressora fi on fi.numserie = boleto.SERIEIMPFISCALORIGINAL "); + sql.append("left join fiscal_r4 r4 on r4.NUMSERIE20 = fi.NUMSERIE20 and r4.CONTADOR = boleto.CCF "); + sql.append("inner join parada ori on ori.parada_id = boleto.origen_id "); + sql.append("inner join parada des on des.parada_id = boleto.destino_id "); + sql.append("WHERE boleto.INDSEGUNDAVIAIMPRESSA = 1 "); + if (dataInicial != null && dataFinal != null) { + sql.append(" AND boleto.FECSEGUNDAVIA BETWEEN :dataInicial AND :dataFinal"); + } + if (empresaId != null && empresaId != -1) { + sql.append(" AND boleto.EMPRESACORRIDA_ID = " + empresaId); + } + if (puntoVentaId != null && puntoVentaId != -1) { + sql.append(" AND boleto.PUNTOVENTA_ID = " + puntoVentaId); + } + + return sql.toString(); + } + + @Override + protected void processaParametros() throws Exception { + + } + + private Timestamp getDataHoraInicial(Date dataInicial) { + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(dataInicial); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + + return new Timestamp(calendar.getTime().getTime()); + } + + private Timestamp getDataHoraFinal(Date dataFinal) { + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(dataFinal); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + + return new Timestamp(calendar.getTime().getTime()); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_es.properties new file mode 100644 index 000000000..90fde1792 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_es.properties @@ -0,0 +1,40 @@ +cabecalho.nome=Relatório Segunda Via +cabecalho.periodo=Período +cabecalho.periodoA=à +cabecalho.puntoVenta=Agência: +cabecalho.empresa=Empresa: +label.servico=Serviço +label.dataViagem=Data Viagem +label.dataSegundaVia=Data Seg.Via +label.origem=Origem +label.destino=Destino +label.codOrigem=Cod.O +label.codDestino=Cod.D +label.poltrona=Poltrona +label.dataVenda=Data Venda +label.bilheteiro=Bilheteiro +label.bilhete=Bilhete +label.puntoVenta=Agência +label.tarifa=Tarifa +label.taxa=Taxa +label.seguro=Seguro +label.pedagio=Pedágio +label.coo=Coo +label.preImpresso=Pre Imp. +label.serieImpFiscal=Série +label.nomeEmpresa=Empresa +label.nomeAgencia=Agência +label.dataServico=Data Serviço +label.horaServico=Hrs.Servic +label.horaTransacao=Hora Trans. +label.linha=Linha +label.ccf=ccf +label.ecfOriginal=ECF.ORI +label.ecfSegundaVia=ECF.2º via +label.utr=UTR +label.tpp=TPP +label.siglaTipoPassagem=Sigl.Tip.Pass +label.tipoPassagem=Tp.Pass +label.valorTotal=Vlr.Tot +msg.noData=Não foi possivel obter dados com os parâmetros informados. +label.numBpe=BP-e \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_pt_BR.properties new file mode 100644 index 000000000..90fde1792 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaViaBoleto_pt_BR.properties @@ -0,0 +1,40 @@ +cabecalho.nome=Relatório Segunda Via +cabecalho.periodo=Período +cabecalho.periodoA=à +cabecalho.puntoVenta=Agência: +cabecalho.empresa=Empresa: +label.servico=Serviço +label.dataViagem=Data Viagem +label.dataSegundaVia=Data Seg.Via +label.origem=Origem +label.destino=Destino +label.codOrigem=Cod.O +label.codDestino=Cod.D +label.poltrona=Poltrona +label.dataVenda=Data Venda +label.bilheteiro=Bilheteiro +label.bilhete=Bilhete +label.puntoVenta=Agência +label.tarifa=Tarifa +label.taxa=Taxa +label.seguro=Seguro +label.pedagio=Pedágio +label.coo=Coo +label.preImpresso=Pre Imp. +label.serieImpFiscal=Série +label.nomeEmpresa=Empresa +label.nomeAgencia=Agência +label.dataServico=Data Serviço +label.horaServico=Hrs.Servic +label.horaTransacao=Hora Trans. +label.linha=Linha +label.ccf=ccf +label.ecfOriginal=ECF.ORI +label.ecfSegundaVia=ECF.2º via +label.utr=UTR +label.tpp=TPP +label.siglaTipoPassagem=Sigl.Tip.Pass +label.tipoPassagem=Tp.Pass +label.valorTotal=Vlr.Tot +msg.noData=Não foi possivel obter dados com os parâmetros informados. +label.numBpe=BP-e \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_es.properties index e0de46395..90fde1792 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_es.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_es.properties @@ -36,4 +36,5 @@ label.tpp=TPP label.siglaTipoPassagem=Sigl.Tip.Pass label.tipoPassagem=Tp.Pass label.valorTotal=Vlr.Tot -msg.noData=Não foi possivel obter dados com os parâmetros informados. \ No newline at end of file +msg.noData=Não foi possivel obter dados com os parâmetros informados. +label.numBpe=BP-e \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_pt_BR.properties index e0de46395..90fde1792 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_pt_BR.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioSegundaVia_pt_BR.properties @@ -36,4 +36,5 @@ label.tpp=TPP label.siglaTipoPassagem=Sigl.Tip.Pass label.tipoPassagem=Tp.Pass label.valorTotal=Vlr.Tot -msg.noData=Não foi possivel obter dados com os parâmetros informados. \ No newline at end of file +msg.noData=Não foi possivel obter dados com os parâmetros informados. +label.numBpe=BP-e \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jasper index 40aa0797e..4a21cbc32 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jrxml index 7efb13d14..771fbbacc 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaVia.jrxml @@ -1,7 +1,7 @@ - - - + + + @@ -43,6 +43,7 @@ + <band height="109" splitType="Stretch"> <textField> @@ -64,7 +65,7 @@ <textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression> </textField> <textField pattern="dd/MM/yyyy HH:mm"> - <reportElement x="621" y="0" width="209" height="20" uuid="1f9eb9ba-8865-4a88-9dbb-471a1907d3c5"/> + <reportElement x="621" y="0" width="489" height="20" uuid="1f9eb9ba-8865-4a88-9dbb-471a1907d3c5"/> <textElement textAlignment="Right"> <font isBold="true"/> </textElement> @@ -88,370 +89,384 @@ <columnHeader> <band height="26"> <textField> - <reportElement x="0" y="4" width="53" height="20" uuid="3ed0e9b0-4cba-410c-b60a-75021ba8aaba"/> + <reportElement x="0" y="4" width="150" height="20" uuid="3ed0e9b0-4cba-410c-b60a-75021ba8aaba"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.nomeEmpresa}]]></textFieldExpression> </textField> <textField> - <reportElement x="488" y="4" width="37" height="20" uuid="fd9f277b-fe19-442c-8e90-80c6a3ec6a42"/> + <reportElement x="700" y="4" width="37" height="20" uuid="fd9f277b-fe19-442c-8e90-80c6a3ec6a42"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.codOrigem}]]></textFieldExpression> </textField> <textField> - <reportElement x="589" y="4" width="32" height="20" uuid="215a6ac2-7b4a-4351-93a5-be690a63294b"/> + <reportElement x="807" y="4" width="32" height="20" uuid="215a6ac2-7b4a-4351-93a5-be690a63294b"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.codDestino}]]></textFieldExpression> </textField> <textField> - <reportElement x="666" y="4" width="40" height="20" uuid="8e219835-55b3-44d4-924b-d3f90cbfe8bf"/> + <reportElement x="889" y="4" width="40" height="20" uuid="8e219835-55b3-44d4-924b-d3f90cbfe8bf"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.poltrona}]]></textFieldExpression> </textField> <textField> - <reportElement x="180" y="4" width="53" height="20" uuid="42b9ffff-b6c6-48b7-beb2-0e664de7f058"/> + <reportElement x="357" y="4" width="55" height="20" uuid="42b9ffff-b6c6-48b7-beb2-0e664de7f058"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.dataSegundaVia}]]></textFieldExpression> </textField> <textField> - <reportElement x="125" y="4" width="55" height="20" uuid="6d81ffde-0d85-4b8c-8f3c-28a940854348"/> + <reportElement x="267" y="4" width="90" height="20" uuid="6d81ffde-0d85-4b8c-8f3c-28a940854348"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.bilheteiro}]]></textFieldExpression> </textField> <textField> - <reportElement x="742" y="4" width="29" height="20" uuid="1ae18e81-d143-469b-9f83-d41bc75d47c9"/> + <reportElement x="969" y="4" width="40" height="20" uuid="1ae18e81-d143-469b-9f83-d41bc75d47c9"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression> </textField> <textField> - <reportElement x="771" y="4" width="29" height="20" uuid="a56cd406-c7e8-48de-8e5d-908cdce4f315"/> + <reportElement x="1009" y="4" width="35" height="20" uuid="a56cd406-c7e8-48de-8e5d-908cdce4f315"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.ccf}]]></textFieldExpression> </textField> <textField> - <reportElement x="934" y="4" width="31" height="20" uuid="630970c1-f08a-4b2d-83f5-6c8882168fde"/> + <reportElement x="1189" y="4" width="35" height="20" uuid="630970c1-f08a-4b2d-83f5-6c8882168fde"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression> </textField> <textField> - <reportElement x="965" y="4" width="30" height="20" uuid="459b8152-b3af-40e5-9b14-22214dc92fcc"/> + <reportElement x="1224" y="4" width="35" height="20" uuid="459b8152-b3af-40e5-9b14-22214dc92fcc"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression> </textField> <textField> - <reportElement x="995" y="4" width="35" height="20" uuid="b7690ce2-0872-4780-bbaa-fdb3924c98ac"/> + <reportElement x="1259" y="4" width="40" height="20" uuid="b7690ce2-0872-4780-bbaa-fdb3924c98ac"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression> </textField> <textField> - <reportElement x="324" y="4" width="36" height="20" uuid="7a67037e-c0b2-4d3c-9c7c-d53bcde3bb87"/> + <reportElement x="522" y="4" width="50" height="20" uuid="7a67037e-c0b2-4d3c-9c7c-d53bcde3bb87"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.servico}]]></textFieldExpression> </textField> <textField> - <reportElement x="53" y="4" width="72" height="20" uuid="20c30ade-bf6b-4b3a-a45b-fdf58088f6bb"/> + <reportElement x="150" y="4" width="117" height="20" uuid="20c30ade-bf6b-4b3a-a45b-fdf58088f6bb"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.nomeAgencia}]]></textFieldExpression> </textField> <textField> - <reportElement x="233" y="4" width="41" height="20" uuid="10ede63f-de68-46d8-a409-0cbe6c2e3895"/> + <reportElement x="412" y="4" width="50" height="20" uuid="10ede63f-de68-46d8-a409-0cbe6c2e3895"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.horaTransacao}]]></textFieldExpression> </textField> <textField> - <reportElement x="274" y="4" width="50" height="20" uuid="ab8e6a28-3de3-4379-a896-affeef5dbffe"/> + <reportElement x="462" y="4" width="60" height="20" uuid="ab8e6a28-3de3-4379-a896-affeef5dbffe"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.dataServico}]]></textFieldExpression> </textField> <textField> - <reportElement x="360" y="4" width="83" height="20" uuid="d67d17f7-33ea-42ac-bbd9-4867b1b9f916"/> + <reportElement x="572" y="4" width="83" height="20" uuid="d67d17f7-33ea-42ac-bbd9-4867b1b9f916"/> <textElement textAlignment="Center" markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.linha}]]></textFieldExpression> </textField> <textField> - <reportElement x="443" y="4" width="45" height="20" uuid="caa0ca78-1be0-4ef7-9483-50bbd814bd35"/> + <reportElement x="655" y="4" width="45" height="20" uuid="caa0ca78-1be0-4ef7-9483-50bbd814bd35"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.horaServico}]]></textFieldExpression> </textField> <textField> - <reportElement x="525" y="4" width="64" height="20" uuid="ae547a08-2468-4009-8909-ce85f1532ca3"/> + <reportElement x="737" y="4" width="70" height="20" uuid="ae547a08-2468-4009-8909-ce85f1532ca3"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression> </textField> <textField> - <reportElement x="621" y="4" width="45" height="20" uuid="1e1db656-f354-4217-b098-7308a7a2bbf1"/> + <reportElement x="839" y="4" width="50" height="20" uuid="1e1db656-f354-4217-b098-7308a7a2bbf1"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression> </textField> <textField> - <reportElement x="706" y="4" width="36" height="20" uuid="3ab501dc-de6e-4534-ad27-0798a00582ab"/> + <reportElement x="929" y="4" width="40" height="20" uuid="3ab501dc-de6e-4534-ad27-0798a00582ab"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.ecfOriginal}]]></textFieldExpression> </textField> <textField> - <reportElement x="800" y="4" width="30" height="20" uuid="362468fc-822c-4cc4-8a4c-b689cf990247"/> + <reportElement x="1044" y="4" width="35" height="20" uuid="362468fc-822c-4cc4-8a4c-b689cf990247"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.ecfSegundaVia}]]></textFieldExpression> </textField> <textField> - <reportElement x="830" y="4" width="28" height="20" uuid="37624dd3-ce84-4236-8f81-4497d2abc214"/> + <reportElement x="1079" y="4" width="30" height="20" uuid="37624dd3-ce84-4236-8f81-4497d2abc214"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.siglaTipoPassagem}]]></textFieldExpression> </textField> <textField> - <reportElement x="858" y="4" width="45" height="20" uuid="e1f88283-95e9-4ef6-a310-5e615569c13c"/> + <reportElement x="1109" y="4" width="45" height="20" uuid="e1f88283-95e9-4ef6-a310-5e615569c13c"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.tipoPassagem}]]></textFieldExpression> </textField> <textField> - <reportElement x="903" y="4" width="31" height="20" uuid="dddcee83-2058-4dc7-a66a-a3a2078f56e1"/> + <reportElement x="1154" y="4" width="35" height="20" uuid="dddcee83-2058-4dc7-a66a-a3a2078f56e1"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.valorTotal}]]></textFieldExpression> </textField> <textField> - <reportElement x="1030" y="4" width="21" height="20" uuid="435d9b67-900e-42f0-8f8c-ed8c1c59a2a1"/> + <reportElement x="1299" y="4" width="25" height="20" uuid="435d9b67-900e-42f0-8f8c-ed8c1c59a2a1"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.utr}]]></textFieldExpression> </textField> <textField> - <reportElement x="1051" y="4" width="19" height="20" uuid="4a234cca-1499-4684-ac9f-66f94a0e8790"/> + <reportElement x="1324" y="4" width="25" height="20" uuid="4a234cca-1499-4684-ac9f-66f94a0e8790"/> <textElement markup="none"> - <font size="8" isBold="true"/> + <font size="7" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$R{label.tpp}]]></textFieldExpression> </textField> + <textField> + <reportElement x="1349" y="4" width="40" height="20" uuid="0293cd1e-18b2-46d1-8c44-63f892368a75"/> + <textElement markup="none"> + <font size="7" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.numBpe}]]></textFieldExpression> + </textField> </band> </columnHeader> <detail> <band height="30" splitType="Stretch"> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="324" y="0" width="36" height="29" uuid="fa4ed1e8-85a8-44f8-8e0b-6dd8480e37e8"/> + <reportElement stretchType="RelativeToTallestObject" x="1349" y="0" width="40" height="29" uuid="90473dfc-c48b-41c0-8740-13b8d18b0787"/> <textElement> - <font size="8"/> + <font size="7"/> + </textElement> + <textFieldExpression><![CDATA[$F{numBpe}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> + <reportElement stretchType="RelativeToTallestObject" x="522" y="0" width="50" height="29" uuid="fa4ed1e8-85a8-44f8-8e0b-6dd8480e37e8"/> + <textElement> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="488" y="0" width="37" height="29" uuid="583d984f-13ec-499f-ac31-8f6672a12336"/> + <reportElement stretchType="RelativeToTallestObject" x="700" y="0" width="37" height="29" uuid="583d984f-13ec-499f-ac31-8f6672a12336"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="589" y="0" width="32" height="29" uuid="37e4f928-6c97-4a04-a452-b19832779cd7"/> + <reportElement stretchType="RelativeToTallestObject" x="807" y="0" width="32" height="29" uuid="37e4f928-6c97-4a04-a452-b19832779cd7"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="666" y="0" width="40" height="29" uuid="5d77e9c4-4b6e-4030-992f-8dcddbe9ad9b"/> + <reportElement stretchType="RelativeToTallestObject" x="889" y="0" width="40" height="29" uuid="5d77e9c4-4b6e-4030-992f-8dcddbe9ad9b"/> <textElement textAlignment="Center"> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{poltrona}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="180" y="0" width="53" height="29" uuid="5f2d301c-5c9d-4f13-b25b-bc121e7a888a"/> + <reportElement stretchType="RelativeToTallestObject" x="357" y="0" width="55" height="29" uuid="5f2d301c-5c9d-4f13-b25b-bc121e7a888a"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{dataSegundaVia}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="125" y="0" width="55" height="29" uuid="bc37d096-eb4b-4fc7-a9d2-2c68c619ce5c"/> + <reportElement stretchType="RelativeToTallestObject" x="267" y="0" width="90" height="29" uuid="bc37d096-eb4b-4fc7-a9d2-2c68c619ce5c"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{bilheteiro}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="742" y="0" width="29" height="29" uuid="c7f146b9-18ea-43b2-90f9-c4535885c64b"/> + <reportElement stretchType="RelativeToTallestObject" x="969" y="0" width="40" height="29" uuid="c7f146b9-18ea-43b2-90f9-c4535885c64b"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="771" y="0" width="29" height="29" uuid="5b133346-bb57-44f0-9a85-b63f0d60f02a"/> + <reportElement stretchType="RelativeToTallestObject" x="1009" y="0" width="35" height="29" uuid="5b133346-bb57-44f0-9a85-b63f0d60f02a"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{ccf}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="934" y="0" width="31" height="29" uuid="660caf7d-d229-48bb-be15-56107e2187df"/> + <reportElement stretchType="RelativeToTallestObject" x="1189" y="0" width="35" height="29" uuid="660caf7d-d229-48bb-be15-56107e2187df"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="965" y="0" width="30" height="29" uuid="9a20c316-fc88-45b8-9cba-8c5eac8778ef"/> + <reportElement stretchType="RelativeToTallestObject" x="1224" y="0" width="35" height="29" uuid="9a20c316-fc88-45b8-9cba-8c5eac8778ef"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="995" y="0" width="35" height="29" uuid="fe52b8c5-b00a-40a1-a0fc-80b222ebfbaf"/> + <reportElement stretchType="RelativeToTallestObject" x="1259" y="0" width="40" height="29" uuid="fe52b8c5-b00a-40a1-a0fc-80b222ebfbaf"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="706" y="0" width="36" height="29" uuid="6f65a0ff-bbce-4e7c-aea3-68795952590c"/> + <reportElement stretchType="RelativeToTallestObject" x="929" y="0" width="40" height="29" uuid="6f65a0ff-bbce-4e7c-aea3-68795952590c"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{serieImpFiscal}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="53" height="29" uuid="e3857cbb-d9b4-4e46-aebd-5998e1371fd5"/> + <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="150" height="29" uuid="e3857cbb-d9b4-4e46-aebd-5998e1371fd5"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{nomeEmpresa}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="53" y="0" width="72" height="29" uuid="497be5c7-0986-4ae6-911b-bec8d95c883c"/> + <reportElement stretchType="RelativeToTallestObject" x="150" y="0" width="117" height="29" uuid="497be5c7-0986-4ae6-911b-bec8d95c883c"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{nomeAgencia}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="HH:mm" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="233" y="0" width="41" height="29" uuid="c8dbf3c4-b98c-4c78-b38b-97a9b44906a2"/> + <reportElement stretchType="RelativeToTallestObject" x="412" y="0" width="50" height="29" uuid="c8dbf3c4-b98c-4c78-b38b-97a9b44906a2"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{dataVenda}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="274" y="0" width="50" height="29" uuid="6bc08e9d-d76f-443c-9598-c4945a1bc23a"/> + <reportElement stretchType="RelativeToTallestObject" x="462" y="0" width="60" height="29" uuid="6bc08e9d-d76f-443c-9598-c4945a1bc23a"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{dataViagem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="360" y="0" width="83" height="29" uuid="3a133cad-d16b-48f7-96ac-23ae5b42f3a1"/> + <reportElement stretchType="RelativeToTallestObject" x="572" y="0" width="83" height="29" uuid="3a133cad-d16b-48f7-96ac-23ae5b42f3a1"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="443" y="0" width="45" height="29" uuid="7b46a1fd-2441-4d7e-8a2d-0f89c01b7628"/> + <reportElement stretchType="RelativeToTallestObject" x="655" y="0" width="45" height="29" uuid="7b46a1fd-2441-4d7e-8a2d-0f89c01b7628"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{horaServico}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="525" y="0" width="64" height="29" uuid="a7c27960-ee5f-495c-9f26-40895de057d0"/> + <reportElement stretchType="RelativeToTallestObject" x="737" y="0" width="70" height="29" uuid="a7c27960-ee5f-495c-9f26-40895de057d0"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{descOrigem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="800" y="0" width="30" height="29" uuid="7f655bd0-a1d8-4cde-bdba-4968e3890487"/> + <reportElement stretchType="RelativeToTallestObject" x="1044" y="0" width="35" height="29" uuid="7f655bd0-a1d8-4cde-bdba-4968e3890487"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{serieImpFiscalSegundaVia}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="830" y="0" width="28" height="29" uuid="5dab28d4-b86c-4c1a-8028-b6ad383fde8c"/> + <reportElement stretchType="RelativeToTallestObject" x="1079" y="0" width="30" height="29" uuid="5dab28d4-b86c-4c1a-8028-b6ad383fde8c"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{siglaTipoPassagem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="858" y="0" width="45" height="29" uuid="a0cc8fb9-b649-4377-875f-175f2902a8de"/> + <reportElement stretchType="RelativeToTallestObject" x="1109" y="0" width="45" height="29" uuid="a0cc8fb9-b649-4377-875f-175f2902a8de"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{tipoPassagem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="903" y="0" width="31" height="29" uuid="703b36be-720b-4b8b-aaba-b04fded2c5d6"/> + <reportElement stretchType="RelativeToTallestObject" x="1154" y="0" width="35" height="29" uuid="703b36be-720b-4b8b-aaba-b04fded2c5d6"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{valorTotal}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="1030" y="0" width="21" height="29" uuid="d44399c6-3300-4041-9d93-afa476e744f5"/> + <reportElement stretchType="RelativeToTallestObject" x="1299" y="0" width="25" height="29" uuid="d44399c6-3300-4041-9d93-afa476e744f5"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{utr}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="1051" y="0" width="19" height="29" uuid="098bb6bc-42f4-4767-862a-0b1c5711624d"/> + <reportElement stretchType="RelativeToTallestObject" x="1324" y="0" width="25" height="29" uuid="098bb6bc-42f4-4767-862a-0b1c5711624d"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{tpp}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToTallestObject" x="621" y="0" width="45" height="29" uuid="bb0ea97d-2a68-4fe3-84c0-68e14b742a70"/> + <reportElement stretchType="RelativeToTallestObject" x="839" y="0" width="50" height="29" uuid="bb0ea97d-2a68-4fe3-84c0-68e14b742a70"/> <textElement> - <font size="8"/> + <font size="7"/> </textElement> <textFieldExpression><![CDATA[$F{descDestino}]]></textFieldExpression> </textField> diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jasper new file mode 100644 index 000000000..b50e5b76e Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jrxml new file mode 100644 index 000000000..2b28ce44b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioSegundaViaBoleto.jrxml @@ -0,0 +1,328 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioSegundaViaBoleto" pageWidth="930" pageHeight="595" orientation="Landscape" columnWidth="920" leftMargin="5" rightMargin="5" topMargin="20" bottomMargin="20" uuid="0a7b3817-e201-4a91-8edd-6102b120e19f"> + <property name="ireport.zoom" value="1.0"/> + <property name="ireport.x" value="194"/> + <property name="ireport.y" value="0"/> + <property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/> + <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/> + <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/> + <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> + <parameter name="dataInicial" class="java.lang.String"/> + <parameter name="dataFinal" class="java.lang.String"/> + <parameter name="puntoVenta" class="java.lang.String"/> + <parameter name="empresa" class="java.lang.String"/> + <field name="bilheteiro" class="java.lang.String"/> + <field name="bilhete" class="java.lang.String"/> + <field name="coo" class="java.lang.Integer"/> + <field name="dataVenda" class="java.util.Date"/> + <field name="dataViagem" class="java.util.Date"/> + <field name="destino" class="java.lang.String"/> + <field name="origem" class="java.lang.String"/> + <field name="pedagio" class="java.math.BigDecimal"/> + <field name="preImpresso" class="java.lang.String"/> + <field name="puntoVenta" class="java.lang.Integer"/> + <field name="seguro" class="java.math.BigDecimal"/> + <field name="serieImpFiscal" class="java.lang.String"/> + <field name="servico" class="java.lang.String"/> + <field name="taxa" class="java.math.BigDecimal"/> + <field name="poltrona" class="java.lang.String"/> + <field name="tarifa" class="java.math.BigDecimal"/> + <field name="numBpe" class="java.lang.String"/> + <title> + <band height="81" splitType="Stretch"> + <textField> + <reportElement x="53" y="61" width="139" height="20" uuid="6d12efc3-f23b-431a-bfb1-9950e6bfe6fc"/> + <textFieldExpression><![CDATA[$P{puntoVenta}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="20" width="620" height="20" uuid="7830e707-ce31-4907-8665-aa462d023a82"/> + <textElement> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{dataInicial} + " " + $R{cabecalho.periodoA} + " " + $P{dataFinal}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="0" width="620" height="20" uuid="b148e230-ff82-488a-bcdd-5ceb2ea723e3"/> + <textElement markup="none"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement x="638" y="0" width="164" height="20" uuid="1f9eb9ba-8865-4a88-9dbb-471a1907d3c5"/> + <textElement textAlignment="Right"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="61" width="53" height="20" uuid="47f0b61e-1ba4-43e4-9a4a-c8e17972b943"/> + <textFieldExpression><![CDATA[$R{cabecalho.puntoVenta}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="41" width="53" height="20" uuid="f4c6e5b9-844d-440a-9a47-719101152087"/> + <textElement markup="none"/> + <textFieldExpression><![CDATA[$R{cabecalho.empresa}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="53" y="41" width="139" height="20" uuid="6985a79c-5487-47e6-acf7-e94ef7c24073"/> + <textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioSegundaViaBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioSegundaViaBean.java index 55104bda0..a918a354a 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioSegundaViaBean.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioSegundaViaBean.java @@ -38,6 +38,7 @@ public class RelatorioSegundaViaBean { private String siglaTipoPassagem; private String tipoPassagem; private String horaServico; + private String numBpe; public String getServico() { return servico; @@ -303,4 +304,12 @@ public class RelatorioSegundaViaBean { this.horaServico = horaServico; } + public String getNumBpe() { + return numBpe; + } + + public void setNumBpe(String numBpe) { + this.numBpe = numBpe; + } + } diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioSegundaViaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioSegundaViaController.java index ad67b068e..7ee81bcf8 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioSegundaViaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioSegundaViaController.java @@ -14,10 +14,12 @@ import org.zkoss.util.resource.Labels; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zul.Datebox; +import org.zkoss.zul.Radio; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaVia; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaViaBoleto; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService; @@ -45,6 +47,9 @@ public class RelatorioSegundaViaController extends MyGenericForwardComposer { private Datebox txtDataFinal; private MyComboboxEstandar cmbEmpresa; private MyComboboxPuntoVenta cmbPuntoVenta; + + private Radio rdTipoCaja; + private Radio rdTipoBoleto; public void onClick$btnExecutarRelatorio(Event ev) throws Exception { executarRelatorio(); @@ -67,7 +72,12 @@ public class RelatorioSegundaViaController extends MyGenericForwardComposer { parametros.put("dataFinal", dataFinal); parametros.put("NOME_RELATORIO", "RelatorioSegundaVia"); - Relatorio relatorio = new RelatorioSegundaVia(parametros, dataSourceRead.getConnection()); + Relatorio relatorio = null; + if(rdTipoCaja.isChecked()) { + relatorio = new RelatorioSegundaVia(parametros, dataSourceRead.getConnection()); + } else if(rdTipoBoleto.isChecked()) { + relatorio = new RelatorioSegundaViaBoleto(parametros, dataSourceRead.getConnection()); + } Map args = new HashMap(); args.put("relatorio", relatorio); diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index ee6ad140f..f64b5ab99 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -853,6 +853,11 @@ relatorioVendasPTAController.btnPesquisa.label = Pesquisar relatorioVendasPTAController.btnLimpar.label = Limpar Seleção relatorioVendasPTAController.puntoVentaSelList.codigo = Código relatorioVendasPTAController.puntoVentaSelList.nome = Nome +relatorioSegundaViaController.lbTipoCaja.value=Movimiento de Caja +relatorioSegundaViaController.lbTipoCajaDescricao.value=Emite informe basado en los movimientos de caja +relatorioSegundaViaController.lbTipoBoleto.value=Ocupación +relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite informe basado en la ocupación del servicio +relatorioSegundaViaController.lbTipoRelatorio.value=Referência #Relatório de Serviço Bloqueado na Venda Internet relatorioServicoBloqueadoVendaInternetController.window.title = Reporte corrida bgloqueada en venta internet diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 2dace8453..c1ecfb077 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -939,6 +939,11 @@ relatorioVendasPTAController.btnPesquisa.label = Pesquisar relatorioVendasPTAController.btnLimpar.label = Limpar Seleção relatorioVendasPTAController.puntoVentaSelList.codigo = Código relatorioVendasPTAController.puntoVentaSelList.nome = Nome +relatorioSegundaViaController.lbTipoCaja.value=Movimentação de Caixa +relatorioSegundaViaController.lbTipoCajaDescricao.value=Emite relatório baseado nas movimentações de caixa +relatorioSegundaViaController.lbTipoBoleto.value=Ocupação +relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite relatório baseado na ocupação do serviço +relatorioSegundaViaController.lbTipoRelatorio.value=Referência #Relatorio Consulta Antt relatorioConsultaAnttController.window.title=Relatório Consulta ANTT diff --git a/web/gui/relatorios/filtroRelatorioSegundaVia.zul b/web/gui/relatorios/filtroRelatorioSegundaVia.zul index b6795b7f9..7eb35cb0d 100644 --- a/web/gui/relatorios/filtroRelatorioSegundaVia.zul +++ b/web/gui/relatorios/filtroRelatorioSegundaVia.zul @@ -7,7 +7,7 @@ + height="180px" width="538px" border="normal"> @@ -45,6 +45,21 @@ use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta" width="100%" /> + + +