0014053: Comporte - Chamado 76675 - Erro no relatório Fechamento de Conta Corrente /Depósito
fixes bug#14053 dev:Fabio qua:Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@92002 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
dd5b3686c7
commit
b5ef039428
|
@ -6,6 +6,7 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.ResultSet;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -17,6 +18,7 @@ import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioDepositoBe
|
|||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class RelatorioDepositos extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioDepositos.class);
|
||||
|
@ -75,6 +77,7 @@ public class RelatorioDepositos extends Relatorio {
|
|||
lsDadosRelatorio.add(deposito);
|
||||
}
|
||||
|
||||
Collections.sort(lsDadosRelatorio);
|
||||
if (lsDadosRelatorio.size() > 0) {
|
||||
setLsDadosRelatorio(lsDadosRelatorio);
|
||||
}
|
||||
|
@ -142,6 +145,13 @@ public class RelatorioDepositos extends Relatorio {
|
|||
sql.append(" ON ifin.INSTIFINANCEIRA_ID = ecb.INSTIFINANCEIRA_ID ");
|
||||
sql.append(" WHERE f.fecfechamento BETWEEN ? AND ? ");
|
||||
sql.append(" AND f.activo = 1 ");
|
||||
sql.append(" AND f.activo = 1 ");
|
||||
sql.append(" AND e.activo = 1 ");
|
||||
sql.append(" AND p.activo = 1 ");
|
||||
sql.append(" AND fd.activo = 1 ");
|
||||
sql.append(" AND fdp.activo = 1 ");
|
||||
sql.append(" AND ecb.activo = 1 ");
|
||||
sql.append(" AND ifin.activo = 1 ");
|
||||
|
||||
if (puntoVentaId != null){
|
||||
sql.append(" and f.puntoventa_id = " + puntoVentaId);
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
<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="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="65274c35-4f3f-4196-bd84-f042e9ac12ea">
|
||||
<property name="ireport.zoom" value="1.3636363636363644"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="5"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="fecInicio" class="java.lang.String">
|
||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||
</parameter>
|
||||
|
@ -24,8 +24,8 @@
|
|||
<variable name="TOTAL_DEPOSITOS" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrdeposito}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_FECHAMENTO" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrfechamento}]]></variableExpression>
|
||||
<variable name="TOTAL_FECHAMENTO" class="java.math.BigDecimal" resetType="None">
|
||||
<variableExpression><![CDATA[$V{VLFECHAMENTO_BANCO}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_SALDO" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{saldo}]]></variableExpression>
|
||||
|
@ -33,12 +33,15 @@
|
|||
<variable name="DEPOSITO_BANCO" class="java.math.BigDecimal" resetType="Group" resetGroup="grupoBanco" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrdeposito}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="VLFECHAMENTO_BANCO" class="java.math.BigDecimal" resetType="Group" resetGroup="grupoBanco" calculation="Sum">
|
||||
<variable name="VLFECHAMENTO_BANCO" class="java.math.BigDecimal" resetType="Group" resetGroup="grupoBanco" incrementType="Group" incrementGroup="grupo_data_agencia" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{vrfechamento}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="PENDENTE_BANCO" class="java.math.BigDecimal" resetType="Group" resetGroup="grupoBanco" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{saldo}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_PENDENTE" class="java.math.BigDecimal">
|
||||
<variableExpression><![CDATA[$V{VLFECHAMENTO_BANCO}.subtract($V{DEPOSITO_BANCO})]]></variableExpression>
|
||||
</variable>
|
||||
<group name="empresa">
|
||||
<groupExpression><![CDATA[$F{nombempresa}]]></groupExpression>
|
||||
<groupHeader>
|
||||
|
@ -95,7 +98,7 @@
|
|||
<textFieldExpression><![CDATA[$R{header.dtmotivo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="281" y="22" width="64" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="52a2634b-17d1-4ce6-9f8b-6202bc443e95"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="281" y="22" width="68" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="52a2634b-17d1-4ce6-9f8b-6202bc443e95"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -109,7 +112,7 @@
|
|||
<textFieldExpression><![CDATA[$R{header.vrdeposito}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="345" y="22" width="64" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="abb21651-0e84-4231-a213-fe0a5a7fa493"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="349" y="22" width="68" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="abb21651-0e84-4231-a213-fe0a5a7fa493"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -123,7 +126,7 @@
|
|||
<textFieldExpression><![CDATA[$R{header.vrfechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="409" y="22" width="64" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="a704e07a-dff4-4f1f-9acb-e31066999543"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="417" y="22" width="68" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="a704e07a-dff4-4f1f-9acb-e31066999543"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -137,7 +140,7 @@
|
|||
<textFieldExpression><![CDATA[$R{header.saldo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="473" y="22" width="60" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="419b40a0-83c0-440a-b4fb-c65ddd4b6fdb"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="485" y="22" width="60" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="419b40a0-83c0-440a-b4fb-c65ddd4b6fdb"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -171,27 +174,27 @@
|
|||
</band>
|
||||
</groupHeader>
|
||||
<groupFooter>
|
||||
<band height="50">
|
||||
<band height="20">
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00">
|
||||
<reportElement x="281" y="0" width="64" height="20" isPrintWhenDetailOverflows="true" uuid="e2ba52ea-22ed-4d11-b11f-6f7831d57c43"/>
|
||||
<reportElement x="281" y="0" width="68" height="20" isPrintWhenDetailOverflows="true" uuid="e2ba52ea-22ed-4d11-b11f-6f7831d57c43"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{DEPOSITO_BANCO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00">
|
||||
<reportElement x="345" y="0" width="64" height="20" isPrintWhenDetailOverflows="true" uuid="695d6008-0322-46fd-9423-ec88ceaccdb9"/>
|
||||
<reportElement x="349" y="0" width="68" height="20" isPrintWhenDetailOverflows="true" uuid="695d6008-0322-46fd-9423-ec88ceaccdb9"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{VLFECHAMENTO_BANCO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00">
|
||||
<reportElement x="409" y="0" width="64" height="20" isPrintWhenDetailOverflows="true" uuid="a0492959-dfa8-4d34-b1ce-ff7a09b8b706"/>
|
||||
<reportElement x="417" y="0" width="68" height="20" isPrintWhenDetailOverflows="true" uuid="a0492959-dfa8-4d34-b1ce-ff7a09b8b706"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{PENDENTE_BANCO}]]></textFieldExpression>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_PENDENTE}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement x="0" y="0" width="65" height="17" uuid="303904b8-89e3-4223-b081-c9d61d305a29"/>
|
||||
|
@ -204,6 +207,9 @@
|
|||
</band>
|
||||
</groupFooter>
|
||||
</group>
|
||||
<group name="grupo_data_agencia">
|
||||
<groupExpression><![CDATA[$F{dtmotivo}+""+$F{numpuntoventa}]]></groupExpression>
|
||||
</group>
|
||||
<pageHeader>
|
||||
<band height="41" splitType="Stretch">
|
||||
<textField>
|
||||
|
@ -303,7 +309,7 @@
|
|||
<textFieldExpression><![CDATA[$F{nombpuntoventa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="281" y="0" width="64" height="17" uuid="c50e9a15-f55c-4859-b98b-f5181f95d614"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="281" y="0" width="68" height="17" uuid="c50e9a15-f55c-4859-b98b-f5181f95d614"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -317,7 +323,7 @@
|
|||
<textFieldExpression><![CDATA[$F{vrdeposito}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="345" y="0" width="64" height="17" uuid="a5788fa8-4c63-4d06-b573-48c62d78c222"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="349" y="0" width="68" height="17" uuid="a5788fa8-4c63-4d06-b573-48c62d78c222"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -331,7 +337,7 @@
|
|||
<textFieldExpression><![CDATA[$F{vrfechamento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="409" y="0" width="64" height="17" uuid="4a87d5aa-6020-4021-bb4c-5962a65acd14"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="417" y="0" width="68" height="17" uuid="4a87d5aa-6020-4021-bb4c-5962a65acd14"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -342,10 +348,10 @@
|
|||
<font size="8" isBold="true"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{saldo}]]></textFieldExpression>
|
||||
<textFieldExpression><![CDATA[$V{VLFECHAMENTO_BANCO}.subtract($V{DEPOSITO_BANCO})]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="473" y="0" width="60" height="17" uuid="8b59222e-761c-4aba-9132-638c2b9932a9"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="485" y="0" width="60" height="17" uuid="8b59222e-761c-4aba-9132-638c2b9932a9"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -359,7 +365,7 @@
|
|||
<textFieldExpression><![CDATA[$F{numdeposito}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement x="0" y="0" width="65" height="17" uuid="4f651cd3-e07f-42d3-ba24-d0c2bcaa3460"/>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="65" height="17" uuid="4f651cd3-e07f-42d3-ba24-d0c2bcaa3460"/>
|
||||
<box>
|
||||
<topPen lineWidth="0.5"/>
|
||||
<leftPen lineWidth="0.5"/>
|
||||
|
@ -416,7 +422,7 @@
|
|||
<textElement>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_SALDO}]]></textFieldExpression>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_PENDENTE}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</summary>
|
||||
|
|
|
@ -3,7 +3,8 @@ package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class RelatorioDepositoBean {
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class RelatorioDepositoBean implements Comparable {
|
||||
private String nombpuntoventa;
|
||||
private String nombempresa;
|
||||
private BigDecimal saldo;
|
||||
|
@ -79,5 +80,30 @@ public class RelatorioDepositoBean {
|
|||
public void setNumpuntoventa(String numpuntoventa) {
|
||||
this.numpuntoventa = numpuntoventa;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object o) {
|
||||
if(o == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
RelatorioDepositoBean rdb = (RelatorioDepositoBean) 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.dtmotivo.compareTo(rdb.getDtmotivo()) != 0) {
|
||||
return this.dtmotivo.compareTo(rdb.getDtmotivo());
|
||||
|
||||
} else if (this.numdeposito.compareTo(rdb.getNumdeposito()) != 0) {
|
||||
return this.numdeposito.compareTo(rdb.getNumdeposito());
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue