bug#11600
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@84228 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2aa59a8270
commit
8002dd7c9f
|
@ -70,11 +70,11 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||||
ResultSet rset = null;
|
ResultSet rset = null;
|
||||||
|
|
||||||
if(dataVendaInicial != null) {
|
if (dataVendaInicial != null && !isBpe) {
|
||||||
stmt.setString("dataVendaInicial", DateUtil.getStringDate(dataVendaInicial, "dd/MM/yyyy HH:mm"));
|
stmt.setString("dataVendaInicial", DateUtil.getStringDate(dataVendaInicial, "dd/MM/yyyy HH:mm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataVendaFinal != null) {
|
if (dataVendaFinal != null && !isBpe) {
|
||||||
stmt.setString("dataVendaFinal", DateUtil.getStringDate(dataVendaFinal, "dd/MM/yyyy HH:mm"));
|
stmt.setString("dataVendaFinal", DateUtil.getStringDate(dataVendaFinal, "dd/MM/yyyy HH:mm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,22 +285,21 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
sql.append("LEFT JOIN ESTADO ESAIDF ON ESAIDF.ESTADO_ID = AIDF.ESTADO_ID ");
|
sql.append("LEFT JOIN ESTADO ESAIDF ON ESAIDF.ESTADO_ID = AIDF.ESTADO_ID ");
|
||||||
sql.append("LEFT JOIN BOLETO BORI ON BORI.BOLETO_ID = B.BOLETOORIGINAL_ID ");
|
sql.append("LEFT JOIN BOLETO BORI ON BORI.BOLETO_ID = B.BOLETOORIGINAL_ID ");
|
||||||
sql.append(isBpe ? "INNER JOIN BPE BPE ON BPE.BOLETO_ID = B.BOLETO_ID " : "");
|
sql.append(isBpe ? "INNER JOIN BPE BPE ON BPE.BOLETO_ID = B.BOLETO_ID " : "");
|
||||||
|
sql.append(isBpe ? "INNER JOIN ESTADO EST_BPE ON BPE.UF = EST_BPE.CODIBGE " : "");
|
||||||
sql.append("WHERE ");
|
sql.append("WHERE ");
|
||||||
sql.append(isBpe ? "B.MOTIVOCANCELACION_ID IN (31,32,10,23,37,99,36) " : " B.MOTIVOCANCELACION_ID IN (31,32,10,37,99,36) ");
|
sql.append(isBpe ? " " : " B.MOTIVOCANCELACION_ID IN (31,32,10,37,99,36) AND B.INDSTATUSBOLETO = 'C' AND B.INDCANCELACION = 1 ");
|
||||||
|
sql.append(isBpe ? " ( (BPE.CODSTAT = 135 AND BPE.TIPOEVENTO = 110115) OR BPE.CHBPE_SUBSTITUICAO IS NOT NULL "
|
||||||
sql.append(isBpe ? " AND B.INDSTATUSBOLETO in ('C', 'T') " : " AND B.INDSTATUSBOLETO = 'C' ");
|
+ "OR (BPE.CODSTAT = 135 AND TO_CHAR(BORI.FECHORVENTA, 'MM/YYYY') < TO_CHAR(B.FECHORVENTA, 'MM/YYYY')) )" : " ");
|
||||||
|
|
||||||
sql.append(isBpe ? " " : " AND B.INDCANCELACION = 1 ");
|
|
||||||
|
|
||||||
if (isApenasBilhetesImpressos) {
|
if (isApenasBilhetesImpressos) {
|
||||||
sql.append("AND B.NUMFOLIOPREIMPRESO IS NOT NULL ");
|
sql.append("AND B.NUMFOLIOPREIMPRESO IS NOT NULL ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataVendaInicial != null) {
|
if (dataVendaInicial != null && !isBpe) {
|
||||||
sql.append("AND BORI.FECHORVENTA >= TO_DATE(:dataVendaInicial,'DD/MM/YYYY HH24:MI') ");
|
sql.append("AND BORI.FECHORVENTA >= TO_DATE(:dataVendaInicial,'DD/MM/YYYY HH24:MI') ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataVendaFinal != null) {
|
if (dataVendaFinal != null && !isBpe) {
|
||||||
sql.append("AND BORI.FECHORVENTA <= TO_DATE(:dataVendaFinal,'DD/MM/YYYY HH24:MI') ");
|
sql.append("AND BORI.FECHORVENTA <= TO_DATE(:dataVendaFinal,'DD/MM/YYYY HH24:MI') ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,8 +311,14 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
sql.append("AND B.FECHORVENTA <= TO_DATE(:dataDevolucaoFinal,'DD/MM/YYYY HH24:MI') ");
|
sql.append("AND B.FECHORVENTA <= TO_DATE(:dataDevolucaoFinal,'DD/MM/YYYY HH24:MI') ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.append("AND B.CATEGORIA_ID NOT IN (SELECT VALORCONSTANTE FROM CONSTANTE WHERE NOMBCONSTANTE = 'GRATUIDADE_CRIANCA') ");
|
sql.append(isBpe ? "" : "AND B.CATEGORIA_ID NOT IN (SELECT VALORCONSTANTE FROM CONSTANTE WHERE NOMBCONSTANTE = 'GRATUIDADE_CRIANCA') ");
|
||||||
|
|
||||||
|
if (isBpe) {
|
||||||
|
sql.append(estados == null ? "" : "AND EST_BPE.ESTADO_ID IN (" + estados + ") ");
|
||||||
|
} else {
|
||||||
sql.append(estados == null ? "" : "AND COALESCE(ESAIDF.ESTADO_ID, EOS.ESTADO_ID, EST.ESTADO_ID) IN (" + estados + ") ");
|
sql.append(estados == null ? "" : "AND COALESCE(ESAIDF.ESTADO_ID, EOS.ESTADO_ID, EST.ESTADO_ID) IN (" + estados + ") ");
|
||||||
|
}
|
||||||
|
|
||||||
sql.append(puntoVentas == null ? "" : "AND PTV.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
|
sql.append(puntoVentas == null ? "" : "AND PTV.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
|
||||||
sql.append(empresaId == null ? "" : "AND E.EMPRESA_ID IN (" + empresaId + ") ");
|
sql.append(empresaId == null ? "" : "AND E.EMPRESA_ID IN (" + empresaId + ") ");
|
||||||
sql.append("ORDER BY NOMB_EMPRESA, ESTADO, UF, FECHOR_DEVOLUCAO, NUMFOLIOSISTEMA");
|
sql.append("ORDER BY NOMB_EMPRESA, ESTADO, UF, FECHOR_DEVOLUCAO, NUMFOLIOSISTEMA");
|
||||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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="RelatorioDevolucaoBilhetes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
|
<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="RelatorioDevolucaoBilhetes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
|
||||||
<property name="ireport.zoom" value="1.9965000000000006"/>
|
<property name="ireport.zoom" value="1.6500000000000004"/>
|
||||||
<property name="ireport.x" value="0"/>
|
<property name="ireport.x" value="0"/>
|
||||||
<property name="ireport.y" value="0"/>
|
<property name="ireport.y" value="7"/>
|
||||||
<style name="bpeStyle" isDefault="true" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
|
<style name="bpeStyle" isDefault="true" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
|
||||||
<conditionalStyle>
|
<conditionalStyle>
|
||||||
<conditionExpression><![CDATA[$F{chbpe} != null ? Boolean.TRUE : Boolean.FALSE]]></conditionExpression>
|
<conditionExpression><![CDATA[$F{chbpe} != null ? Boolean.TRUE : Boolean.FALSE]]></conditionExpression>
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
<pageHeader>
|
<pageHeader>
|
||||||
<band height="78" splitType="Stretch">
|
<band height="78" splitType="Stretch">
|
||||||
<textField pattern="" isBlankWhenNull="false">
|
<textField pattern="" isBlankWhenNull="false">
|
||||||
<reportElement mode="Transparent" x="2" y="16" width="577" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="2ed4524d-5c06-487c-a8f1-abc59a8ef7fc"/>
|
<reportElement mode="Transparent" x="2" y="1" width="577" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="2ed4524d-5c06-487c-a8f1-abc59a8ef7fc"/>
|
||||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
<paragraph lineSpacing="Single"/>
|
<paragraph lineSpacing="Single"/>
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement mode="Transparent" x="2" y="17" width="92" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="7f1538d0-be50-4597-bfce-dfc18da5c67a"/>
|
<reportElement mode="Transparent" x="2" y="17" width="92" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="7f1538d0-be50-4597-bfce-dfc18da5c67a"/>
|
||||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
<paragraph lineSpacing="Single"/>
|
<paragraph lineSpacing="Single"/>
|
||||||
|
@ -422,8 +422,7 @@
|
||||||
</line>
|
</line>
|
||||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
<reportElement stretchType="RelativeToTallestObject" x="215" y="1" width="113" height="14" isPrintWhenDetailOverflows="true" uuid="1835789f-f3ff-4d8d-ba10-12c6d693b270"/>
|
<reportElement stretchType="RelativeToTallestObject" x="215" y="1" width="113" height="14" isPrintWhenDetailOverflows="true" uuid="1835789f-f3ff-4d8d-ba10-12c6d693b270"/>
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none"/>
|
||||||
</textElement>
|
|
||||||
<textFieldExpression><![CDATA[$F{chbpe} != null ? $R{label.chaveBpe} : $R{label.aidf}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{chbpe} != null ? $R{label.chaveBpe} : $R{label.aidf}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
@ -529,7 +528,6 @@
|
||||||
<textField isBlankWhenNull="true">
|
<textField isBlankWhenNull="true">
|
||||||
<reportElement style="bpeStyle" x="215" y="0" width="113" height="14" uuid="a34502fa-62b7-44b6-9218-90034054b7ac"/>
|
<reportElement style="bpeStyle" x="215" y="0" width="113" height="14" uuid="a34502fa-62b7-44b6-9218-90034054b7ac"/>
|
||||||
<textElement textAlignment="Justified" verticalAlignment="Middle">
|
<textElement textAlignment="Justified" verticalAlignment="Middle">
|
||||||
<font size="6"/>
|
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{chbpe} != null ? $F{chbpe} : $F{aidf}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{chbpe} != null ? $F{chbpe} : $F{aidf}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
|
Loading…
Reference in New Issue