fixes bug #6631
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@48009 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9f56628a4e
commit
41a3abfbad
|
@ -0,0 +1,274 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Date;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
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.RelatorioVendasPacotesBoletosBean;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioVendasBoletos extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioVendasBoletos.class);
|
||||
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
|
||||
private List<RelatorioVendasPacotesBoletosBean> lsDadosRelatorio;
|
||||
|
||||
private Date fecInicio;
|
||||
private Date fecFinal;
|
||||
private Integer empresaId;
|
||||
private Integer origenId;
|
||||
private Integer destinoId;
|
||||
|
||||
public RelatorioVendasBoletos(Map<String, Object> parametros, Connection conexao, final String... nomeSubReporte) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
|
||||
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
fecInicio = new java.sql.Date(sdf.parse(parametros.get("fecInicio").toString()).getTime());
|
||||
fecFinal = new java.sql.Date(sdf.parse(parametros.get("fecFinal").toString()).getTime());
|
||||
empresaId = parametros.get("empresaId") != null && !parametros.get("empresaId").equals("null") ? Integer.valueOf(parametros.get("empresaId").toString()) : null;
|
||||
origenId = parametros.get("origenId") != null && !parametros.get("origenId").equals("null") ? Integer.valueOf(parametros.get("origenId").toString()) : null;
|
||||
destinoId = parametros.get("destinoId") != null && !parametros.get("destinoId").equals("null") ? Integer.valueOf(parametros.get("destinoId").toString()) : null;
|
||||
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
processarVendasPacote(conexao);
|
||||
processarVendasPacoteCancelados(conexao);
|
||||
|
||||
setNomeSubReporte(nomeSubReporte);
|
||||
setLsDadosRelatorio(lsDadosRelatorio);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void processarVendasPacote(Connection conexao) {
|
||||
ResultSet rset = null;
|
||||
NamedParameterStatement stmt = null;
|
||||
|
||||
try {
|
||||
stmt = carregarNamedParameterStatement(conexao, false);
|
||||
rset = stmt.executeQuery();
|
||||
|
||||
if(lsDadosRelatorio == null) {
|
||||
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
|
||||
}
|
||||
|
||||
while (rset.next()) {
|
||||
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
|
||||
Integer idx = carregarIndice(relatorioVendasBoletosBean);
|
||||
|
||||
if(idx != null) {
|
||||
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
|
||||
}
|
||||
|
||||
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans()));
|
||||
|
||||
if(idx != null) {
|
||||
lsDadosRelatorio.set(idx, relatorioVendasBoletosBean);
|
||||
} else {
|
||||
lsDadosRelatorio.add(relatorioVendasBoletosBean);
|
||||
}
|
||||
}
|
||||
|
||||
} 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 List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> carregarItens(ResultSet rset, RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean, List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> itens) throws SQLException {
|
||||
RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean relatorioVendasPacotesBoletosItemBean = relatorioVendasPacotesBoletosBean.new RelatorioVendasPacotesBoletosItemBean();
|
||||
relatorioVendasPacotesBoletosItemBean.setDesccategoria(rset.getString("desccategoria"));
|
||||
relatorioVendasPacotesBoletosItemBean.setQtde(rset.getLong("qtde"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimportetaxaembarque(rset.getBigDecimal("simportetaxaembarque"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimportepedagio(rset.getBigDecimal("simportepedagio"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimporteoutros(rset.getBigDecimal("simporteoutros"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimporteseguro(rset.getBigDecimal("simporteseguro"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSpreciobase(rset.getBigDecimal("spreciobase"));
|
||||
relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto"));
|
||||
|
||||
if(itens == null) {
|
||||
itens = new ArrayList<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean>();
|
||||
}
|
||||
itens.add(relatorioVendasPacotesBoletosItemBean);
|
||||
|
||||
return itens;
|
||||
}
|
||||
|
||||
private Integer carregarIndice(RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean) {
|
||||
Integer idx = null;
|
||||
if(lsDadosRelatorio.contains(relatorioVendasBoletosBean)) {
|
||||
idx = lsDadosRelatorio.indexOf(relatorioVendasBoletosBean);
|
||||
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
private RelatorioVendasPacotesBoletosBean carregarRelatorioVendasBoletosBean(ResultSet rset) throws SQLException {
|
||||
RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean = new RelatorioVendasPacotesBoletosBean();
|
||||
relatorioVendasPacotesBoletosBean.setDescdestino(rset.getString("destino"));
|
||||
relatorioVendasPacotesBoletosBean.setDescorigen(rset.getString("origem"));
|
||||
relatorioVendasPacotesBoletosBean.setCvedestino(rset.getString("cvedestino"));
|
||||
relatorioVendasPacotesBoletosBean.setCveorigen(rset.getString("cveorigem"));
|
||||
|
||||
return relatorioVendasPacotesBoletosBean;
|
||||
}
|
||||
|
||||
private void processarVendasPacoteCancelados(Connection conexao) {
|
||||
ResultSet rset = null;
|
||||
NamedParameterStatement stmt = null;
|
||||
|
||||
try {
|
||||
stmt = carregarNamedParameterStatement(conexao, true);
|
||||
rset = stmt.executeQuery();
|
||||
|
||||
if(lsDadosRelatorio == null) {
|
||||
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
|
||||
}
|
||||
|
||||
while (rset.next()) {
|
||||
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
|
||||
Integer idx = carregarIndice(relatorioVendasBoletosBean);
|
||||
|
||||
if(idx != null) {
|
||||
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
|
||||
}
|
||||
|
||||
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeansCancelados(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeansCancelados()));
|
||||
|
||||
if(idx != null) {
|
||||
lsDadosRelatorio.set(idx, relatorioVendasBoletosBean);
|
||||
} else {
|
||||
lsDadosRelatorio.add(relatorioVendasBoletosBean);
|
||||
}
|
||||
}
|
||||
|
||||
} 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 NamedParameterStatement carregarNamedParameterStatement(Connection conexao, boolean cancelados) throws SQLException {
|
||||
String sql = getSqlPacotes(cancelados);
|
||||
log.info(sql);
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||
|
||||
if(fecInicio != null) {
|
||||
stmt.setDate("fecInicio", fecInicio);
|
||||
}
|
||||
if(fecFinal != null) {
|
||||
stmt.setDate("fecFinal", fecFinal);
|
||||
}
|
||||
if (empresaId != null){
|
||||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
if(origenId != null) {
|
||||
stmt.setInt("origenId", origenId);
|
||||
}
|
||||
if(destinoId != null) {
|
||||
stmt.setInt("destinoId", destinoId);
|
||||
}
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
protected String getSqlPacotes(boolean cancelado) {
|
||||
StringBuilder sQuery = new StringBuilder();
|
||||
|
||||
sQuery.append("SELECT DES.CVEPARADA AS CVEDESTINO, ORI.CVEPARADA AS CVEORIGEM, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, CAT.DESCCATEGORIA AS DESCCATEGORIA, ")
|
||||
.append("COUNT(B.BOLETO_ID) AS QTDE, SUM(B.IMPORTETAXAEMBARQUE) AS SIMPORTETAXAEMBARQUE, SUM(B.IMPORTEPEDAGIO) AS SIMPORTEPEDAGIO, ")
|
||||
.append("SUM(B.IMPORTEOUTROS) AS SIMPORTEOUTROS, SUM(B.IMPORTESEGURO) AS SIMPORTESEGURO, SUM(B.PRECIOBASE) AS SPRECIOBASE, SUM(B.PRECIOBASE - B.PRECIOPAGADO) AS DESCONTO ")
|
||||
.append("FROM BOLETO B ")
|
||||
.append("LEFT JOIN PARADA ORI ON ORI.PARADA_ID = B.ORIGEN_ID ")
|
||||
.append("LEFT JOIN PARADA DES ON DES.PARADA_ID = B.DESTINO_ID ")
|
||||
.append("LEFT JOIN CATEGORIA CAT ON CAT.CATEGORIA_ID = B.CATEGORIA_ID ")
|
||||
.append("WHERE B.ACTIVO = 1 ");
|
||||
|
||||
if(!cancelado) {
|
||||
sQuery.append("AND B.INDSTATUSBOLETO = 'V' ")
|
||||
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");
|
||||
} else {
|
||||
sQuery.append("AND B.MOTIVOCANCELACION_ID IS NOT NULL ");
|
||||
}
|
||||
|
||||
if(empresaId != null) {
|
||||
sQuery.append("AND B.EMPRESACORRIDA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(origenId != null) {
|
||||
sQuery.append("AND B.ORIGEN_ID = :origenId ");
|
||||
}
|
||||
|
||||
if(destinoId != null) {
|
||||
sQuery.append("AND B.DESTINO_ID = :destinoId ");
|
||||
}
|
||||
|
||||
if(fecInicio != null) {
|
||||
sQuery.append("AND B.FECHORVENTA >= :fecInicio ");
|
||||
}
|
||||
|
||||
if(fecFinal != null) {
|
||||
sQuery.append("AND B.FECHORVENTA <= :fecFinal ");
|
||||
}
|
||||
|
||||
sQuery.append("GROUP BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA ")
|
||||
.append("ORDER BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA ");
|
||||
|
||||
return sQuery.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
public List<RelatorioVendasPacotesBoletosBean> getLsDadosRelatorio() {
|
||||
return lsDadosRelatorio;
|
||||
}
|
||||
|
||||
public void setLsDadosRelatorio(List<RelatorioVendasPacotesBoletosBean> lsDadosRelatorio) {
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
|
||||
this.lsDadosRelatorio = lsDadosRelatorio;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
#Labels
|
||||
label.qtde=Qtde
|
||||
label.categoria=Categoria
|
||||
label.spreciobase=Valor Tarifário
|
||||
label.simporteseguro=Valor Seguro
|
||||
label.simportetaxaembarque=Taxa Embarque
|
||||
label.simporteoutros=Valor Serviço
|
||||
label.spreciopagado=Total c/ Desconto
|
||||
label.desconto=Desconto
|
||||
label.spreciototal=Valor Total
|
|
@ -0,0 +1,10 @@
|
|||
#Labels
|
||||
label.qtde=Qtde
|
||||
label.categoria=Categoria
|
||||
label.spreciobase=Valor Tarifário
|
||||
label.simporteseguro=Valor Seguro
|
||||
label.simportetaxaembarque=Taxa Embarque
|
||||
label.simporteoutros=Valor Serviço
|
||||
label.spreciopagado=Total c/ Desconto
|
||||
label.desconto=Desconto
|
||||
label.spreciototal=Valor Total
|
|
@ -0,0 +1,18 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.nome=Relatório Vendas de Boletos
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
cabecalho.periodoA=à
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
||||
cabecalho.origem=Origem:
|
||||
cabecalho.destino=Destino:
|
||||
label.empresa=Empresa:
|
||||
label.trecho=Trecho:
|
||||
label.cancelados = - CANCELADOS
|
|
@ -0,0 +1,18 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.nome=Relatório Vendas de Boletos
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
cabecalho.periodoA=à
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
||||
cabecalho.origem=Origem:
|
||||
cabecalho.destino=Destino:
|
||||
label.empresa=Empresa:
|
||||
label.trecho=Trecho:
|
||||
label.cancelados=- CANCELADOS
|
Binary file not shown.
|
@ -0,0 +1,142 @@
|
|||
<?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="RelatorioVendasBoletos" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="empresa" class="java.lang.String"/>
|
||||
<parameter name="fecInicio" class="java.lang.String"/>
|
||||
<parameter name="fecFinal" class="java.lang.String"/>
|
||||
<parameter name="noDataRelatorio" class="java.lang.String"/>
|
||||
<parameter name="subreporte" class="net.sf.jasperreports.engine.JasperReport"/>
|
||||
<parameter name="trecho" class="java.lang.String"/>
|
||||
<parameter name="origem" class="java.lang.String"/>
|
||||
<parameter name="destino" class="java.lang.String"/>
|
||||
<parameter name="usuario" class="java.lang.String"/>
|
||||
<parameter name="totais" class="java.util.List"/>
|
||||
<parameter name="SUBREPORT_RESOURCE_BUNDLE" class="java.util.ResourceBundle"/>
|
||||
<queryString>
|
||||
<![CDATA[]]>
|
||||
</queryString>
|
||||
<field name="relatorioVendasPacotesBoletosItemBeans" class="java.util.List"/>
|
||||
<field name="descorigen" class="java.lang.String"/>
|
||||
<field name="descdestino" class="java.lang.String"/>
|
||||
<field name="relatorioVendasPacotesBoletosItemBeansCancelados" class="java.util.List"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="80" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="620" height="20" uuid="43b2c28d-4760-4890-b00d-25e931e79c74"/>
|
||||
<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="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="20" width="620" height="20" uuid="a16eb33b-78ca-4fb4-80c2-f5c85a0d09c3"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.empresa} + " " + $P{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="40" width="620" height="20" uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="60" width="802" height="20" uuid="bc1ac781-2bb6-40ef-92dd-d4f07f327d18"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.origem} + " " + $P{origem} + " " + $R{cabecalho.destino} + " " + $P{destino}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band height="22" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="607" y="0" width="195" height="20" uuid="6a8a0843-7236-40a3-98ae-5fbf59b4cfec"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.pagina} + " " + $V{PAGE_NUMBER}+ " " + $R{cabecalho.de} + " " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="79" splitType="Stretch">
|
||||
<printWhenExpression><![CDATA[$F{relatorioVendasPacotesBoletosItemBeans}.isEmpty() == false]]></printWhenExpression>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement positionType="Float" x="0" y="7" width="802" height="20" isPrintWhenDetailOverflows="true" uuid="752263b1-e76b-41c5-a728-c17367094dab"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.trecho} + " " + $F{descorigen} + "/" + $F{descdestino}]]></textFieldExpression>
|
||||
</textField>
|
||||
<subreport isUsingCache="true">
|
||||
<reportElement positionType="Float" x="0" y="33" width="802" height="38" uuid="75fad27f-9275-4535-844a-316ac8365073"/>
|
||||
<subreportParameter name="REPORT_RESOURCE_BUNDLE">
|
||||
<subreportParameterExpression><![CDATA[$P{SUBREPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression>
|
||||
</subreportParameter>
|
||||
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{relatorioVendasPacotesBoletosItemBeans})]]></dataSourceExpression>
|
||||
<subreportExpression><![CDATA[$P{subreporte}]]></subreportExpression>
|
||||
</subreport>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="4" width="802" height="1" uuid="29d8e10c-62eb-4a5b-b71a-05bb44438009"/>
|
||||
</line>
|
||||
</band>
|
||||
<band height="78">
|
||||
<printWhenExpression><![CDATA[$F{relatorioVendasPacotesBoletosItemBeansCancelados}.isEmpty() == false]]></printWhenExpression>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement positionType="Float" x="1" y="7" width="802" height="20" isPrintWhenDetailOverflows="true" uuid="d012a47a-4e8f-4cb3-a760-b7b9e5259cb6"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.trecho} + " " + $F{descorigen} + "/" + $F{descdestino} + " " + $R{label.cancelados}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="1" y="4" width="802" height="1" uuid="38cc08d1-b1f5-40f2-95d4-bd74e26526fd"/>
|
||||
</line>
|
||||
<subreport isUsingCache="true">
|
||||
<reportElement positionType="Float" x="1" y="33" width="802" height="38" uuid="91f8b703-603b-4ea7-b375-3e92456630d6"/>
|
||||
<subreportParameter name="REPORT_RESOURCE_BUNDLE">
|
||||
<subreportParameterExpression><![CDATA[$P{SUBREPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression>
|
||||
</subreportParameter>
|
||||
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{relatorioVendasPacotesBoletosItemBeansCancelados})]]></dataSourceExpression>
|
||||
<subreportExpression><![CDATA[$P{subreporte}]]></subreportExpression>
|
||||
</subreport>
|
||||
</band>
|
||||
</detail>
|
||||
<columnFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</pageFooter>
|
||||
<summary>
|
||||
<band splitType="Stretch"/>
|
||||
</summary>
|
||||
<noData>
|
||||
<band height="24">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement positionType="Float" x="0" y="0" width="555" height="20" isPrintWhenDetailOverflows="true" uuid="d7df66c6-4dc0-4f3b-88f4-b22094d29091"/>
|
||||
<textElement verticalAlignment="Middle"/>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
Binary file not shown.
|
@ -0,0 +1,358 @@
|
|||
<?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="RelatorioVendasBoletosItem" pageWidth="802" pageHeight="555" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f17327a0-45d8-4ec1-8350-688df66785dc">
|
||||
<property name="ireport.zoom" value="3.0"/>
|
||||
<property name="ireport.x" value="526"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<field name="desccategoria" class="java.lang.String"/>
|
||||
<field name="simportetaxaembarque" class="java.math.BigDecimal"/>
|
||||
<field name="simportepedagio" class="java.math.BigDecimal"/>
|
||||
<field name="simporteoutros" class="java.math.BigDecimal"/>
|
||||
<field name="simporteseguro" class="java.math.BigDecimal"/>
|
||||
<field name="desconto" class="java.math.BigDecimal"/>
|
||||
<field name="spreciopagado" class="java.math.BigDecimal"/>
|
||||
<field name="spreciobase" class="java.math.BigDecimal"/>
|
||||
<field name="spreciototal" class="java.math.BigDecimal"/>
|
||||
<field name="qtde" class="java.lang.Long"/>
|
||||
<variable name="vSimportetaxaembarque" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simportetaxaembarque}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimportepedagio" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simportepedagio}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimporteoutros" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simporteoutros}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimporteseguro" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simporteseguro}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vDesconto" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{desconto}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciopagado" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciopagado}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciobase" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciobase}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciototal" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciototal}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vQtde" class="java.lang.Long" calculation="Sum"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band splitType="Stretch"/>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="24" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="177" height="20" isPrintWhenDetailOverflows="true" uuid="ca0cfce0-945a-41b6-a2b6-07b599432260"/>
|
||||
<textElement verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.categoria}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="241" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="74894a72-7acf-43bc-abc7-a3ca0931f1c0"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="321" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="60d565a0-f9c1-4648-87a5-0acd7bcc95cb"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="401" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="7351b458-41bf-4cf3-839a-9b17860cd029"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="481" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="b40f5fec-8d0e-47c6-9a02-c6b9f4f4cf40"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="721" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="7f2d56a0-8755-4192-be26-3c082bcde27f"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="641" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="637d297c-7275-4094-9f67-e6d36eff60a2"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.desconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="561" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="0d9ab795-d305-44a6-b12a-e0445e36613a"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4d4396e4-a34f-438e-a514-662f3dad27d3"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="240" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="693e1442-9a9b-4237-b8ce-a7368319bb8c"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="320" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="b9353306-7d23-4428-bde1-136a92c129d0"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="400" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c236d4ae-a2fe-4fce-80f1-aceabf3d47ad"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a7a71b94-542f-4ebc-9812-982fe947379b"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="560" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ad00d26a-75cd-4fe1-bd28-a8346dcb1e82"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="0960adca-3ca3-4f52-88af-70278652e9a6"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="720" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a5133d51-f908-4ffe-9df8-d25f0b312ab9"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2cdb1883-2ec8-4373-90d1-35eaf7502cbc"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="0da94d15-8bfb-4954-84fb-9e277c593308"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="64883292-c3bb-4786-a914-44d64bfc53c9"/>
|
||||
</line>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="179" y="2" width="61" height="20" isPrintWhenDetailOverflows="true" uuid="409f4726-a294-419c-944e-3d1efa2450ff"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.qtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="178" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="034c9dbc-f4cf-49b1-910a-168ea7f41c1d"/>
|
||||
</line>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="24" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="177" height="20" isPrintWhenDetailOverflows="true" uuid="ebc048fd-2106-47f2-88f5-ff3710ec047e"/>
|
||||
<textElement verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{desccategoria}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="241" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="5e343619-3254-4481-a3d3-00a33e144145"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="321" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="43d5475f-18ce-4427-b971-8f374a01e9b1"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="401" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="e47fb86e-b5b3-4f8f-9200-3fc950e6631d"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="481" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="3f5483a5-9c57-4510-b040-24b0267396d8"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="721" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="3348c997-2b2d-401f-a5d6-2a9e1e7abd51"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="641" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="d81fe2cf-b81c-4f65-939c-6c7d54559360"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{desconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="561" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="010f06dc-7915-4d18-ace5-b0262e54c9e3"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="d00cf6c5-52f9-47b2-bd01-4f46ddd8bd11"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="240" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63d8ba46-8dd5-446b-9358-17fafe3f2637"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="320" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a91fb857-041e-4bd6-8bd2-43ada54add97"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="400" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ceaa0870-2736-4794-abb5-53add3d11c5d"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="bbc1b544-2ed6-4c95-ab0f-63697c6430cd"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="560" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="eb4f1c10-935f-456d-8cb4-15c565db2464"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="928b086b-43cd-4ddc-b653-ecc0c22dfe69"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="720" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="59bd1af6-ea28-464d-b287-4fd0dee3ddcf"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="cbbf8c84-fad3-4653-8aaa-6c9ad47872ab"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="bc3a32cd-6bbd-464e-8a5a-6a742dff6cfc"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="b561162c-d45a-48a9-b374-110b84f36fa3"/>
|
||||
</line>
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="179" y="2" width="61" height="20" isPrintWhenDetailOverflows="true" uuid="1639ee09-fc74-47ae-a5dd-a8cd64e67586"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="178" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4e7e7dec-3003-4f60-a441-d67cf0337033"/>
|
||||
</line>
|
||||
</band>
|
||||
</detail>
|
||||
<columnFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band height="25" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="241" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="1e428984-8f32-401e-98cc-fb8058170b8b"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="321" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="0e5c22ef-c516-4077-bb87-4ecaac0c2527"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="401" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="45d16415-14dc-4d11-bbdf-03947bc31864"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="481" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="0cf0ae52-7f31-4e4f-b30f-2714b1e7e4ba"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="561" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="92daa21e-386c-4731-943c-0a925d98f38f"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="641" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="e83dea1b-ebc3-497d-bc18-44a13a3e103c"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vDesconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="721" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="0ce3d768-3e6d-4a7b-b3b0-706e811e2d26"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="c6e12c1d-d6b0-406e-ab03-5e73d69c3dda"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="8e1b53c2-7074-4697-802a-ac1221f00cc8"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="240" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4cbc3b36-2c22-40cc-8a80-4024e5cd1aa1"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="320" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="75adfdfa-56ba-45d6-895c-8f4d07352662"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="400" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="494ed8c6-5e48-44f8-a8d9-70b557856d6c"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63f52a6e-506e-4442-bbcc-32d2c8c73a1f"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="560" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="47e4bc34-618c-4169-942d-422b2d00315f"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c2a082b0-b006-430b-8768-22339b2a6d71"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="720" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="7daf4d6b-c33d-4fe4-8ffa-9f11e56957c6"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2f2a4651-90e2-4dc1-85a8-d67bf44dd03d"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="829fa1e8-3b8d-4349-b28e-085e73efcbbc"/>
|
||||
</line>
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement x="179" y="2" width="61" height="20" isPrintWhenDetailOverflows="true" uuid="93f900d4-8edc-4922-9be8-07aa9c0cb054"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vQtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="178" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2957e77c-3f57-4467-bcc1-cffa89d5b3a7"/>
|
||||
</line>
|
||||
</band>
|
||||
</pageFooter>
|
||||
<summary>
|
||||
<band splitType="Stretch"/>
|
||||
</summary>
|
||||
</jasperReport>
|
|
@ -41,6 +41,7 @@ public class RelatorioVendasPacotesBoletosBean {
|
|||
|
||||
private String nomconvenio;
|
||||
private String desctipotarifa;
|
||||
private String desccategoria;
|
||||
private Long qtde;
|
||||
private BigDecimal simportetaxaembarque;
|
||||
private BigDecimal simportepedagio;
|
||||
|
@ -172,6 +173,14 @@ public class RelatorioVendasPacotesBoletosBean {
|
|||
this.spreciobase = spreciobase;
|
||||
}
|
||||
|
||||
public String getDesccategoria() {
|
||||
return desccategoria;
|
||||
}
|
||||
|
||||
public void setDesccategoria(String desccategoria) {
|
||||
this.desccategoria = desccategoria;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
@ -21,11 +22,13 @@ import org.zkoss.zk.ui.event.Event;
|
|||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.ComboitemRenderer;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoTarifaPacote;
|
||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasBoletos;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasPacotesBoletos;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
|
@ -57,6 +60,8 @@ public class RelatorioVendasPacotesBoletosController extends MyGenericForwardCom
|
|||
private Datebox dataFinal;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
private MyComboboxEstandar cmbTipoTarifaPacote;
|
||||
private Radio rVendaPacotesBoletos;
|
||||
private Radio rVendaBoletos;
|
||||
|
||||
private MyComboboxParada cmbParadaOrigem;
|
||||
private MyComboboxParadaCve cmbParadaOrigemCve;
|
||||
|
@ -166,13 +171,13 @@ public class RelatorioVendasPacotesBoletosController extends MyGenericForwardCom
|
|||
parametros.put("tipoTarifaPacote", tipoTarifaPacote.getDesctipotarifa());
|
||||
}
|
||||
|
||||
JasperReport subRelatorioVendasPacotesBoletosItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasPacotesBoletosItens);
|
||||
Relatorio relatorio = null;
|
||||
|
||||
JasperReport subRelatorioVendasPacotesBoletosItensTotais = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItemTotais.jasper"));
|
||||
parametros.put("subreporteTotais", subRelatorioVendasPacotesBoletosItensTotais);
|
||||
|
||||
Relatorio relatorio = new RelatorioVendasPacotesBoletos(parametros, dataSourceRead.getConnection(), "RelatorioVendasPacotesBoletosItem", "RelatorioVendasPacotesBoletosItemTotais");
|
||||
if(rVendaPacotesBoletos.isSelected()) {
|
||||
relatorio = gerarRelatorioVendaPacotesBoletos(parametros);
|
||||
} else if(rVendaBoletos.isSelected()) {
|
||||
relatorio = gerarRelatorioVendaBoletos(parametros);
|
||||
}
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
@ -181,6 +186,23 @@ public class RelatorioVendasPacotesBoletosController extends MyGenericForwardCom
|
|||
Labels.getLabel("relatorioVendasPacotesBoletosController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
private Relatorio gerarRelatorioVendaPacotesBoletos(Map<String, Object> parametros) throws SQLException, Exception {
|
||||
JasperReport subRelatorioVendasPacotesBoletosItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasPacotesBoletosItens);
|
||||
|
||||
JasperReport subRelatorioVendasPacotesBoletosItensTotais = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItemTotais.jasper"));
|
||||
parametros.put("subreporteTotais", subRelatorioVendasPacotesBoletosItensTotais);
|
||||
|
||||
return new RelatorioVendasPacotesBoletos(parametros, dataSourceRead.getConnection(), "RelatorioVendasPacotesBoletosItem", "RelatorioVendasPacotesBoletosItemTotais");
|
||||
}
|
||||
|
||||
private Relatorio gerarRelatorioVendaBoletos(Map<String, Object> parametros) throws SQLException, Exception {
|
||||
JasperReport subRelatorioVendasBoletosItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasBoletosItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasBoletosItens);
|
||||
|
||||
return new RelatorioVendasBoletos(parametros, dataSourceRead.getConnection(), "RelatorioVendasBoletosItem");
|
||||
}
|
||||
|
||||
public void onSelect$cmbParadaOrigemCve(Event ev) {
|
||||
if (cmbParadaOrigemCve.getSelectedItem() != null) {
|
||||
cmbParadaOrigem.setComboItemByParada((Parada) cmbParadaOrigemCve.getSelectedItem().getValue());
|
||||
|
|
|
@ -5549,6 +5549,9 @@ relatorioVendasPacotesBoletosController.lblPacote.value = Pacote
|
|||
relatorioVendasPacotesBoletosController.lblOrigem.value = Origem
|
||||
relatorioVendasPacotesBoletosController.lblDestino.value = Destino
|
||||
relatorioVendasPacotesBoletosController.lblUsuario.value = Usuário
|
||||
relatorioVendasPacotesBoletosController.lbTipoRelatorio.value = Tipo Relatório
|
||||
relatorioVendasPacotesBoletosController.lbVendaPacotesBoletos.value = Vendas de Boletos no Pacote
|
||||
relatorioVendasPacotesBoletosController.lbVendaBoletos.value = Vendas de Boletos Avulsos
|
||||
|
||||
# Relatorio Venda Pacote Voucher
|
||||
RelatorioVendaPacoteVoucher.window.title = Voucher Venda Pacote
|
||||
|
|
|
@ -5691,6 +5691,10 @@ relatorioVendasPacotesBoletosController.lblPacote.value = Pacote
|
|||
relatorioVendasPacotesBoletosController.lblOrigem.value = Origem
|
||||
relatorioVendasPacotesBoletosController.lblDestino.value = Destino
|
||||
relatorioVendasPacotesBoletosController.lblUsuario.value = Usuário
|
||||
relatorioVendasPacotesBoletosController.lblUsuario.value = Usuário
|
||||
relatorioVendasPacotesBoletosController.lbTipoRelatorio.value = Tipo Relatório
|
||||
relatorioVendasPacotesBoletosController.lbVendaPacotesBoletos.value = Vendas de Boletos no Pacote
|
||||
relatorioVendasPacotesBoletosController.lbVendaBoletos.value = Vendas de Boletos Avulsos
|
||||
|
||||
# Relatorio Venda Pacote Voucher
|
||||
RelatorioVendaPacoteVoucher.window.title = Voucher Venda Pacote
|
||||
|
|
|
@ -79,6 +79,18 @@
|
|||
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
</row>
|
||||
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasPacotesBoletosController.lbTipoRelatorio.value')}" />
|
||||
<radiogroup id="rgRadioTipoRelatorio">
|
||||
<radio id="rVendaPacotesBoletos"
|
||||
label="${c:l('relatorioVendasPacotesBoletosController.lbVendaPacotesBoletos.value')}"
|
||||
selected="true"/>
|
||||
<radio id="rVendaBoletos"
|
||||
label="${c:l('relatorioVendasPacotesBoletosController.lbVendaBoletos.value')}"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue