Merge pull request 'fixes bug #AL-4121' (!571) from AL-4121 into master

Reviewed-on: adm/VentaBoletosAdm#571
Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>
master 1.97.0
fabio 2024-07-01 17:25:24 +00:00
commit 0a05fc2848
16 changed files with 5435 additions and 3746 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.96.0</version>
<version>1.97.0</version>
<packaging>war</packaging>
<properties>

View File

@ -0,0 +1,218 @@
package com.rjconsultores.ventaboletos.relatorios.impl;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasRequisicaoBean;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioVendasRequisicaoDetalhado extends Relatorio {
private static Logger log = LogManager.getLogger(RelatorioVendasRequisicaoDetalhado.class);
private List<RelatorioVendasRequisicaoBean> lsDadosRelatorio;
private String fecInicio;
private String fecFinal;
private Integer empresaId;
private Integer puntoventaId;
private Integer secretariaId;
private boolean agruparCliente;
public RelatorioVendasRequisicaoDetalhado(Map<String, Object> parametros, Connection conexao, boolean agruparCliente) throws Exception {
super(parametros, conexao);
this.agruparCliente = agruparCliente;
this.setCustomDataSource(new DataSource(this) {
@Override
public void initDados() throws Exception {
Map<String, Object> parametros = this.relatorio.getParametros();
fecInicio = parametros.get("dataFiltroInicial").toString();
fecFinal = parametros.get("dataFiltroFinal").toString();
if(parametros.get("EMPRESA_ID")!=null){
empresaId = Integer.valueOf(parametros.get("EMPRESA_ID").toString());
}
if(parametros.get("PUNTOVENTA_ID")!=null){
puntoventaId = Integer.valueOf(parametros.get("PUNTOVENTA_ID").toString());
}
if(parametros.get("SECRETARIA_ID")!=null){
secretariaId = Integer.valueOf(parametros.get("SECRETARIA_ID").toString());
}
Connection conexao = this.relatorio.getConexao();
processarVendasRequisicao(conexao);
setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
}
});
}
private void processarVendasRequisicao(Connection conexao) {
ResultSet rset = null;
NamedParameterStatement stmt = null;
try {
stmt = carregarNamedParameterStatement(conexao);
rset = stmt.executeQuery();
processarResultado(rset);
fecharConexaoBanco(conexao, stmt, rset);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
private void fecharConexaoBanco(Connection conexao, NamedParameterStatement stmt, ResultSet rset) {
try {
if(rset != null && !rset.isClosed()) {
rset.close();
}
if(stmt != null && !stmt.isClosed()) {
stmt.close();
}
if(conexao != null && !conexao.isClosed()) {
conexao.close();
}
} catch (SQLException e) {
log.error(e.getMessage(), e);
}
}
private void processarResultado(ResultSet rset) throws SQLException {
if(lsDadosRelatorio == null) {
lsDadosRelatorio = new ArrayList<RelatorioVendasRequisicaoBean>();
}
while (rset.next()) {
RelatorioVendasRequisicaoBean bean = new RelatorioVendasRequisicaoBean();
bean.setNumdocumento(rset.getString("REQUISICAO"));
bean.setSecretariaId(rset.getInt("SECRETARIA_ID"));
bean.setDescsecretaria(rset.getString("DESCSECRETARIA"));
bean.setPuntoventaId(rset.getInt("PUNTOVENTA_ID"));
bean.setBpe(rset.getInt("BPE"));
bean.setPassageiro(rset.getString("nombpasajero"));
bean.setDataVenda(rset.getDate("FECHORVENTA"));
bean.setNombpuntoventa(rset.getString("NOMBPUNTOVENTA"));
bean.setNombempresa(rset.getString("NOMBEMPRESA"));
bean.setEmpresaId(rset.getInt("EMPRESA_ID"));
bean.setOrigemId(rset.getString("ORIGEM_ID"));
bean.setOrigem(rset.getString("ORIGEM"));
bean.setDestinoId(rset.getString("DESTINO_ID"));
bean.setDestino(rset.getString("DESTINO"));
bean.setImporte(rset.getBigDecimal("IMPORTE"));
if (agruparCliente) {
bean.setDescricaogrupo(bean.getSecretariaId() + "- " + bean.getDescsecretaria());
} else {
bean.setDescricaogrupo(bean.getNombpuntoventa());
}
lsDadosRelatorio.add(bean);
}
}
private NamedParameterStatement carregarNamedParameterStatement(Connection conexao) throws SQLException {
String sql = getSql();
log.info(sql);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
if(fecInicio != null) {
stmt.setString("fecInicio", fecInicio);
}
if(fecFinal != null) {
stmt.setString("fecFinal", fecFinal);
}
if(empresaId != null) {
stmt.setInt("EMPRESA_ID", empresaId);
}
if(puntoventaId != null && puntoventaId > -1) {
stmt.setInt("PUNTOVENTA_ID", puntoventaId);
}
if(secretariaId != null && secretariaId > -1) {
stmt.setInt("SECRETARIA_ID", secretariaId);
}
return stmt;
}
protected String getSql() {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT CDP.NUMDOCUMENTO AS REQUISICAO, SEC.CVESECRETARIA AS SECRETARIA_ID, SEC.DESCSECRETARIA, ORI.CVEPARADA AS ORIGEM_ID, ORI.DESCPARADA AS ORIGEM, DES.CVEPARADA AS DESTINO_ID, DES.DESCPARADA AS DESTINO, PV.PUNTOVENTA_ID AS PUNTOVENTA_ID, PV.NOMBPUNTOVENTA, E.NOMBEMPRESA, E.EMPRESA_ID, FP.DESCPAGO AS DESCPAGO, CFP.FORMAPAGO_ID, bpe.nbp as BPE, c.nombpasajero, C.FECHORVENTA, ")
.append(" CASE WHEN C.MOTIVOCANCELACION_ID IS NULL THEN COUNT(*) ELSE COUNT(*) * -1 end AS qtde, ")
.append(" SUM( CASE WHEN C.MOTIVOCANCELACION_ID IS NULL THEN cfp.importe ELSE cfp.importe * -1 end) AS importe ")
.append("FROM CAJA C ")
.append("JOIN PARADA ORI ON ORI.PARADA_ID = C.ORIGEN_ID ")
.append("JOIN PARADA DES ON DES.PARADA_ID = C.DESTINO_ID ")
.append("JOIN CAJA_FORMAPAGO CFP ON CFP.CAJA_ID = C.CAJA_ID AND CFP.ACTIVO = 1 ")
.append("LEFT JOIN CAJA_DET_PAGO CDP ON CDP.CAJAFORMAPAGO_ID = CFP.CAJAFORMAPAGO_ID AND CDP.ACTIVO = 1 ")
.append("JOIN SECRETARIA SEC ON CDP.OPCIONAL1 = SEC.SECRETARIA_ID ")
.append("JOIN FORMA_PAGO FP ON FP.FORMAPAGO_ID = CFP.FORMAPAGO_ID ")
.append("JOIN MARCA M ON C.MARCA_ID = M.MARCA_ID ")
.append("JOIN EMPRESA E ON E.EMPRESA_ID = M.EMPRESA_ID ")
.append("JOIN PUNTO_VENTA PV ON PV.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
.append("LEFT JOIN BPE bpe on ( c.transacao_id = bpe.boleto_id ) ")
.append("WHERE (FP.FORMAPAGO_ID = 11 OR FP.TIPO_PAGO = 6) ")
.append("AND C.ACTIVO = 1 ")
.append("AND C.INDREIMPRESION = 0 ");
if(fecInicio != null) {
sQuery.append("AND NVL(C.FECHORVENTA_H,C.FECHORVENTA) >= TO_DATE(:fecInicio, 'dd/mm/yyyy hh24:mi') ");
}
if(fecFinal != null) {
sQuery.append("AND NVL(C.FECHORVENTA_H,C.FECHORVENTA) <= TO_DATE(:fecFinal, 'dd/mm/yyyy hh24:mi') ");
}
if(empresaId != null) {
sQuery.append("AND E.EMPRESA_ID = :EMPRESA_ID ");
}
if(puntoventaId != null && puntoventaId > -1) {
sQuery.append("AND C.PUNTOVENTA_ID = :PUNTOVENTA_ID ");
}
if(secretariaId != null && secretariaId > -1) {
sQuery.append("AND SEC.SECRETARIA_ID = :SECRETARIA_ID ");
}
sQuery.append("GROUP BY CDP.NUMDOCUMENTO, SEC.CVESECRETARIA, SEC.DESCSECRETARIA,PV.NOMBPUNTOVENTA, PV.NOMBPUNTOVENTA, E.NOMBEMPRESA, E.EMPRESA_ID, FP.DESCPAGO, CFP.FORMAPAGO_ID, ORI.DESCPARADA, DES.DESCPARADA, CFP.IMPORTE, ORI.CVEPARADA, DES.CVEPARADA, PV.PUNTOVENTA_ID, C.MOTIVOCANCELACION_ID, bpe.NBP, c.nombpasajero, C.FECHORVENTA ");
if (agruparCliente) {
sQuery.append("ORDER BY SEC.DESCSECRETARIA, PV.NOMBPUNTOVENTA, FP.DESCPAGO");
} else {
sQuery.append("ORDER BY PV.NOMBPUNTOVENTA, SEC.DESCSECRETARIA, ori.cveparada, des.cveparada ");
}
return sQuery.toString();
}
@Override
protected void processaParametros() throws Exception {
}
public List<RelatorioVendasRequisicaoBean> getLsDadosRelatorio() {
return lsDadosRelatorio;
}
@Override
public String getNome() {
return super.getNome();
}
}

View File

@ -0,0 +1,28 @@
#geral
msg.noData=It was not possible to obtain data with the provided parameters.
#Labels cabeçalho
cabecalho.nome=Request Sales Report
cabecalho.relatorio=Report:
cabecalho.periodo=Period:
cabecalho.periodoA=to
cabecalho.dataHora=Date/Time:
cabecalho.impressorPor=Printed by:
cabecalho.pagina=Page
cabecalho.de=of
cabecalho.filtros=Filters:
cabecalho.usuario=User:
label.date=Date
label.COD = COD
label.empresa = Company
label.REQ = REQ. No
label.origem = Origin
label.destino = Destination
label.bpe = BPe
label.nome = Passenger Name
label.nombPuntoVenta=Agency
label.total=Total
label.puntoVenta=Agency:
label.diferenca=Difference
label.cliente=Client
label.total=Total

View File

@ -0,0 +1,28 @@
#geral
msg.noData=No fue posible obtener datos con los parámetros informados.
#Labels cabeçalho
cabecalho.nome=Informe de Ventas de Requisición
cabecalho.relatorio=Informe:
cabecalho.periodo=Período:
cabecalho.periodoA=a
cabecalho.dataHora=Fecha/Hora:
cabecalho.impressorPor=Impreso por:
cabecalho.pagina=Página
cabecalho.de=de
cabecalho.filtros=Filtros:
cabecalho.usuario=Usuario:
label.data=Fecha
label.COD = COD
label.empresa = Empresa
label.REQ = REQ. N
label.origem = Origen
label.destino = Destino
label.bpe = BPe
label.nome = Nombre del Pasajero
label.nombPuntoVenta=Agencia
label.total=Total
label.puntoVenta=Agencia:
label.diferenca=Diferencia
label.cliente=Cliente
label.total=Total

View File

@ -0,0 +1,28 @@
#geral
msg.noData=Impossible d'obtenir des données avec les paramètres informés.
#Labels cabeçalho
cabecalho.nome=Rapport de Ventes de Requête
cabecalho.relatorio=Rapport:
cabecalho.periodo=Période:
cabecalho.periodoA=à
cabecalho.dataHora=Date/Heure:
cabecalho.impressorPor=Imprimé par:
cabecalho.pagina=Page
cabecalho.de=de
cabecalho.filtros=Filtres:
cabecalho.usuario=Utilisateur:
label.data=Date
label.COD = COD
label.empresa = Entreprise
label.REQ = REQ. N
label.origem = Origine
label.destino = Destination
label.bpe = BPe
label.nome = Nom du Passager
label.nombPuntoVenta=Agence
label.total=Total
label.puntoVenta=Agence:
label.diferenca=Différence
label.cliente=Client
label.total=Total

View File

@ -0,0 +1,28 @@
#geral
msg.noData=Não foi possivel obter dados com os parâmetros informados.
#Labels cabeçalho
cabecalho.nome=Relatório Vendas Requisição
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.usuario=Usuário:
label.data=Data
label.COD = COD
label.empresa = Empresa
label.REQ = REQ. N
label.origem = Origen
label.destino = Destino
label.bpe = BPe
label.nome = Nome Passageiro
label.nombPuntoVenta=Agência
label.total=Total
label.puntoVenta=Agência:
label.diferenca=Diferença
label.cliente=Cliente
label.total=Total

View File

@ -0,0 +1,384 @@
<?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="Relatorio Vendas Internet x PTA" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="6d46a2d2-555e-4b7f-944f-b25c672e5feb">
<property name="ireport.zoom" value="2.415765000000001"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="DATA_INICIAL" class="java.util.Date"/>
<parameter name="DATA_FINAL" class="java.util.Date"/>
<parameter name="codconvenio" class="java.lang.String"/>
<parameter name="usuario" class="java.lang.String"/>
<parameter name="nomeRelatorio" class="java.lang.String"/>
<parameter name="puntoVenta" class="java.lang.String"/>
<parameter name="SALDO" class="java.math.BigDecimal"/>
<parameter name="TOTAL" class="java.math.BigDecimal"/>
<field name="nomeAgenciaVenda" class="java.lang.String"/>
<field name="dataEmissao" class="java.util.Date"/>
<field name="dataEmbarque" class="java.util.Date"/>
<field name="bilhete" class="java.lang.String"/>
<field name="status" class="java.lang.String"/>
<field name="descricaoLinha" class="java.lang.String"/>
<field name="situacaoVendido" class="java.lang.String"/>
<field name="servico" class="java.math.BigDecimal"/>
<field name="codOrigem" class="java.lang.String"/>
<field name="codDestino" class="java.lang.String"/>
<field name="descricaoOrigem" class="java.lang.String"/>
<field name="descricaoDestino" class="java.lang.String"/>
<field name="agencia" class="java.lang.String"/>
<field name="dataVenda" class="java.util.Date"/>
<field name="preco" class="java.math.BigDecimal"/>
<field name="taxas" class="java.math.BigDecimal"/>
<field name="poltrona" class="java.lang.String"/>
<field name="situacaoCancelado" class="java.lang.String"/>
<field name="tipoVenta" class="java.lang.String"/>
<group name="tipoVenda">
<groupExpression><![CDATA[$F{tipoVenta}]]></groupExpression>
<groupHeader>
<band height="22">
<textField>
<reportElement x="91" y="0" width="100" height="20" uuid="d55eb515-81e8-4979-ae58-d4f403d3065a"/>
<textFieldExpression><![CDATA[$F{tipoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="91" height="20" uuid="0bff5b18-dc4a-4cb5-a455-6cfd7dd67b58"/>
<textElement>
<font size="10" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.tipoVenda}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<group name="status">
<groupExpression><![CDATA[$F{status}]]></groupExpression>
<groupHeader>
<band height="21">
<textField>
<reportElement x="0" y="4" width="91" height="14" backcolor="#FFFFFF" uuid="8c56f8a7-343c-490a-8bef-5194f3b8529d"/>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ? "Agência Emissão" : "Agência de Venda"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="91" y="4" width="51" height="14" uuid="f0502e25-1354-4ee8-be80-c3c428600f7f"/>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ? "Data Emissão" : "Data Vendido"]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="142" y="4" width="70" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="49ab1647-150e-479d-a1d6-1911439f9372"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataEmbarque}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="212" y="4" width="35" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="97e52452-5067-44dc-a412-0069d4966588"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="247" y="4" width="30" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="36adfbd2-baef-4050-b4dd-b2c17cec1f8f"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.preco}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="277" y="4" width="29" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="dabaae73-0430-44ac-b5ca-07bb8943d1e1"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.taxas}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="456" y="4" width="138" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="73bb690b-0169-4a4b-8fb9-c97b9887eaad"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.descricaoLinha}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="306" y="4" width="81" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="38b8051e-f5af-4f54-bf70-e2fe0b7f7c9a"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="387" y="4" width="69" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="f8b5db04-6c39-4f45-8bdb-e5a9a68c68a3"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="594" y="4" width="32" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="fb34668d-337b-4c49-9bf6-d91c2d48c9ad"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.servico}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="626" y="4" width="40" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="638d03a2-19a6-475b-8ac8-8674de628135"/>
<textElement verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.poltrona}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="666" y="4" width="27" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="44acc215-9dff-458d-a38d-d3146fbede9e"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.situacao}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="693" y="4" width="109" height="14" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="f6156f2d-7579-468f-a4ec-3e09317df7eb"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ? "Agência Atendimento" : "Agência Cancelamento"]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="19" width="802" height="1" uuid="2171ca6f-7e60-4fb0-80b5-32ba5c32ae0f"/>
</line>
<line>
<reportElement x="0" y="3" width="802" height="1" uuid="a8b2d3d9-4d61-42fb-aa14-37d82a755f3c"/>
</line>
</band>
</groupHeader>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="32">
<textField>
<reportElement x="191" y="5" width="382" height="27" uuid="766b74e4-28c9-4045-8538-343a8bc8e665"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="18" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="51">
<textField>
<reportElement x="191" y="27" width="56" height="22" uuid="c52ee81b-b6a0-44cd-b0e0-c61177419f22"/>
<textElement>
<font size="10" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataFinal}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="27" width="91" height="22" uuid="1ffb28ce-353b-45c6-95a3-ba5c40faa4b5"/>
<textElement>
<font size="10" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataInicial}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement x="247" y="27" width="140" height="22" isPrintWhenDetailOverflows="true" uuid="74a3108b-f2bf-4a05-8a0e-ef3bc6e23e78"/>
<textElement>
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement x="91" y="27" width="100" height="22" isPrintWhenDetailOverflows="true" uuid="145289a7-0f0a-4aa0-aab7-2bad8b44292e"/>
<textElement>
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement mode="Transparent" x="191" y="4" width="403" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="8857ff4c-243b-4073-9466-98722a23eccf"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.pagina} + " " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="594" y="4" width="99" height="15" uuid="d095c344-00e0-4532-8035-8b93ef192a56"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement mode="Transparent" x="693" y="4" width="109" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="b8a08223-0a24-43a7-8ebe-17a3db2d83fe"/>
<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band/>
</columnHeader>
<detail>
<band height="14">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="456" y="2" width="138" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="0b904fc9-5da8-42df-86e7-0749839574b6"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{descricaoLinha}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0" isBlankWhenNull="true">
<reportElement x="594" y="2" width="32" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="a2f90f64-e8eb-45b8-828b-53c01e7258a0"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="666" y="2" width="27" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="584271a9-2bf3-4c50-a4cf-6615c17bf989"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ?$F{situacaoVendido} : $F{situacaoCancelado}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement x="91" y="2" width="51" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="546f445d-2263-4cdc-a1d7-681d40f311e4"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ? $F{dataEmissao} : $F{dataVenda}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement x="142" y="2" width="70" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="eba09120-e3ae-4119-af20-8ff20c45d935"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataEmbarque}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="212" y="2" width="35" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="374795a6-5fae-417c-93d9-ae0c9e12829a"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="693" y="2" width="109" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="8bf03127-bc20-45ab-94cd-deeafa4b83c1"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ?$F{nomeAgenciaVenda} : $F{agencia}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="247" y="2" width="30" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="59a943b3-dc5a-49cf-92f9-1a271ba72a0e"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{preco}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="277" y="2" width="29" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="4a3859e1-2fcf-4ce3-89ca-024ab4628dcf"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{taxas}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="306" y="2" width="81" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="aac72eec-aa72-45bc-91ad-409dd211e6e3"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{descricaoOrigem}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="387" y="2" width="69" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="4dee0341-1423-40ac-b025-6e162c8c3853"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{descricaoDestino}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="626" y="2" width="40" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="3b5b4e26-d826-4983-bd0b-d81762314d05"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{poltrona}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="2" width="91" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="ad1ffaa8-6c48-4316-ba3c-ea68579af300"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}.equals("VENDIDO") ? $F{agencia} : $F{nomeAgenciaVenda}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="6" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="43" splitType="Stretch">
<textField>
<reportElement x="0" y="11" width="91" height="14" uuid="25ee1dfc-86be-4ed3-a15b-1b88311553d3"/>
<textElement textAlignment="Center">
<font size="10" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="25" width="91" height="14" uuid="77ae1865-5196-4f91-ab72-716ce1d52a74"/>
<textElement textAlignment="Center">
<font size="10" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.saldo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="91" y="25" width="121" height="14" uuid="36e218b6-49e0-4b1b-a473-ec3f2e79fde3"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$P{SALDO}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="91" y="11" width="121" height="14" uuid="f4ce69ee-521c-4f17-9b7f-d7028d2f355a"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$P{TOTAL}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="8" width="802" height="1" uuid="6dc831c6-bfb2-4350-aa40-edc3dacd8b2c"/>
</line>
<line>
<reportElement x="0" y="40" width="802" height="1" uuid="5ab0d28f-17af-469c-a9da-9aab6e0b4b50"/>
</line>
</band>
</summary>
<noData>
<band height="25">
<textField>
<reportElement x="0" y="0" width="802" height="25" uuid="8971a82a-4eed-47d8-a07a-da902b442824"/>
<textElement textAlignment="Center" markup="none">
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>
</band>
</noData>
</jasperReport>

