bug 6615
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@47920 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5403c9f8d8
commit
da94f4a0e7
|
@ -0,0 +1,120 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
public class RelatorioDescontos extends Relatorio {
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> dadosRelatorio = new ArrayList<HashMap<String, Object>>();
|
||||||
|
|
||||||
|
public RelatorioDescontos(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||||
|
super(parametros, conexao);
|
||||||
|
|
||||||
|
setCustomDataSource(new DataSource(this){
|
||||||
|
@Override
|
||||||
|
public void initDados() throws Exception {
|
||||||
|
Connection coneConnection = relatorio.getConexao();
|
||||||
|
Map<String, Object> parametros = relatorio.getParametros();
|
||||||
|
|
||||||
|
Integer idPuntoVenta = (Integer) parametros.get("idPuntoVenta");
|
||||||
|
Date fecVentaInicial = new Date(((java.util.Date) parametros.get("fecVentaInicial")).getTime());
|
||||||
|
Date fecVentaFinal = new Date(((java.util.Date) parametros.get("fecVentaFinal")).getTime());
|
||||||
|
String codconvenio = (String) parametros.get("codconvenio");
|
||||||
|
|
||||||
|
String query = getQuery(idPuntoVenta, codconvenio);
|
||||||
|
System.out.println(query);
|
||||||
|
|
||||||
|
NamedParameterStatement statement = new NamedParameterStatement(coneConnection, query);
|
||||||
|
statement.setDate("fecVentaInicial", fecVentaInicial);
|
||||||
|
statement.setDate("fecVentaFinal", fecVentaFinal);
|
||||||
|
if(idPuntoVenta != null) {
|
||||||
|
statement.setInt("idPuntoVenta", idPuntoVenta);
|
||||||
|
}
|
||||||
|
if(codconvenio != null && !codconvenio.isEmpty()) {
|
||||||
|
statement.setString("codconvenio", codconvenio);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResultSet resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
preencherDadosRelatorio(resultSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void preencherDadosRelatorio(ResultSet resultSet) throws SQLException {
|
||||||
|
while (resultSet.next()) {
|
||||||
|
HashMap<String, Object> singleData = new HashMap<String, Object>();
|
||||||
|
singleData.put("codConvenio", resultSet.getString("codConvenio"));
|
||||||
|
singleData.put("nomeAgencia", resultSet.getString("nomeAgencia"));
|
||||||
|
singleData.put("dataEmissao", resultSet.getDate("dataEmissao"));
|
||||||
|
singleData.put("dataViagem", resultSet.getDate("dataViagem"));
|
||||||
|
singleData.put("codServico", resultSet.getString("codServico"));
|
||||||
|
singleData.put("codOrigem", resultSet.getString("codOrigem"));
|
||||||
|
singleData.put("codDestino", resultSet.getString("codDestino"));
|
||||||
|
singleData.put("tarifaComDesconto", resultSet.getDouble("tarifaComDesconto"));
|
||||||
|
singleData.put("tut", resultSet.getDouble("tut"));
|
||||||
|
singleData.put("pedagio", resultSet.getDouble("pedagio"));
|
||||||
|
dadosRelatorio.add(singleData);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!dadosRelatorio.isEmpty()) {
|
||||||
|
setCollectionDataSource(new JRBeanCollectionDataSource(dadosRelatorio));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getQuery(Integer idPuntoVenta, String codconvenio) {
|
||||||
|
|
||||||
|
String query = " SELECT "
|
||||||
|
|
||||||
|
+ " CONV.CVECONVENIO AS codConvenio, "
|
||||||
|
+ " PUNT_V.NOMBPUNTOVENTA AS nomeAgencia, "
|
||||||
|
+ " BOL.FECHORVENTA AS dataEmissao, "
|
||||||
|
+ " BOL.FECHORVIAJE AS dataViagem, "
|
||||||
|
+ " BOL.CORRIDA_ID AS codServico, "
|
||||||
|
+ " ORIG.CVEPARADA AS codOrigem, "
|
||||||
|
+ " DEST.CVEPARADA AS codDestino, "
|
||||||
|
+ " BOL.PRECIOPAGADO AS tarifaComDesconto, "
|
||||||
|
+ " BOL.IMPORTETAXAEMBARQUE AS tut, "
|
||||||
|
+ " BOL.IMPORTEPEDAGIO AS pedagio "
|
||||||
|
|
||||||
|
+ " FROM BOLETO BOL "
|
||||||
|
+ " JOIN CONVENIO_DET CONV_D ON CONV_D.CONVENIODET_ID = BOL.CONVENIODET_ID "
|
||||||
|
+ " JOIN CONVENIO CONV ON CONV.CONVENIO_ID = CONV_D.CONVENIO_ID "
|
||||||
|
+ " JOIN PUNTO_VENTA PUNT_V ON PUNT_V.PUNTOVENTA_ID = BOL.PUNTOVENTA_ID "
|
||||||
|
+ " JOIN PARADA ORIG ON ORIG.PARADA_ID = BOL.ORIGEN_ID "
|
||||||
|
+ " JOIN PARADA DEST ON DEST.PARADA_ID = BOL.DESTINO_ID "
|
||||||
|
|
||||||
|
+ " WHERE "
|
||||||
|
+ " BOL.INDSTATUSOPERACION = 'F' "
|
||||||
|
+ " AND BOL.ACTIVO = 1 "
|
||||||
|
+ " AND BOL.FECHORVENTA BETWEEN :fecVentaInicial AND :fecVentaFinal ";
|
||||||
|
|
||||||
|
if(idPuntoVenta != null) {
|
||||||
|
query += " AND (BOL.PUNTOVENTA_ID = :idPuntoVenta) ";
|
||||||
|
}
|
||||||
|
if (codconvenio != null && !codconvenio.isEmpty()) {
|
||||||
|
query += " AND (CONV.CVECONVENIO = :codconvenio)";
|
||||||
|
}
|
||||||
|
|
||||||
|
query += " ORDER BY CONV.CVECONVENIO ";
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
label.codConvenio = Código do Convênio:
|
||||||
|
label.fecVentaInicial = Data da Venda Inicial:
|
||||||
|
label.fecVentaFinal = Data da Venda Final:
|
||||||
|
label.puntoVenta = Agência:
|
||||||
|
cabecalho.dataHora = Data/Hora:
|
||||||
|
cabecalho.impressorPor = Impresso por:
|
||||||
|
cabecalho.pagina = Página
|
||||||
|
cabecalho.de = de
|
||||||
|
label.codigo = Código:
|
||||||
|
label.nomeAgencia = Agc. Emissora
|
||||||
|
label.dataEmissao = Data Emissão
|
||||||
|
label.dataViagem = Data Viagem
|
||||||
|
label.codServico = Serviço
|
||||||
|
label.codOrigem = Origem
|
||||||
|
label.codDestino = Destino
|
||||||
|
label.tarifaComDesconto = Tarifa c/ des
|
||||||
|
label.tut = TUT
|
||||||
|
label.pedagio = Pedágio
|
||||||
|
label.totalPorConvenio = Total deste Convênio
|
||||||
|
label.totalGeral = Total Geral
|
||||||
|
label.total = Total
|
||||||
|
msg.noData = Não foi possivel obter dados com os parâmetros informados.
|
|
@ -0,0 +1,22 @@
|
||||||
|
label.codConvenio = Código do Convênio:
|
||||||
|
label.fecVentaInicial = Data da Venda Inicial:
|
||||||
|
label.fecVentaFinal = Data da Venda Final:
|
||||||
|
label.puntoVenta = Agência:
|
||||||
|
cabecalho.dataHora = Data/Hora:
|
||||||
|
cabecalho.impressorPor = Impresso por:
|
||||||
|
cabecalho.pagina = Página
|
||||||
|
cabecalho.de = de
|
||||||
|
label.codigo = Código:
|
||||||
|
label.nomeAgencia = Agc. Emissora
|
||||||
|
label.dataEmissao = Data Emissão
|
||||||
|
label.dataViagem = Data Viagem
|
||||||
|
label.codServico = Serviço
|
||||||
|
label.codOrigem = Origem
|
||||||
|
label.codDestino = Destino
|
||||||
|
label.tarifaComDesconto = Tarifa c/ des
|
||||||
|
label.tut = TUT
|
||||||
|
label.pedagio = Pedágio
|
||||||
|
label.totalPorConvenio = Total deste Convênio
|
||||||
|
label.totalGeral = Total Geral
|
||||||
|
label.total = Total
|
||||||
|
msg.noData = Não foi possivel obter dados com os parâmetros informados.
|
Binary file not shown.
|
@ -0,0 +1,494 @@
|
||||||
|
<?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="RelatorioDescontos" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="6d46a2d2-555e-4b7f-944f-b25c672e5feb">
|
||||||
|
<property name="ireport.zoom" value="1.2396694214876032"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="fecVentaInicial" class="java.util.Date"/>
|
||||||
|
<parameter name="fecVentaFinal" 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"/>
|
||||||
|
<field name="codConvenio" class="java.lang.String"/>
|
||||||
|
<field name="nomeAgencia" class="java.lang.String"/>
|
||||||
|
<field name="dataEmissao" class="java.util.Date"/>
|
||||||
|
<field name="dataViagem" class="java.util.Date"/>
|
||||||
|
<field name="codServico" class="java.lang.String"/>
|
||||||
|
<field name="codOrigem" class="java.lang.String"/>
|
||||||
|
<field name="codDestino" class="java.lang.String"/>
|
||||||
|
<field name="tarifaComDesconto" class="java.lang.Double"/>
|
||||||
|
<field name="tut" class="java.lang.Double"/>
|
||||||
|
<field name="pedagio" class="java.lang.Double"/>
|
||||||
|
<variable name="sumTarifaComDesconto" class="java.lang.Double" resetType="Group" resetGroup="ConvenioGroup" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{tarifaComDesconto}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="SumTut" class="java.lang.Double" resetType="Group" resetGroup="ConvenioGroup" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{tut}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumPedagio" class="java.lang.Double" resetType="Group" resetGroup="ConvenioGroup" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{pedagio}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumTarifaComDescontoGeral" class="java.lang.Double" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{tarifaComDesconto}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="SumTutGeral" class="java.lang.Double" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{tut}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumPedagioGeral" class="java.lang.Double" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{pedagio}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumRow" class="java.lang.Double" resetType="Group" resetGroup="ConvenioGroup" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[new Double($F{tarifaComDesconto} + $F{tut} + $F{pedagio})]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumAllRows" class="java.lang.Double" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[new Double($F{tarifaComDesconto} + $F{tut} + $F{pedagio})]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<group name="ConvenioGroup">
|
||||||
|
<groupExpression><![CDATA[$F{codConvenio}]]></groupExpression>
|
||||||
|
<groupHeader>
|
||||||
|
<band height="22">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="6def49f9-df21-45fe-86e6-ddd8c2ab117d" mode="Opaque" x="49" y="0" width="506" height="12" backcolor="#CCCCCC"/>
|
||||||
|
<box>
|
||||||
|
<topPen lineWidth="0.5"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
<rightPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{codConvenio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="5d770871-0167-4885-9215-b4a3f6881d18" mode="Opaque" x="0" y="0" width="49" height="12" backcolor="#CCCCCC"/>
|
||||||
|
<box>
|
||||||
|
<topPen lineWidth="0.5"/>
|
||||||
|
<leftPen lineWidth="0.5"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.codigo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="c614f11f-5e39-45d5-ba3b-d94dfb313fb5" x="14" y="12" width="118" height="10"/>
|
||||||
|
<box>
|
||||||
|
<topPen lineWidth="0.0"/>
|
||||||
|
<leftPen lineWidth="0.5"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement>
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.nomeAgencia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="46d51dbb-8f53-4afa-8e8a-ddba45ddd4b7" x="132" y="12" width="50" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.dataEmissao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b8b25bb5-75a0-4780-b2a1-8e02c42590bb" x="182" y="12" width="50" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.dataViagem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="3a6335ef-979e-4232-ba62-f7113e8b6c89" x="232" y="12" width="63" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.codServico}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b3792e14-b26f-47a8-8da2-f35d3fc0f4fb" x="295" y="12" width="37" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.codOrigem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="2122af46-a40b-476a-ac4c-dd9c0a5a3413" x="332" y="12" width="37" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.codDestino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ad5b6c97-a125-4e41-b08a-1c70642ae66e" x="369" y="12" width="45" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.tarifaComDesconto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="aebfcc06-37c4-4f7f-a8ed-ad8011c55658" x="414" y="12" width="45" height="10"/>
|
||||||
|
<box>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.tut}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="aa6a57f1-ea6d-4449-90d4-44a753fea7fe" x="459" y="12" width="45" height="10"/>
|
||||||
|
<box>
|
||||||
|
<topPen lineWidth="0.0"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
<rightPen lineWidth="0.0"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="85672596-8266-4500-bf8d-3f2c757c4226" x="504" y="12" width="51" height="10"/>
|
||||||
|
<box>
|
||||||
|
<topPen lineWidth="0.0"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
<rightPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band height="18">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="21939498-3964-4b50-b792-c810057ca04b" x="269" y="6" width="100" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.totalPorConvenio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="e383a185-7fe9-4b2c-ae23-65db33ee1790" x="369" y="6" width="45" height="12"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumTarifaComDesconto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="7e0997ce-bffa-431c-8d8b-7a4e2d7168c6" x="414" y="6" width="45" height="12"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SumTut}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="14a07a9d-75a5-4296-87ac-036461e44d68" x="459" y="6" width="45" height="12"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumPedagio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="05728025-9728-4057-a461-799535ef933f" x="269" y="3" width="286" height="1"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="6d37f5dd-12a3-44b8-aac7-a430eb53143c" x="504" y="6" width="51" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumRow}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupFooter>
|
||||||
|
</group>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="104" splitType="Stretch">
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="b8a08223-0a24-43a7-8ebe-17a3db2d83fe" mode="Transparent" x="482" y="46" width="73" height="24" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="d095c344-00e0-4532-8035-8b93ef192a56" x="382" y="46" width="100" height="24"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="8" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="" isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="eceda28e-b177-4d40-a99f-bce905486f71" mode="Transparent" x="0" y="17" width="555" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||||
|
<box>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
<topPen lineWidth="0.5"/>
|
||||||
|
<leftPen lineWidth="0.5"/>
|
||||||
|
<bottomPen lineWidth="0.5"/>
|
||||||
|
<rightPen lineWidth="0.5"/>
|
||||||
|
</box>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{nomeRelatorio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="17bc8d21-5221-4757-ade1-9b3d1b4c10ce" mode="Transparent" x="536" y="70" width="19" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="" isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="8857ff4c-243b-4073-9466-98722a23eccf" mode="Transparent" x="382" y="70" width="154" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.pagina} + " " + $V{PAGE_NUMBER} + " " + $R{cabecalho.de}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="65e099b5-ddc7-4f45-a453-38ab8cc4cb7c" mode="Transparent" x="382" y="82" width="173" height="12" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor} + " " + $P{usuario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="145289a7-0f0a-4aa0-aab7-2bad8b44292e" x="103" y="58" width="100" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{fecVentaInicial}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="74a3108b-f2bf-4a05-8a0e-ef3bc6e23e78" x="103" y="70" width="100" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{fecVentaFinal}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="4ea6cfd8-2183-4d3a-b7fc-51ece4715dd9" x="103" y="46" width="100" height="12" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{codconvenio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="c95a7200-7032-4a56-abca-615be605f781" x="103" y="82" width="100" height="12" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{puntoVenta}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0fb0788e-1dae-4756-8d2d-076ed62e733c" x="3" y="46" width="100" height="12">
|
||||||
|
<printWhenExpression><![CDATA[new Boolean($P{codconvenio} != null && !$P{codconvenio}.isEmpty())]]></printWhenExpression>
|
||||||
|
</reportElement>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.codConvenio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="1ffb28ce-353b-45c6-95a3-ba5c40faa4b5" x="3" y="58" width="100" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.fecVentaInicial}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="c52ee81b-b6a0-44cd-b0e0-c61177419f22" x="3" y="70" width="100" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.fecVentaFinal}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="2c80eede-1c35-4bec-8c97-3ea0ea54ed16" x="3" y="82" width="100" height="12">
|
||||||
|
<printWhenExpression><![CDATA[new Boolean($P{puntoVenta} != null)]]></printWhenExpression>
|
||||||
|
</reportElement>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="d6ec8319-dcf8-42f7-bb0f-64235db1f2da" x="0" y="98" width="555" height="1"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="10" splitType="Stretch">
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="ad1ffaa8-6c48-4316-ba3c-ea68579af300" x="14" y="0" width="118" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{nomeAgencia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="cf354725-73cd-4ec9-b10e-4aadc6c27e57" x="132" y="0" width="50" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dataEmissao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="8351ad8e-e02b-4f89-8655-091bec145801" x="182" y="0" width="50" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dataViagem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="0b904fc9-5da8-42df-86e7-0749839574b6" x="232" y="0" width="63" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{codServico}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="2dd64398-024e-4ce0-a8a8-2c93dec6182d" x="295" y="0" width="37" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{codOrigem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="b8655897-1818-4afc-be13-cf15abb85f41" x="332" y="0" width="37" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{codDestino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="a2f90f64-e8eb-45b8-828b-53c01e7258a0" x="369" y="0" width="45" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{tarifaComDesconto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="e17967ac-cb7c-4907-98f5-bb3212cec2eb" x="414" y="0" width="45" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{tut}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="584271a9-2bf3-4c50-a4cf-6615c17bf989" x="459" y="0" width="45" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="e7415c92-58d7-482c-a830-06708116c9d5" x="504" y="0" width="51" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="7"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[new Double($F{pedagio} + $F{tarifaComDesconto} + $F{tut})]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band height="26" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="bb9ab283-7cb9-445b-b741-29a6e5c931e9" x="269" y="14" width="100" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.totalGeral}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="eb4f7cb9-51dd-48ed-a924-ed5477b1f35d" x="269" y="12" width="286" height="1"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="d4dac747-8ca0-4b61-9216-ba38d252bc60" x="369" y="14" width="45" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumTarifaComDescontoGeral}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="d58a5fb0-6276-459b-9b9c-c698a36dcb0d" x="414" y="14" width="45" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SumTutGeral}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="29281cf5-8f96-4169-b413-affb15dee8c1" x="459" y="14" width="45" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumPedagioGeral}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="232a2a0f-d134-418d-8b95-c3425802c153" x="504" y="14" width="51" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumAllRows}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="25">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="8971a82a-4eed-47d8-a07a-da902b442824" x="0" y="0" width="555" height="25"/>
|
||||||
|
<textElement textAlignment="Center" markup="none">
|
||||||
|
<font size="12" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -0,0 +1,110 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zhtml.Messagebox;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDescontos;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
|
||||||
|
@Controller("relatorioDescontosController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class RelatorioDescontosController extends MyGenericForwardComposer {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSourceRead;
|
||||||
|
|
||||||
|
private MyComboboxPuntoVenta cmbAgencia;
|
||||||
|
private Datebox fecVentaInicial;
|
||||||
|
private Datebox fecVentaFinal;
|
||||||
|
private Textbox txtCodConvenio;
|
||||||
|
|
||||||
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
|
validarAntesImpressao();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validarAntesImpressao() throws Exception {
|
||||||
|
|
||||||
|
if(fecVentaInicial.getValue() == null) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("relatorioDescontosController.info.fecVentaInicial"),
|
||||||
|
Labels.getLabel("relatorioDescontosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fecVentaFinal.getValue() == null) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("relatorioDescontosController.info.fecVentaFinal"),
|
||||||
|
Labels.getLabel("relatorioDescontosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
executarRelatorio();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarRelatorio() throws Exception {
|
||||||
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
parametros.put("fecVentaInicial", fecVentaInicial.getValue());
|
||||||
|
parametros.put("fecVentaFinal", fecVentaFinal.getValue());
|
||||||
|
parametros.put("codconvenio", txtCodConvenio.getValue());
|
||||||
|
parametros.put("usuario", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString() + " - " + UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||||
|
parametros.put("nomeRelatorio", Labels.getLabel("relatorioDescontosController.window.title"));
|
||||||
|
|
||||||
|
if (cmbAgencia.getSelectedIndex() != -1) {
|
||||||
|
|
||||||
|
PuntoVenta puntoVenta = (PuntoVenta) cmbAgencia.getSelectedItem().getValue();
|
||||||
|
parametros.put("idPuntoVenta", puntoVenta.getPuntoventaId());
|
||||||
|
parametros.put("puntoVenta", puntoVenta.getPuntoventaId() + " - " + puntoVenta.getNombpuntoventa());
|
||||||
|
}
|
||||||
|
|
||||||
|
Relatorio relatorio = new RelatorioDescontos(parametros, dataSourceRead.getConnection());
|
||||||
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
|
||||||
|
openWindow("/component/reportView.zul", Labels.getLabel("relatorioDescontosController.window.title"), args, MODAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyComboboxPuntoVenta getCmbAgencia() {
|
||||||
|
return cmbAgencia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbAgencia(MyComboboxPuntoVenta cmbAgencia) {
|
||||||
|
this.cmbAgencia = cmbAgencia;
|
||||||
|
}
|
||||||
|
public Datebox getFecVentaInicial() {
|
||||||
|
return fecVentaInicial;
|
||||||
|
}
|
||||||
|
public void setFecVentaInicial(Datebox fecVentaInicial) {
|
||||||
|
this.fecVentaInicial = fecVentaInicial;
|
||||||
|
}
|
||||||
|
public Datebox getFecVentaFinal() {
|
||||||
|
return fecVentaFinal;
|
||||||
|
}
|
||||||
|
public void setFecVentaFinal(Datebox fecVentaFinal) {
|
||||||
|
this.fecVentaFinal = fecVentaFinal;
|
||||||
|
}
|
||||||
|
public Textbox getTxtCodConvenio() {
|
||||||
|
return txtCodConvenio;
|
||||||
|
}
|
||||||
|
public void setTxtCodConvenio(Textbox txtCodConvenio) {
|
||||||
|
this.txtCodConvenio = txtCodConvenio;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class ItemMenuRelatorioDescontos extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuRelatorioDescontos() {
|
||||||
|
super("indexController.mniRelatorioDescontos.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODESCONTOS";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioDescontos.zul",
|
||||||
|
Labels.getLabel("relatorioDescontosController.window.title"), getArgs() ,desktop);
|
||||||
|
}
|
||||||
|
}
|
|
@ -261,6 +261,7 @@ indexController.mniManutencaoPacote.label=Manutenção Pacote
|
||||||
indexController.mniEscola.label = Escuela
|
indexController.mniEscola.label = Escuela
|
||||||
indexController.mniCurso.label = Curso
|
indexController.mniCurso.label = Curso
|
||||||
indexController.mniPracaPedagio.label = Praça Pedágio
|
indexController.mniPracaPedagio.label = Praça Pedágio
|
||||||
|
indexController.mniRelatorioDescontos.label = Relatório Descontos
|
||||||
|
|
||||||
#PARTE REALIZADA POR MANUEL
|
#PARTE REALIZADA POR MANUEL
|
||||||
indexController.mnCortesias.label = Cortesias para empleados
|
indexController.mnCortesias.label = Cortesias para empleados
|
||||||
|
@ -5416,6 +5417,15 @@ relatorioGratuidadeController.lbLinhas.value = Ruta
|
||||||
relatorioGratuidadeController.lbDataIni.value = Fecha Inicio
|
relatorioGratuidadeController.lbDataIni.value = Fecha Inicio
|
||||||
relatorioGratuidadeController.lbDataFin.value = Fecha Final
|
relatorioGratuidadeController.lbDataFin.value = Fecha Final
|
||||||
|
|
||||||
|
# Relatório de Descontos
|
||||||
|
relatorioDescontosController.window.title = Relatório de Descontos
|
||||||
|
relatorioDescontosController.lbAgencia.value = Agência
|
||||||
|
relatorioDescontosController.lbCodConvenio.value = Código Convênio
|
||||||
|
relatorioDescontosController.lbPeriodoVendaInicial.value = Data Venda Inicial
|
||||||
|
relatorioDescontosController.lbPeriodoVendaFinal.value = Data Venda Final
|
||||||
|
relatorioDescontosController.info.fecVentaInicial = Informe a Data Venda Inicial
|
||||||
|
relatorioDescontosController.info.fecVentaFinal = Informe a Data Venda Final
|
||||||
|
|
||||||
# Filtro Relatorio de Agências Não Importadas
|
# Filtro Relatorio de Agências Não Importadas
|
||||||
filtroRelatorioAgenciasNaoImportadas.lbDataIni.value = Fecha Inicio
|
filtroRelatorioAgenciasNaoImportadas.lbDataIni.value = Fecha Inicio
|
||||||
filtroRelatorioAgenciasNaoImportadas.lbDataFin.value = Fecha Final
|
filtroRelatorioAgenciasNaoImportadas.lbDataFin.value = Fecha Final
|
||||||
|
|
|
@ -266,13 +266,13 @@ indexController.mniTotnaofiscalEmpresa.label=Totalizadoes Não-fiscais
|
||||||
indexController.mniFormapagoEmpresa.label=Formas de Pagamento
|
indexController.mniFormapagoEmpresa.label=Formas de Pagamento
|
||||||
indexController.mniRelgerencialEmpresa.label=Relatorio Gerencial
|
indexController.mniRelgerencialEmpresa.label=Relatorio Gerencial
|
||||||
indexController.mniImportacionFiscal.label=Importação Fiscal
|
indexController.mniImportacionFiscal.label=Importação Fiscal
|
||||||
|
|
||||||
indexController.mniSubMenuClientePacote.label=Pacote
|
indexController.mniSubMenuClientePacote.label=Pacote
|
||||||
indexController.mniManutencaoPacote.label=Manutenção Pacote
|
indexController.mniManutencaoPacote.label=Manutenção Pacote
|
||||||
|
|
||||||
indexController.mniEscola.label = Escola
|
indexController.mniEscola.label = Escola
|
||||||
indexController.mniCurso.label = Curso
|
indexController.mniCurso.label = Curso
|
||||||
indexController.mniPracaPedagio.label = Praça Pedágio
|
indexController.mniPracaPedagio.label = Praça Pedágio
|
||||||
|
indexController.mniRelatorioDescontos.label = Relatório Descontos
|
||||||
|
|
||||||
#PARTE REALIZADA POR MANUEL
|
#PARTE REALIZADA POR MANUEL
|
||||||
indexController.mnCortesias.label = Cortesias Para Funcionários
|
indexController.mnCortesias.label = Cortesias Para Funcionários
|
||||||
|
@ -5495,6 +5495,15 @@ relatorioGratuidadeController.lbLinhas.value = Linha
|
||||||
relatorioGratuidadeController.lbDataIni.value = Data Inicio
|
relatorioGratuidadeController.lbDataIni.value = Data Inicio
|
||||||
relatorioGratuidadeController.lbDataFin.value = Data Final
|
relatorioGratuidadeController.lbDataFin.value = Data Final
|
||||||
|
|
||||||
|
# Relatório de Descontos
|
||||||
|
relatorioDescontosController.window.title = Relatório de Descontos
|
||||||
|
relatorioDescontosController.lbAgencia.value = Agência
|
||||||
|
relatorioDescontosController.lbCodConvenio.value = Código Convênio
|
||||||
|
relatorioDescontosController.lbPeriodoVendaInicial.value = Data Venda Inicial
|
||||||
|
relatorioDescontosController.lbPeriodoVendaFinal.value = Data Venda Final
|
||||||
|
relatorioDescontosController.info.fecVentaInicial = Informe a Data Venda Inicial
|
||||||
|
relatorioDescontosController.info.fecVentaFinal = Informe a Data Venda Final
|
||||||
|
|
||||||
indexController.mniRelatorioAgenciaFechamento.label= Relatorio Agências Fechamento
|
indexController.mniRelatorioAgenciaFechamento.label= Relatorio Agências Fechamento
|
||||||
|
|
||||||
integracion.totvs=ERRO ao fazer integração com a TOTVS
|
integracion.totvs=ERRO ao fazer integração com a TOTVS
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioDescontos"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winFiltroRelatorioDescontos" apply="${relatorioDescontosController}" contentStyle="overflow:auto" height="225px" width="550px" border="normal">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="30%" />
|
||||||
|
<column width="70%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('relatorioDescontosController.lbCodConvenio.value')}" />
|
||||||
|
<textbox id="txtCodConvenio" maxlength="3" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="50%"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('relatorioDescontosController.lbPeriodoVendaInicial.value')}" />
|
||||||
|
<datebox id="fecVentaInicial" lenient="false" format="dd/MM/yyyy" constraint="no empty" width="50%"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('relatorioDescontosController.lbPeriodoVendaFinal.value')}" />
|
||||||
|
<datebox id="fecVentaFinal" lenient="false" format="dd/MM/yyyy" constraint="no empty" width="50%"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('relatorioDescontosController.lbAgencia.value')}" />
|
||||||
|
<combobox id="cmbAgencia" width="100%" maxlength="60" mold="rounded" buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnExecutarRelatorio" image="/gui/img/find.png" label="${c:l('relatorio.lb.btnExecutarRelatorio')}"/>
|
||||||
|
</toolbar>
|
||||||
|
</window>
|
||||||
|
</zk>
|
Loading…
Reference in New Issue