fixes bug#24733
dev: Wallace qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@113560 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9268112bc6
commit
4357676bc1
|
@ -0,0 +1,207 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioBoletoBean;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
public class RelatorioBoletos extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioBoletos.class);
|
||||
|
||||
private List<RelatorioBoletoBean> lsDadosRelatorio;
|
||||
|
||||
public RelatorioBoletos(Map<String, Object> parametros, Connection conexao, final String... nomeSubReporte) {
|
||||
super(parametros, conexao);
|
||||
|
||||
try {
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
|
||||
Integer puntoventaId = parametros.get("puntoventaId") != null ? Integer.parseInt(parametros.get("puntoventaId").toString()) : null;
|
||||
Integer empresaId = parametros.get("empresaId") != null ? Integer.parseInt(parametros.get("empresaId").toString()) : null;
|
||||
Boolean filtrarPendentes = parametros.get("filtrarPendentes") != null ? Boolean.parseBoolean(parametros.get("filtrarPendentes").toString()) : false;
|
||||
String fecInicio = parametros.get("fecInicio") != null ? parametros.get("fecInicio").toString() + " 00:00:00" :null;
|
||||
String fecFinal = parametros.get("fecFinal") != null ? parametros.get("fecFinal").toString() + " 23:59:59" :null;
|
||||
String baixaInicial = parametros.get("baixaInicial") != null ? parametros.get("baixaInicial").toString() + " 00:00:00" :null;
|
||||
String baixaFinal = parametros.get("baixaFinal") != null ? parametros.get("baixaFinal").toString() + " 23:59:59" :null;
|
||||
|
||||
String sql = getSQL(puntoventaId, empresaId, filtrarPendentes, fecInicio, fecFinal, baixaInicial, baixaFinal);
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||
if(fecInicio != null && fecFinal != null) {
|
||||
stmt.setTimestamp("fecInicio", DateUtil.getTimestampFromString(fecInicio, DateUtil.ddMMaaHH24mmss));
|
||||
stmt.setTimestamp("fecFinal", DateUtil.getTimestampFromString(fecFinal, DateUtil.ddMMaaHH24mmss));
|
||||
}
|
||||
|
||||
if(baixaInicial != null && baixaFinal != null) {
|
||||
stmt.setTimestamp("baixaInicial", DateUtil.getTimestampFromString(baixaInicial, DateUtil.ddMMaaHH24mmss));
|
||||
stmt.setTimestamp("baixaFinal", DateUtil.getTimestampFromString(baixaFinal, DateUtil.ddMMaaHH24mmss));
|
||||
}
|
||||
|
||||
if(puntoventaId != null) {
|
||||
stmt.setInt("puntoventaId", puntoventaId);
|
||||
}
|
||||
|
||||
if(empresaId != null) {
|
||||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
rs.setFetchSize(500);
|
||||
|
||||
lsDadosRelatorio = new ArrayList<RelatorioBoletoBean>();
|
||||
|
||||
while (rs.next()) {
|
||||
RelatorioBoletoBean boleto = new RelatorioBoletoBean();
|
||||
boleto.setNombempresa(rs.getString("nombempresa"));
|
||||
boleto.setNombpuntoventa(rs.getString("nombpuntoventa"));
|
||||
boleto.setNumpuntoventa(rs.getString("numpuntoventa"));
|
||||
boleto.setDtfechamento(rs.getDate("dtfechamento"));
|
||||
boleto.setDtvencimento(rs.getDate("dtvencimento"));
|
||||
boleto.setDtbaixa(rs.getDate("dtbaixa"));
|
||||
boleto.setVrfechamento(rs.getBigDecimal("vrfechamento"));
|
||||
boleto.setVrboleto(rs.getBigDecimal("vrboleto"));
|
||||
boleto.setVrjuros(rs.getBigDecimal("vrjuros"));
|
||||
boleto.setNossonumero(rs.getString("nossonumero"));
|
||||
boleto.setQuitado(rs.getBoolean("quitado"));
|
||||
|
||||
if(boleto.isQuitado()) {
|
||||
boleto.setVrpendente(BigDecimal.ZERO);
|
||||
}else {
|
||||
boleto.setVrpendente(boleto.getVrboleto());
|
||||
}
|
||||
/*
|
||||
if (! filtrarPendentes){
|
||||
|
||||
}
|
||||
|
||||
boolean isPontoVendaEmpresaDiferente = (puntoventaIdAux == null || !puntoventaIdAux.equals(deposito.getPuntoventaId())) ||
|
||||
(empresaIdAux == null || !empresaIdAux.equals(deposito.getEmpresaId()));
|
||||
|
||||
if(fechamentocntcorrenteId == null) {
|
||||
fechamentocntcorrenteId = rs.getLong("fechamentocntcorrenteId");
|
||||
} if(!isPontoVendaEmpresaDiferente && dtMotivo != null && DateUtil.compareOnlyDate(dtMotivo, deposito.getDtmotivo()) == 0 && !fechamentocntcorrenteId.equals(rs.getLong("fechamentocntcorrenteId"))) {
|
||||
pendente = deposito.getVrfechamento();
|
||||
totalFechamento = totalFechamento.add(deposito.getVrfechamento());
|
||||
fechamentocntcorrenteId = rs.getLong("fechamentocntcorrenteId");
|
||||
}
|
||||
|
||||
if(isPontoVendaEmpresaDiferente || (dtMotivo == null || DateUtil.compareOnlyDate(dtMotivo, deposito.getDtmotivo()) != 0)) {
|
||||
|
||||
if(isPontoVendaEmpresaDiferente) {
|
||||
puntoventaIdAux = deposito.getPuntoventaId();
|
||||
empresaIdAux = deposito.getEmpresaId();
|
||||
pendente = deposito.getVrfechamento();
|
||||
dtMotivo = deposito.getDtmotivo();
|
||||
totalFechamento = totalFechamento.add(deposito.getVrfechamento());
|
||||
fechamentocntcorrenteId = rs.getLong("fechamentocntcorrenteId");
|
||||
}
|
||||
|
||||
if(dtMotivo == null || DateUtil.compareOnlyDate(dtMotivo, deposito.getDtmotivo()) != 0) {
|
||||
pendente = deposito.getVrfechamento();
|
||||
totalFechamento = totalFechamento.add(deposito.getVrfechamento());
|
||||
fechamentocntcorrenteId = rs.getLong("fechamentocntcorrenteId");
|
||||
}
|
||||
dtMotivo = deposito.getDtmotivo();
|
||||
}
|
||||
|
||||
pendente = pendente.subtract(deposito.getVrdeposito());
|
||||
deposito.setVrpendente(pendente);
|
||||
*/
|
||||
|
||||
lsDadosRelatorio.add(boleto);
|
||||
}
|
||||
|
||||
if (lsDadosRelatorio.size() > 0) {
|
||||
setLsDadosRelatorio(lsDadosRelatorio);
|
||||
}
|
||||
|
||||
setNomeSubReporte(nomeSubReporte);
|
||||
}
|
||||
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setLsDadosRelatorio(List<RelatorioBoletoBean> lsDadosRelatorio) {
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
|
||||
this.lsDadosRelatorio = lsDadosRelatorio;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
private String getSQL(Integer puntoventaId, Integer empresaId, boolean filtrarPendentes,
|
||||
String fecInicio, String fecFinal, String baixaInicial, String baixaFinal) {
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
|
||||
sql.append(" SELECT ");
|
||||
sql.append(" e.nombempresa, ");
|
||||
sql.append(" p.nombpuntoventa, ");
|
||||
sql.append(" p.numpuntoventa, ");
|
||||
sql.append(" fcc.fecfechamento AS dtfechamento, ");
|
||||
sql.append(" fb.fecvencimento AS dtvencimento, ");
|
||||
sql.append(" fb.valordocumento AS vrboleto, ");
|
||||
sql.append(" fcc.total AS vrfechamento, ");
|
||||
sql.append(" fb.fecbaixa AS dtbaixa, ");
|
||||
sql.append(" fb.valor_juros AS vrjuros, ");
|
||||
sql.append(" NVL(fb.indboletoquitado,0) AS quitado, ");
|
||||
sql.append(" fb.nossonumero AS nossonumero ");
|
||||
sql.append(" FROM fechamento_boleto fb ");
|
||||
sql.append(" INNER JOIN fechamento_cntcorrente fcc ");
|
||||
sql.append(" ON fcc.fechamentocntcorrente_id = fb.fechamentocntcorrente_id ");
|
||||
sql.append(" AND fcc.activo = 1 ");
|
||||
sql.append(" INNER JOIN punto_venta p ");
|
||||
sql.append(" ON p.puntoventa_id = fcc.puntoventa_id ");
|
||||
sql.append(" AND p.activo = 1 ");
|
||||
sql.append(" INNER JOIN empresa e ");
|
||||
sql.append(" ON e.empresa_id = fcc.empresa_id ");
|
||||
sql.append(" AND e.activo = 1 ");
|
||||
sql.append(" WHERE fb.activo = 1 ");
|
||||
|
||||
if(fecInicio != null && fecFinal != null) {
|
||||
sql.append(" AND fcc.fecfechamento BETWEEN :fecInicio AND :fecFinal ");
|
||||
}
|
||||
|
||||
if(baixaInicial != null && baixaFinal != null) {
|
||||
sql.append(" AND fb.fecbaixa BETWEEN :baixaInicial AND :baixaFinal ");
|
||||
}
|
||||
|
||||
if(puntoventaId != null) {
|
||||
sql.append(" AND fcc.puntoventa_id = :puntoventaId ");
|
||||
}
|
||||
|
||||
if(empresaId != null) {
|
||||
sql.append(" AND e.empresa_id = :empresaId ");
|
||||
}
|
||||
|
||||
if(filtrarPendentes) {
|
||||
sql.append(" AND fb.indboletoquitado is null ");
|
||||
}
|
||||
|
||||
sql.append(" ORDER BY nombempresa, p.numpuntoventa, fcc.fecfechamento ");
|
||||
return sql.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
#geral
|
||||
msg.noData=No se pudo obtener datos con los parámetros reportados.
|
||||
|
||||
#Labels cabeçalho
|
||||
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:
|
||||
header.filtro.total=Total Geral:
|
||||
|
||||
#Labels header
|
||||
header.data.hora=Data/Hora
|
||||
header.pagina=Página
|
||||
header.banco=Banco
|
||||
header.numdeposito=Nº Depósito
|
||||
header.dataDeposito=Data
|
||||
header.valorDeposito=Valor
|
||||
header.empresa=Empresa:
|
||||
header.data=Período:
|
||||
header.agencia=Agência
|
||||
header.dtmotivo=Data Fechamento
|
||||
header.saldo=Pendente
|
||||
header.vrdeposito=Vr. Depósito
|
||||
header.vrfechamento=Vr. Fechamento
|
||||
header.usuario=Usuário
|
||||
header.numdeposito=Num. Depósito
|
||||
header.numeroAgencia=Número
|
|
@ -0,0 +1,25 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
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:
|
||||
header.filtro.total=Total Geral:
|
||||
|
||||
#Labels header
|
||||
label.empresa=Empresa:
|
||||
label.pontoVenda=Agência:
|
||||
label.dataFechamento=Dt Fecham.
|
||||
label.dataVencimento=Dt Vencim.
|
||||
label.dataBaixa=Dt Baixa
|
||||
label.pendente=Pendente
|
||||
label.valorBoleto=Boleto
|
||||
label.fechamento=Fechamento
|
||||
label.valorJuros=Juros
|
||||
label.nossoNumero=Nosso Número
|
|
@ -1,6 +1,6 @@
|
|||
<?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 BPe Substituido" pageWidth="2452" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="2452" leftMargin="0" rightMargin="0" topMargin="20" bottomMargin="20" uuid="6d46a2d2-555e-4b7f-944f-b25c672e5feb">
|
||||
<property name="ireport.zoom" value="0.39568933780028165"/>
|
||||
<property name="ireport.zoom" value="1.1289478601075875"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="usuario" class="java.lang.String"/>
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,368 @@
|
|||
<?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="RelatorioDepositos" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="65274c35-4f3f-4196-bd84-f042e9ac12ea">
|
||||
<property name="ireport.zoom" value="1.1000000000000005"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="title"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.3" value="pageHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
|
||||
<parameter name="TITULO" class="java.lang.String"/>
|
||||
<parameter name="FILTROS" class="java.lang.String"/>
|
||||
<parameter name="usuario_nome" class="java.lang.String"/>
|
||||
<queryString>
|
||||
<![CDATA[]]>
|
||||
</queryString>
|
||||
<field name="nombempresa" class="java.lang.String"/>
|
||||
<field name="nombpuntoventa" class="java.lang.String"/>
|
||||
<field name="numpuntoventa" class="java.lang.String"/>
|
||||
<field name="dtfechamento" class="java.util.Date"/>
|
||||
<field name="dtvencimento" class="java.util.Date"/>
|
||||
<field name="dtbaixa" class="java.util.Date"/>
|
||||
<field name="vrboleto" class="java.math.BigDecimal"/>
|
||||
<field name="vrfechamento" class="java.math.BigDecimal"/>
|
||||
<field name="vrjuros" class="java.math.BigDecimal"/>
|
||||
<field name="vrpendente" class="java.math.BigDecimal"/>
|
||||
<field name="nossonumero" class="java.lang.String"/>
|
||||
<variable name="TOTAL_BOLETOS" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrboleto}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_SALDO" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrboleto}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_PENDENTE" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrpendente}]]></variableExpression>
|
||||
</variable>
|
||||
<pageHeader>
|
||||
<band height="67" splitType="Stretch">
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="19f9289c-2636-4508-9384-ad62f71d3f99" mode="Transparent" x="0" y="0" width="586" height="46" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement uuid="3ff454e9-7165-4176-83bf-2a71dfb5a500" x="0" y="46" width="801" height="21"/>
|
||||
<box leftPadding="2">
|
||||
<topPen lineWidth="0.75"/>
|
||||
<bottomPen lineWidth="0.75"/>
|
||||
</box>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="12" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="79790297-7607-4ad0-ae33-8d8cf77015fa" mode="Transparent" x="775" y="15" width="26" height="16" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" 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="b0ae7466-7d4c-49a2-ae86-c0860f0de583" mode="Transparent" x="586" y="15" width="189" height="16" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" 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>
|
||||
<reportElement uuid="832bd5f9-0d7d-4545-9488-e94812dbdc21" x="586" y="0" width="133" height="15"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
|
||||
<reportElement uuid="1ed80332-28f2-40dd-81d4-ab806f843fd2" mode="Transparent" x="721" y="0" width="80" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" 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 pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="718d9d90-0c02-4323-bb9d-8b3fc1cf77d8" stretchType="RelativeToBandHeight" mode="Transparent" x="586" y="31" width="215" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{usuario_nome}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="18">
|
||||
<textField>
|
||||
<reportElement uuid="7580d1a8-f3f2-4f6f-8bf5-1ea9e7567f4d" stretchType="RelativeToTallestObject" x="0" y="0" width="232" height="17"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.pontoVenda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="a19f95cd-cc9c-493b-a1a4-0822cf0ffeb1" stretchType="RelativeToTallestObject" x="232" y="1" width="67" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.dataFechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="2438c96f-0862-490e-9f8a-dfd2c2d8c87c" stretchType="RelativeToTallestObject" x="366" y="1" width="68" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.fechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="6a734f01-5e7c-4bca-b2f4-f3365b636d7c" stretchType="RelativeToTallestObject" x="299" y="1" width="67" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.dataVencimento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="b8d1f544-1a92-48a6-855d-5a3087d0f51b" stretchType="RelativeToTallestObject" x="705" y="1" width="70" height="17"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.nossoNumero}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="32cb089b-4e48-41f9-9964-b4ff250a7ed7" stretchType="RelativeToTallestObject" x="637" y="1" width="68" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.pendente}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="6df81adc-729b-4494-97c3-08dc2806eec4" stretchType="RelativeToTallestObject" x="434" y="1" width="68" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valorBoleto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="c7445bd4-4fa4-4cdb-a934-0fc60e95d73e" stretchType="RelativeToTallestObject" x="569" y="1" width="68" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valorJuros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="b3819bf3-b974-46a7-9717-ab6c0e2feab8" stretchType="RelativeToTallestObject" x="502" y="1" width="67" height="17"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.dataBaixa}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="15" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="ee8dabd0-5f1b-4bd6-be20-483ae6074a67" stretchType="RelativeToTallestObject" x="0" y="0" width="232" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numpuntoventa} +"-"+ $F{nombpuntoventa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="ef004e86-6826-459f-99c8-72ffcbcb40ac" stretchType="RelativeToTallestObject" x="705" y="0" width="70" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{nossonumero}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="a1477a4e-9fbc-44db-ba8f-3652c49ed2ce" stretchType="RelativeToTallestObject" x="366" y="0" width="68" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{vrfechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="121453c8-d4fd-4083-b27b-6cf05dc7f266" stretchType="RelativeToTallestObject" x="502" y="0" width="67" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dtbaixa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="99f8e3cb-c2ff-44d6-b608-39a89b4ece92" stretchType="RelativeToTallestObject" x="569" y="0" width="68" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{vrjuros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="f14b427a-0f52-45a2-9421-3a6838a89ee4" stretchType="RelativeToTallestObject" x="434" y="0" width="68" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{vrboleto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="812575da-7f71-4f33-b29e-0ea9d6d06a32" stretchType="RelativeToTallestObject" x="637" y="0" width="68" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{vrpendente}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="7ec831fd-d834-4e40-b149-811f43144eb5" stretchType="RelativeToTallestObject" x="232" y="0" width="67" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dtfechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="3bc7f49d-c4ba-4027-9e52-8b3ba7e8fb23" stretchType="RelativeToTallestObject" x="299" y="0" width="67" height="15"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.0"/>
|
||||
<bottomPen lineWidth="0.0"/>
|
||||
<rightPen lineWidth="0.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8" isBold="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dtvencimento}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
<band height="72">
|
||||
<staticText>
|
||||
<reportElement uuid="b4440540-2f18-4b9e-94d1-285e376ba362" x="0" y="12" width="128" height="20" backcolor="#999999"/>
|
||||
<textElement>
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Total Boletos]]></text>
|
||||
</staticText>
|
||||
<textField pattern="#,##0.00">
|
||||
<reportElement uuid="a8212576-8b4a-4b7d-9777-a727d1a86556" x="129" y="12" width="178" height="20"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_BOLETOS}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="53594ff0-8b6d-4259-bea4-70f76933e536" x="0" y="32" width="128" height="20" backcolor="#CCCCCC"/>
|
||||
<textElement>
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Total Fechamento]]></text>
|
||||
</staticText>
|
||||
<textField pattern="#,##0.00">
|
||||
<reportElement uuid="46b3f5bb-1a6e-47da-9285-5f5a5fc759f8" x="129" y="32" width="178" height="20"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_SALDO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="d746843f-a730-4bbb-9520-80954166d840" x="0" y="52" width="128" height="20" backcolor="#CCCCCC"/>
|
||||
<textElement>
|
||||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Total Pendente]]></text>
|
||||
</staticText>
|
||||
<textField pattern="#,##0.00">
|
||||
<reportElement uuid="5c04bbea-5e2e-4fcc-a965-4e91f5d8db76" x="129" y="52" width="178" height="20"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_PENDENTE}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</summary>
|
||||
<noData>
|
||||
<band height="20">
|
||||
<textField>
|
||||
<reportElement uuid="670b2fb1-0952-49f5-8458-aa0e25fd839b" x="0" y="0" width="802" height="20"/>
|
||||
<textElement>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
|
@ -0,0 +1,140 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class RelatorioBoletoBean implements Comparable {
|
||||
|
||||
private String nombempresa;
|
||||
private String nombpuntoventa;
|
||||
private String numpuntoventa;
|
||||
private String nossonumero;
|
||||
private Date dtfechamento;
|
||||
private Date dtvencimento;
|
||||
private Date dtbaixa;
|
||||
private BigDecimal vrboleto;
|
||||
private BigDecimal vrfechamento;
|
||||
private BigDecimal vrjuros;
|
||||
private BigDecimal vrpendente;
|
||||
private boolean quitado;
|
||||
|
||||
public String getNombempresa() {
|
||||
return nombempresa;
|
||||
}
|
||||
|
||||
public void setNombempresa(String nombempresa) {
|
||||
this.nombempresa = nombempresa;
|
||||
}
|
||||
|
||||
public String getNombpuntoventa() {
|
||||
return nombpuntoventa;
|
||||
}
|
||||
|
||||
public void setNombpuntoventa(String nombpuntoventa) {
|
||||
this.nombpuntoventa = nombpuntoventa;
|
||||
}
|
||||
|
||||
public String getNumpuntoventa() {
|
||||
return numpuntoventa;
|
||||
}
|
||||
|
||||
public void setNumpuntoventa(String numpuntoventa) {
|
||||
this.numpuntoventa = numpuntoventa;
|
||||
}
|
||||
|
||||
public String getNossonumero() {
|
||||
return nossonumero;
|
||||
}
|
||||
|
||||
public void setNossonumero(String nossonumero) {
|
||||
this.nossonumero = nossonumero;
|
||||
}
|
||||
|
||||
public Date getDtfechamento() {
|
||||
return dtfechamento;
|
||||
}
|
||||
|
||||
public void setDtfechamento(Date dtfechamento) {
|
||||
this.dtfechamento = dtfechamento;
|
||||
}
|
||||
|
||||
public Date getDtvencimento() {
|
||||
return dtvencimento;
|
||||
}
|
||||
|
||||
public void setDtvencimento(Date dtvencimento) {
|
||||
this.dtvencimento = dtvencimento;
|
||||
}
|
||||
|
||||
public Date getDtbaixa() {
|
||||
return dtbaixa;
|
||||
}
|
||||
|
||||
public void setDtbaixa(Date dtbaixa) {
|
||||
this.dtbaixa = dtbaixa;
|
||||
}
|
||||
|
||||
public BigDecimal getVrboleto() {
|
||||
return vrboleto;
|
||||
}
|
||||
|
||||
public void setVrboleto(BigDecimal vrboleto) {
|
||||
this.vrboleto = vrboleto;
|
||||
}
|
||||
|
||||
public BigDecimal getVrfechamento() {
|
||||
return vrfechamento;
|
||||
}
|
||||
|
||||
public void setVrfechamento(BigDecimal vrfechamento) {
|
||||
this.vrfechamento = vrfechamento;
|
||||
}
|
||||
|
||||
public BigDecimal getVrjuros() {
|
||||
return vrjuros;
|
||||
}
|
||||
|
||||
public void setVrjuros(BigDecimal vrjuros) {
|
||||
this.vrjuros = vrjuros;
|
||||
}
|
||||
|
||||
public boolean isQuitado() {
|
||||
return quitado;
|
||||
}
|
||||
|
||||
public void setQuitado(boolean quitado) {
|
||||
this.quitado = quitado;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object o) {
|
||||
if(o == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
RelatorioBoletoBean rdb = (RelatorioBoletoBean) o;
|
||||
|
||||
if (this.nombempresa.compareTo(rdb.getNombempresa()) != 0) {
|
||||
return this.nombempresa.compareTo(rdb.getNombempresa());
|
||||
|
||||
} else if (this.nombpuntoventa.compareTo(rdb.getNombpuntoventa()) != 0) {
|
||||
return this.nombpuntoventa.compareTo(rdb.getNombpuntoventa());
|
||||
|
||||
} else if (this.dtfechamento.compareTo(rdb.getDtfechamento()) != 0) {
|
||||
return this.dtfechamento.compareTo(rdb.getDtfechamento());
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public BigDecimal getVrpendente() {
|
||||
return vrpendente;
|
||||
}
|
||||
|
||||
public void setVrpendente(BigDecimal vrpendente) {
|
||||
this.vrpendente = vrpendente;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.contacorrente;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
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.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.api.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBoletos;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
||||
@Controller("relatorioBoletosController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioBoletosController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
private Datebox datInicial;
|
||||
private Datebox datFinal;
|
||||
private Datebox baixaInicial;
|
||||
private Datebox baixaFinal;
|
||||
private Combobox cmbPuntoventa;
|
||||
private Combobox cmbEmpresa;
|
||||
private Checkbox chkFiltrarPendentes;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
chkFiltrarPendentes.setChecked(true);
|
||||
}
|
||||
|
||||
private void executarRelatorio() throws Exception {
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
StringBuilder filtro = new StringBuilder();
|
||||
|
||||
if (datInicial.getValue() == null && datFinal.getValue() == null
|
||||
&& baixaInicial.getValue() == null && baixaFinal.getValue() == null ) {
|
||||
Clients.alert(Labels.getLabel("indexController.mniRelatorioBoletos.msgDatasObrigatorias"),
|
||||
Labels.getLabel("relatorioBoletosController.window.title"), org.zkoss.zul.Messagebox.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
filtro.append("Empresa: ");
|
||||
if (cmbEmpresa.getSelectedIndex() != -1){
|
||||
Empresa empresa = ((Empresa)cmbEmpresa.getSelectedItem().getValue());
|
||||
parametros.put("empresaId", empresa.getEmpresaId());
|
||||
filtro.append(empresa.getNombempresa() + ";");
|
||||
}else {
|
||||
filtro.append(" Todas; ");
|
||||
}
|
||||
|
||||
filtro.append("Ponto de Venda: ");
|
||||
if (cmbPuntoventa.getSelectedIndex() != -1){
|
||||
PuntoVenta puntoVenta = ((PuntoVenta)cmbPuntoventa.getSelectedItem().getValue());
|
||||
parametros.put("puntoventaId", puntoVenta.getPuntoventaId());
|
||||
filtro.append(puntoVenta.getNombpuntoventa() + ";");
|
||||
}else {
|
||||
filtro.append(" Todos; ");
|
||||
}
|
||||
|
||||
if (chkFiltrarPendentes.isChecked()){
|
||||
parametros.put("filtrarPendentes", true);
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
|
||||
if (datInicial.getValue() != null && datFinal.getValue() != null) {
|
||||
int dias = DateUtil.diferencaEntreDatasEmdias(this.datInicial.getValue(), this.datFinal.getValue());
|
||||
// Período maior que 360 dias (1 ano), para não deixar um range de daods muito grande e não "travar" o relatório.
|
||||
if (dias > 360) {
|
||||
Clients.alert(Labels.getLabel("indexController.mniRelatorioBoletos.msgValidacaoDatas"),
|
||||
Labels.getLabel("relatorioBoletosController.window.title"), org.zkoss.zul.Messagebox.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
filtro.append("Fechamento: ")
|
||||
.append(DateUtil.getStringDate(datInicial.getValue(), "dd/MM/yyyy"))
|
||||
.append(" - ")
|
||||
.append(DateUtil.getStringDate(datFinal.getValue(), "dd/MM/yyyy"))
|
||||
.append(";");
|
||||
parametros.put("fecInicio", sdf.format(this.datInicial.getValue()));
|
||||
parametros.put("fecFinal", sdf.format(this.datFinal.getValue()));
|
||||
}
|
||||
|
||||
if (baixaInicial.getValue() != null && baixaFinal.getValue() != null) {
|
||||
filtro.append("Baixa: ")
|
||||
.append(DateUtil.getStringDate(baixaInicial.getValue(), "dd/MM/yyyy"))
|
||||
.append(" - ")
|
||||
.append(DateUtil.getStringDate(baixaFinal.getValue(), "dd/MM/yyyy"))
|
||||
.append(";");
|
||||
parametros.put("baixaInicial", sdf.format(this.baixaInicial.getValue()));
|
||||
parametros.put("baixaFinal", sdf.format(this.baixaFinal.getValue()));
|
||||
}
|
||||
|
||||
parametros.put("TITULO", Labels.getLabel("indexController.mniRelatorioBoletos.label"));
|
||||
parametros.put("usuario_nome", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
|
||||
Relatorio relatorio = new RelatorioBoletos(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("indexController.mniRelatorioBoletos.label"), args, MyGenericForwardComposer.MODAL);
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
executarRelatorio();
|
||||
}
|
||||
}
|
|
@ -97,8 +97,8 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
|||
jobIntegracaoSap();
|
||||
}
|
||||
|
||||
executeFlyway();
|
||||
customToDatabase();
|
||||
// executeFlyway();
|
||||
// customToDatabase();
|
||||
imageToDatabase();
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
|||
|
||||
log.info("Executando Flyway...");
|
||||
|
||||
try{
|
||||
/* try{
|
||||
final Flyway flyway = new Flyway();
|
||||
|
||||
flyway.setDataSource(getDataSoure());
|
||||
|
@ -125,7 +125,7 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
|||
}catch(Throwable t){
|
||||
log.error("Erro ao executar o flyway",t);
|
||||
}
|
||||
|
||||
*/
|
||||
log.info("Flyway executado.");
|
||||
}
|
||||
|
||||
|
@ -305,10 +305,10 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
|||
|
||||
log.info("Horario de integraçao com sap : " + hora[0] + ":" + hora[1]);
|
||||
|
||||
Trigger trigger = TriggerUtils.makeDailyTrigger("integracaoSapTrigger", hora[0], hora[1]);
|
||||
// Trigger trigger = TriggerUtils.makeDailyTrigger("integracaoSapTrigger", hora[0], hora[1]);
|
||||
|
||||
// TESTE TRIGGER
|
||||
// Trigger trigger = TriggerUtils.makeImmediateTrigger("integracaoSapTrigger", 1, 1000);
|
||||
Trigger trigger = TriggerUtils.makeImmediateTrigger("integracaoSapTrigger", 1, 1000);
|
||||
|
||||
trigger.setName("integracaoSapTrigger");
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuRelatorioBoletos extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioBoletos() {
|
||||
super("indexController.mniRelatorioBoletos.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIOBOLETOS";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioBoletos.zul",
|
||||
Labels.getLabel("indexController.mniRelatorioBoletos.label"), getArgs() ,desktop);
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ public class ItemMenuRelatorioDepositos extends DefaultItemMenuSistema {
|
|||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODEPOSITOS";
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIODEPOSITOS";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class SubMenuContaCorrente extends DefaultItemMenuSistema {
|
||||
|
||||
public SubMenuContaCorrente() {
|
||||
super("indexController.mnSubMenuContaCorrente.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE";
|
||||
}
|
||||
|
||||
}
|
|
@ -225,7 +225,9 @@ analitico.gerenciais.financeiro.conferenciaMovimento=com.rjconsultores.ventabole
|
|||
analitico.gerenciais.financeiro.eventos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioObservacaoEventosFinanceiros
|
||||
analitico.gerenciais.financeiro.observacaoBilhetes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioObservacaoBilhetes
|
||||
analitico.gerenciais.financeiro.relatorioFinanceiroReceitasDespesas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioFinanceiroReceitasDespesas
|
||||
analitico.gerenciais.financeiro.contaCorrente=com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente.SubMenuContaCorrente
|
||||
analitico.gerenciais.financeiro.relatorioDepositos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente.ItemMenuRelatorioDepositos
|
||||
analitico.gerenciais.financeiro.relatorioBoletos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente.ItemMenuRelatorioBoletos
|
||||
analitico.gerenciais.financeiro.relatorioDepositosDetalhados=com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente.ItemMenuRelatorioDepositosDetalhados
|
||||
analitico.gerenciais.financeiro.relatorioPosicaoCaixaAnalitico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente.ItemMenuRelatorioPosicaoCaixaAnalitico
|
||||
analitico.gerenciais.financeiro.relatorioFormaPagamentoAgencia=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioFormaPagamentoAgencia
|
||||
|
|
|
@ -284,6 +284,7 @@ indexController.mniRelatoriosFinanceiro.label=Financial Reports
|
|||
indexController.mniRelatoriosEstatisticos.label=Statistics Reports
|
||||
indexController.mniRelatoriosPacote.label=Package Reports
|
||||
indexController.mniIntegracion.bgm.label=BGM
|
||||
indexController.mnSubMenuContaCorrente.label = Closing Current Account
|
||||
indexController.mniRelatorioEmbarqueLocalidade.label=Boarding by Places
|
||||
indexController.mniIntegracion.cashmonitor.label=Cash Monitor
|
||||
indexController.mniIntegracion.cashmonitor.relatoriovendacartaocashmonitor=Card Sale
|
||||
|
@ -442,7 +443,8 @@ indexController.mniEscola.label=School
|
|||
indexController.mniCurso.label=Course
|
||||
indexController.mniPracaPedagio.label=Toll Plaza
|
||||
indexController.mniRelatorioDescontos.label=Discount Sales
|
||||
indexController.mniRelatorioDepositos.label=Closing Current Account and Bank Deposit
|
||||
indexController.mniRelatorioDepositos.label= Bank Deposit
|
||||
indexController.mniRelatorioBoletos.label= Billet
|
||||
indexController.mniRelatorioDepositosDetalhados.label=Detailed Bank Deposit
|
||||
indexController.mniRelatorioPosicaoCaixaAnalitico.label=Numeração Lógica
|
||||
|
||||
|
@ -6310,7 +6312,6 @@ editarOrgaoConcedenteController.funcionamentoConfiguracao=Caso a opção de
|
|||
editarOrgaoConcedenteController.indPermitePagMultaPreEstornoCartao.label = Permite Cobrança Multa Pré Estorno do Cartão
|
||||
editarOrgaoConcedenteController.indPermitePagMultaPreEstornoCartao.ajuda = Este campo quando habilitado irá permitir o sistema cobrar a multa de cancelamento préviamente ao estorno, nas formas de Pagamento cadastrado no Ponto de Venda
|
||||
|
||||
|
||||
# Busqueda Coeficiente Tarifa
|
||||
busquedaCoeficienteTarifaController.window.title=Coeficiente Tarifario
|
||||
busquedaCoeficienteTarifaController.btnRefresh.tooltiptext=Atualizar
|
||||
|
@ -8215,8 +8216,18 @@ relatorioDepositosController.lbEmpresa.value=Empresa
|
|||
relatorioDepositosController.lbPendentes.value=Filtrar Apenas Pendentes
|
||||
relatorioDepositosController.lbClassificarBanco.value=Classificar por banco
|
||||
|
||||
# Relatorio Movimentos em Atraso
|
||||
# Filtro Boletos
|
||||
relatorioBoletosController.window.title=Relatório Boletos
|
||||
relatorioBoletosController.lbDatInicial.value=Fechamento Inicio
|
||||
relatorioBoletosController.lbDatFinal.value=Fechamento Fim
|
||||
relatorioBoletosController.lbBaixaInicial.value=Baixa Inicio
|
||||
relatorioBoletosController.lbBaixaFinal.value=Baixa Fim
|
||||
relatorioBoletosController.lbPuntoventa.value=Ponto de Venda
|
||||
relatorioBoletosController.lbEmpresa.value=Empresa
|
||||
relatorioBoletosController.lbPendentes.value=Filtrar Apenas Pendentes
|
||||
indexController.mniRelatorioBoletos.msgDatasObrigatorias= É obrigatório selecionar período de fechamento ou baixa.
|
||||
|
||||
# Relatorio Movimentos em Atraso
|
||||
relatorioMovimentosAtrasoController.window.title=Relatório Movimentos em Atraso
|
||||
relatorioMovimentosAtrasoController.btnCerrar.tooltiptext=Fechar
|
||||
relatorioMovimentosAtrasoController.lbCompetencia.label=Competencia
|
||||
|
|
|
@ -292,6 +292,7 @@ indexController.mniRelatoriosFinanceiro.label = Reportes Financieros
|
|||
indexController.mniRelatoriosEstatisticos.label = Reportes Estadísticos
|
||||
indexController.mniRelatoriosPacote.label = Reportes paquetes
|
||||
indexController.mniIntegracion.bgm.label = BGM
|
||||
indexController.mnSubMenuContaCorrente.label = Cierre Cnt Contábil
|
||||
indexController.mniRelatorioEmbarqueLocalidade.label=Relatório Embarque por Localidade
|
||||
indexController.mniIntegracion.cashmonitor.label = Cash Monitor
|
||||
indexController.mniIntegracion.cashmonitor.relatoriovendacartaocashmonitor = Venda de cartão
|
||||
|
@ -441,7 +442,8 @@ indexController.mniEscola.label = Escuela
|
|||
indexController.mniCurso.label = Curso
|
||||
indexController.mniPracaPedagio.label = Caseta peaje
|
||||
indexController.mniRelatorioDescontos.label = Descuentos
|
||||
indexController.mniRelatorioDepositos.label=Cierre Cnt Contábil / Depósitos
|
||||
indexController.mniRelatorioDepositos.label= Depósitos
|
||||
indexController.mniRelatorioBoletos.label= Boletos
|
||||
indexController.mniRelatorioDepositosDetalhados.label= Depósitos Detallados
|
||||
indexController.mniRelatorioPosicaoCaixaAnalitico.label= Reporte de Numeración Lógica
|
||||
indexController.mniPainelBpe.label = Painel BPe
|
||||
|
@ -1898,7 +1900,6 @@ editarPuntoVentaController.MSG.empresaExcecaoMultaCancNaoInformada = Informe a e
|
|||
editarPuntoVentaController.MSG.OrgaoConcedenteExcecaoMultaCancNaoInformada = Informe o Órgão Concedente
|
||||
editarPuntoVentaController.OrgaoConcedente.label=Orgão Concedente
|
||||
|
||||
|
||||
# Editar comisión ponto de venta
|
||||
editarPuntoVentaComissaoController.window.title = Comisión empresa/Punto de venta - {0}
|
||||
editarPuntoVentaComissaoController.MSG.suscribirOK = Comisión de la empresa/Punto de venta se registró exitosamente
|
||||
|
@ -6343,7 +6344,6 @@ editarOrgaoConcedenteController.ajudaLimiteTrocaPoltrona.label=Solo será posibl
|
|||
editarOrgaoConcedenteController.indPermitePagMultaPreEstornoCartao.label = Permite Cobrança Multa Pré Estorno do Cartão
|
||||
editarOrgaoConcedenteController.indPermitePagMultaPreEstornoCartao.ajuda = Este campo quando habilitado irá permitir o sistema cobrar a multa de cancelamento préviamente ao estorno, nas formas de Pagamento cadastrado no Ponto de Venda
|
||||
|
||||
|
||||
# Busqueda Indice Tarifa
|
||||
busquedaCoeficienteTarifaController.window.title = Indice tarifario
|
||||
busquedaCoeficienteTarifaController.btnRefresh.tooltiptext = Actualizar
|
||||
|
@ -8046,6 +8046,17 @@ relatorioDepositosController.lbPuntoventa.value=Punto de Venta
|
|||
relatorioDepositosController.lbEmpresa.value=Empresa
|
||||
relatorioDepositosController.lbPendentes.value=Filtrar Apenas Pendientes
|
||||
|
||||
# Filtro Boletos
|
||||
relatorioBoletosController.window.title=Reporte Boletos
|
||||
relatorioBoletosController.lbDatInicial.value=Fechamento Inicio
|
||||
relatorioBoletosController.lbDatFinal.value=Fechamento Fim
|
||||
relatorioBoletosController.lbBaixaInicial.value=Baixa Inicio
|
||||
relatorioBoletosController.lbBaixaFinal.value=Baixa Fim
|
||||
relatorioBoletosController.lbPuntoventa.value=Punto de Venta
|
||||
relatorioBoletosController.lbEmpresa.value=Empresa
|
||||
relatorioBoletosController.lbPendentes.value=Filtrar Apenas Pendientes
|
||||
indexController.mniRelatorioBoletos.msgDatasObrigatorias= É obrigatório selecionar período de fechamento ou baixa.
|
||||
|
||||
# Relatorio Movimientos em Atraso
|
||||
relatorioMovimentosAtrasoController.window.title = Reporte Movimientos Retrasados
|
||||
relatorioMovimentosAtrasoController.btnCerrar.tooltiptext = Cerrar
|
||||
|
|
|
@ -305,6 +305,7 @@ indexController.mniRelatoriosFinanceiro.label = Relatórios Financeiro
|
|||
indexController.mniRelatoriosEstatisticos.label = Relatórios Estatísticos
|
||||
indexController.mniRelatoriosPacote.label = Relatórios Pacote
|
||||
indexController.mniIntegracion.bgm.label = BGM
|
||||
indexController.mnSubMenuContaCorrente.label = Fechamento Conta Corrente
|
||||
indexController.mniRelatorioEmbarqueLocalidade.label=Relatório Embarque por Localidade
|
||||
indexController.mniIntegracion.cashmonitor.label = Cash Monitor
|
||||
indexController.mniIntegracion.cashmonitor.relatoriovendacartaocashmonitor = Venda de cartão
|
||||
|
@ -472,6 +473,7 @@ indexController.mniCurso.label = Curso
|
|||
indexController.mniPracaPedagio.label = Praça Pedágio
|
||||
indexController.mniRelatorioDescontos.label = Vendas com Desconto
|
||||
indexController.mniRelatorioDepositos.label= Fechamento Conta Corrente /Depósitos
|
||||
indexController.mniRelatorioBoletos.label= Fechamento Conta Corrente /Boletos
|
||||
indexController.mniRelatorioDepositosDetalhados.label=Depósitos Detalhados
|
||||
indexController.mniRelatorioPosicaoCaixaAnalitico.label=Numeração Lógica
|
||||
|
||||
|
@ -8761,8 +8763,18 @@ relatorioDepositosController.lbEmpresa.value=Empresa
|
|||
relatorioDepositosController.lbPendentes.value=Filtrar Apenas Pendentes
|
||||
relatorioDepositosController.lbClassificarBanco.value=Classificar por banco
|
||||
|
||||
# Relatorio Movimentos em Atraso
|
||||
# Filtro Boletos
|
||||
relatorioBoletosController.window.title=Relatório Boletos
|
||||
relatorioBoletosController.lbDatInicial.value=Fechamento Inicio
|
||||
relatorioBoletosController.lbDatFinal.value=Fechamento Fim
|
||||
relatorioBoletosController.lbBaixaInicial.value=Baixa Inicio
|
||||
relatorioBoletosController.lbBaixaFinal.value=Baixa Fim
|
||||
relatorioBoletosController.lbPuntoventa.value=Ponto de Venda
|
||||
relatorioBoletosController.lbEmpresa.value=Empresa
|
||||
relatorioBoletosController.lbPendentes.value=Filtrar Apenas Pendentes
|
||||
indexController.mniRelatorioBoletos.msgDatasObrigatorias= É obrigatório selecionar período de fechamento ou baixa.
|
||||
|
||||
# Relatorio Movimentos em Atraso
|
||||
relatorioMovimentosAtrasoController.window.title = Relatório Movimentos em Atraso
|
||||
relatorioMovimentosAtrasoController.btnCerrar.tooltiptext = Fechar
|
||||
relatorioMovimentosAtrasoController.lbCompetencia.label = Competencia
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<?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="winFiltroRelatorioBoletos"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioBoletos" title="${c:l('relatorioBoletosController.window.title')}"
|
||||
apply="${relatorioBoletosController}" contentStyle="overflow:auto"
|
||||
height="205px" width="600px" border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbDatInicial.value')}" />
|
||||
<datebox id="datInicial" width="90%"
|
||||
format="dd/MM/yyyy" maxlength="10" />
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbDatFinal.value')}" />
|
||||
<datebox id="datFinal" width="90%"
|
||||
format="dd/MM/yyyy" maxlength="10" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbBaixaInicial.value')}" />
|
||||
<datebox id="baixaInicial" width="90%"
|
||||
format="dd/MM/yyyy" maxlength="10" />
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbBaixaFinal.value')}" />
|
||||
<datebox id="baixaFinal" width="90%"
|
||||
format="dd/MM/yyyy" maxlength="10" />
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbPuntoventa.value')}" />
|
||||
<combobox id="cmbPuntoventa" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="95%" />
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa"
|
||||
width="95%" />
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioBoletosController.lbPendentes.value')}" />
|
||||
<checkbox id="chkFiltrarPendentes" checked="false" />
|
||||
</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