View File

@ -0,0 +1,298 @@
<?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="RelatorioVendasRequisicao" 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.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="Crosstab Data Text" hAlign="Center"/>
<parameter name="fecInicio" class="java.lang.String"/>
<parameter name="fecFinal" class="java.lang.String"/>
<parameter name="noDataRelatorio" class="java.lang.String"/>
<parameter name="empresa" class="java.lang.String"/>
<parameter name="puntoventa" class="java.lang.String"/>
<parameter name="CABECALHO_AGRUPAMENTO_LABEL" class="java.lang.String"/>
<parameter name="CABECALHO_AGRUPAMENTO_DESCRICAO" class="java.lang.String"/>
<parameter name="AGRUPAMENTO_LABEL" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="nombpuntoventa" class="java.lang.String"/>
<field name="nombempresa" class="java.lang.String"/>
<field name="importe" class="java.math.BigDecimal"/>
<field name="origem" class="java.lang.String"/>
<field name="destino" class="java.lang.String"/>
<field name="qtde" class="java.lang.Integer"/>
<field name="origemId" class="java.lang.String"/>
<field name="destinoId" class="java.lang.String"/>
<field name="puntoventaId" class="java.lang.Integer"/>
<field name="secretariaId" class="java.lang.Integer"/>
<field name="descsecretaria" class="java.lang.String"/>
<field name="numdocumento" class="java.lang.String"/>
<field name="descricaogrupo" class="java.lang.String"/>
<field name="passageiro" class="java.lang.String"/>
<field name="bpe" class="java.lang.Integer"/>
<field name="dataVenda" class="java.util.Date"/>
<field name="empresaId" class="java.lang.String"/>
<variable name="importe_1" class="java.math.BigDecimal" resetType="Group" resetGroup="secretariagroup" calculation="Sum">
<variableExpression><![CDATA[$F{importe}]]></variableExpression>
</variable>
<variable name="qtde" class="java.lang.String"/>
<variable name="qtde_1" class="java.lang.Integer" resetType="Group" resetGroup="secretariagroup" calculation="Sum">
<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
</variable>
<variable name="qtdeTotal" class="java.lang.Integer" calculation="Sum">
<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
</variable>
<variable name="importeTotal" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{importe}]]></variableExpression>
</variable>
<group name="secretariagroup">
<groupExpression><![CDATA[$F{descricaogrupo}]]></groupExpression>
<groupHeader>
<band height="40">
<textField>
<reportElement x="0" y="0" width="802" height="20" uuid="8fc0dadc-9470-4614-9ed8-588df8f619a5"/>
<textFieldExpression><![CDATA[$P{AGRUPAMENTO_LABEL} + ": " + $F{descricaogrupo}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="756" y="20" width="45" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="3715eadc-6bf7-49c7-a602-714f3a57be01"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="555" y="20" width="201" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="3b43487c-cb60-4e23-9f82-755b50314032"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.nome}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="508" y="20" width="47" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="2b0af824-a7d5-4b9a-a1e4-9d2d23ce6a46"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bpe}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="260" y="20" width="148" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="08fee66c-ed2e-433e-84ca-c6d69ec23250"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="408" y="20" width="100" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="70f0ef7d-4348-42bf-9c37-886e3538713c"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="215" y="20" width="45" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="7277c099-663a-42a8-8e65-79b665d4e5c5"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.REQ}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="98" y="20" width="117" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="95f200a8-9054-4fd2-bf0d-28f05a04e52c"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.empresa}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="58" y="20" width="40" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="756fb163-b869-4a7d-a2da-44eab6777e21"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.COD}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="0" y="20" width="58" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="8b3a8ce9-518a-4127-8c66-ed4889e3866c"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.data}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="21">
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="702" y="1" width="100" height="20" uuid="3a5276ac-d393-4a51-b60a-28f8105643d5"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{importe_1}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="520" y="1" width="100" height="20" uuid="ab651bcd-8815-40b4-843d-3c675ae94009"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Subtotal:]]></text>
</staticText>
<line>
<reportElement x="0" y="0" width="801" height="1" uuid="6789c052-c282-4536-8dc1-5a93c4d870f5"/>
</line>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="78" 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="19" 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="53" y="38" width="748" height="20" uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a"/>
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="38" width="53" height="20" uuid="a91f6081-4740-4e36-8965-41b6cde4cc20"/>
<text><![CDATA[Empresa:]]></text>
</staticText>
<textField>
<reportElement x="0" y="57" width="790" height="20" uuid="53d53aa5-d8c9-43c6-b17d-1e6b49697237"/>
<textFieldExpression><![CDATA[$P{CABECALHO_AGRUPAMENTO_LABEL} + ": " + $P{CABECALHO_AGRUPAMENTO_DESCRICAO}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="76" width="801" height="1" uuid="3a4eed21-70b4-44c0-8d34-8c53d44de3cf"/>
</line>
</band>
</title>
<pageHeader>
<band height="21">
<textField>
<reportElement x="606" y="1" width="195" height="20" uuid="701a95fd-2c75-40c1-bb18-0e784375e289"/>
<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>
<detail>
<band height="20">
<textField>
<reportElement x="260" y="0" width="150" height="20" uuid="dcb220b3-2b02-4aa7-9e22-c458a53c7be6"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{origemId}+" - "+$F{origem}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="410" y="0" width="98" height="20" uuid="4f8b2848-6c67-468e-ae96-2a77fa2ffa1f"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{destinoId}+" - "+$F{destino}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="756" y="0" width="46" height="20" uuid="a373f36c-db6b-4e0f-8351-871d8533f8ec"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{importe}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="555" y="0" width="201" height="20" uuid="26fb8d06-0109-4496-8428-c300d86b9c74"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{passageiro}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="215" y="0" width="45" height="20" uuid="f7684292-b49a-4dd3-91be-f216173bb2ef"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{numdocumento}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="98" y="0" width="117" height="20" uuid="a80cc115-7925-45bf-9978-e208e1f38e13"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{descsecretaria}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="58" y="0" width="40" height="20" uuid="e6a0e925-e173-4e60-a9d9-f65544f41ca1"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{secretariaId}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement x="0" y="0" width="58" height="20" uuid="a65ab0ba-fb04-45c2-911f-9343d48a8644"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{dataVenda}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="508" y="0" width="47" height="20" uuid="f770c738-1370-4d7b-a460-c9a5cea36199"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{bpe}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<summary>
<band height="21">
<staticText>
<reportElement x="520" y="1" width="100" height="20" uuid="ba76f4f2-00f1-4bef-aeef-823589ad8b5b"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[TOTAL:]]></text>
</staticText>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="702" y="1" width="100" height="20" uuid="36067a9c-e8b0-4f38-808a-0469b3a38d51"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{importeTotal}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="0" width="801" height="1" uuid="add1375c-df33-44b5-a5e7-fc894b024bc2"/>
</line>
</band>
</summary>
<noData>
<band height="20">
<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>

View File

@ -1,6 +1,7 @@
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
import java.math.BigDecimal;
import java.util.Date;
public class RelatorioVendasRequisicaoBean {
@ -8,6 +9,9 @@ public class RelatorioVendasRequisicaoBean {
private Integer secretariaId;
private String descsecretaria;
private Integer puntoventaId;
private Integer bpe;
private String passageiro;
private Date dataVenda;
private String nombpuntoventa;
private String nombempresa;
private String origemId;
@ -103,4 +107,23 @@ public class RelatorioVendasRequisicaoBean {
public void setDescricaogrupo(String descricaogrupo) {
this.descricaogrupo = descricaogrupo;
}
public Integer getBpe() {
return bpe;
}
public void setBpe(Integer bpe) {
this.bpe = bpe;
}
public String getPassageiro() {
return passageiro;
}
public void setPassageiro(String passageiro) {
this.passageiro = passageiro;
}
public Date getDataVenda() {
return dataVenda;
}
public void setDataVenda(Date dataVenda) {
this.dataVenda = dataVenda;
}
}

View File

@ -15,6 +15,7 @@ import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Radio;
@ -23,6 +24,7 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.Secretaria;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasRequisicao;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasRequisicaoDetalhado;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -46,6 +48,7 @@ public class RelatorioVendasRequisicaoController extends MyGenericForwardCompose
private Datebox dataInicial;
private Datebox dataFinal;
private Boolean isDetalhado = false;
private MyComboboxPuntoVenta cmbPuntoVenta;
private MyComboboxSecretaria cmbSecretaria;
@ -64,6 +67,12 @@ public class RelatorioVendasRequisicaoController extends MyGenericForwardCompose
}
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
isDetalhado = false;
excutarRelatorios();
}
public void onClick$btnExecutarRelatorioDetalhado(Event ev) throws Exception {
isDetalhado = true;
excutarRelatorios();
}
@ -151,11 +160,17 @@ public class RelatorioVendasRequisicaoController extends MyGenericForwardCompose
}
Map<String, Object> args = new HashMap<String, Object>();
Relatorio relatorio = new RelatorioVendasRequisicao(parametros, dataSourceRead.getConnection(), radioTipoRelatorioPorCliente.isChecked());
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul",
Labels.getLabel("indexController.mniRelatorioVendasRequisicao.label"), args, MODAL);
if(isDetalhado) {
Relatorio relatorio = new RelatorioVendasRequisicaoDetalhado(parametros, dataSourceRead.getConnection(), radioTipoRelatorioPorCliente.isChecked());
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul",
Labels.getLabel("indexController.mniRelatorioVendasRequisicao.Detalhado.label"), args, MODAL);
} else {
Relatorio relatorio = new RelatorioVendasRequisicao(parametros, dataSourceRead.getConnection(), radioTipoRelatorioPorCliente.isChecked());
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul",
Labels.getLabel("indexController.mniRelatorioVendasRequisicao.label"), args, MODAL);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -7795,6 +7795,8 @@ indexController.mniRelatorioVendasPacotesResumido.label = Ventas de paquetes - R
indexController.mniRelatorioVendasParcelamento.label = Ventas con Parcelamiento
indexController.mniRelatorioVendasPercurso.label = Vendas no Percurso
indexController.mniRelatorioVendasRequisicao.label = Relatório Vendas Requisição(Ordem de Serviço)
indexController.mniRelatorioVendasRequisicao.Detalhado.label = Informe Detallado de Ventas de Requisición (Orden de Servicio)
indexController.mniRelatorioVoucher.label = Voucher
indexController.mniRelatorioVoucherCancelados.label = Voucher Cancelados
indexController.mniRelatorioW2I.label = Relatório Seguro W2I

View File

@ -7786,6 +7786,8 @@ indexController.mniRelatorioVendasPacotesResumido.label = Ventes de forfaits - R
indexController.mniRelatorioVendasParcelamento.label = Ventes à tempérament
indexController.mniRelatorioVendasPercurso.label = Ventes sur la route
indexController.mniRelatorioVendasRequisicao.label = Rapport de demande de vente (ordre de service)
indexController.mniRelatorioVendasRequisicao.Detalhado.label = Rapport de Ventes Détaillé de Requête (Ordre de Service)
indexController.mniRelatorioVoucher.label = Bon
indexController.mniRelatorioVoucherCancelados.label = Bon annulé
indexController.mniRelatorioW2I.label = Rapport sécurisé W2I

View File

@ -7789,6 +7789,7 @@ indexController.mniRelatorioVendasPacotesResumido.label = Vendas de Pacotes - Re
indexController.mniRelatorioVendasParcelamento.label = Vendas com Parcelamento
indexController.mniRelatorioVendasPercurso.label = Vendas no Percurso
indexController.mniRelatorioVendasRequisicao.label = Relatório Vendas Requisição(Ordem de Serviço)
indexController.mniRelatorioVendasRequisicao.Detalhado.label = Relatório de Vendas de Requisição Detalhado (Ordem de Serviço)
indexController.mniRelatorioVoucher.label = Voucher
indexController.mniRelatorioVoucherCancelados.label = Voucher Cancelados
indexController.mniRelatorioW2I.label = Relatório Seguro W2I

View File

@ -67,6 +67,8 @@
<toolbar>
<button id="btnExecutarRelatorio" image="/gui/img/enginer.png"
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
<button id="btnExecutarRelatorioDetalhado" image="/gui/img/find.png"
label="${c:l('relatorio.lb.btnExecutarRelatorioDetalhado')}" />
</toolbar>
</window>
</zk>