julio 2017-09-11 18:32:10 +00:00
parent 1b6edb9f16
commit fc1d85ab6d
3 changed files with 6 additions and 7 deletions

View File

@ -16,7 +16,6 @@ import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DevolucaoBilhetes; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DevolucaoBilhetes;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal; import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
@ -221,9 +220,10 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
private String getSql(Integer empresaId, String puntoVentas, String estados, Date dataVendaInicial, Date dataVendaFinal, Date dataDevolucaoInicial, Date dataDevolucaoFinal, Boolean isApenasBilhetesImpressos) { private String getSql(Integer empresaId, String puntoVentas, String estados, Date dataVendaInicial, Date dataVendaFinal, Date dataDevolucaoInicial, Date dataDevolucaoFinal, Boolean isApenasBilhetesImpressos) {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.append("SELECT COALESCE(COALESCE(BORI.SERIEIMPFISCALORIGINAL,BORI.SERIEIMPFISCAL),AIDF.ACFISCAL) AS AIDF, "); sql.append("SELECT COALESCE(COALESCE(BORI.SERIEIMPFISCALORIGINAL,BORI.SERIEIMPFISCAL), AIDF.DOCFISCAL) AS AIDF, ");
sql.append(" COALESCE(B.NUMFOLIOSISTEMA, B.NUMOPERACION) AS NUMFOLIOSISTEMA, "); sql.append(" COALESCE(B.NUMFOLIOSISTEMA, B.NUMOPERACION) AS NUMFOLIOSISTEMA, ");
sql.append(" CASE WHEN COALESCE(BORI.SERIEIMPFISCALORIGINAL,BORI.SERIEIMPFISCAL) IS NOT NULL THEN NULL ELSE B.NUMSERIEPREIMPRESA END AS SERIE_SUBSERIE, "); sql.append(" CASE WHEN COALESCE(BORI.SERIEIMPFISCALORIGINAL,BORI.SERIEIMPFISCAL) IS NOT NULL THEN NULL ");
sql.append(" ELSE AIDF.SERIE || COALESCE(AIDF.SUBSERIE, '') END AS SERIE_SUBSERIE, ");
sql.append(" B.NUMFOLIOPREIMPRESO AS FOLIO, "); sql.append(" B.NUMFOLIOPREIMPRESO AS FOLIO, ");
sql.append(" B.PRECIOBASE AS PRECIOBASE, "); sql.append(" B.PRECIOBASE AS PRECIOBASE, ");
sql.append(" E.NOMBEMPRESA AS NOMB_EMPRESA, "); sql.append(" E.NOMBEMPRESA AS NOMB_EMPRESA, ");
@ -278,7 +278,6 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
sql.append("WHERE B.MOTIVOCANCELACION_ID IN (31,32,10,37,99,36) "); sql.append("WHERE B.MOTIVOCANCELACION_ID IN (31,32,10,37,99,36) ");
sql.append("AND B.INDSTATUSBOLETO = 'C' "); sql.append("AND B.INDSTATUSBOLETO = 'C' ");
sql.append("AND B.INDCANCELACION = 1 "); sql.append("AND B.INDCANCELACION = 1 ");
sql.append("AND BORI.SERIEIMPFISCAL IS NOT NULL ");
if(isApenasBilhetesImpressos) { if(isApenasBilhetesImpressos) {
sql.append("AND B.NUMFOLIOPREIMPRESO IS NOT NULL "); sql.append("AND B.NUMFOLIOPREIMPRESO IS NOT NULL ");

View File

@ -1,6 +1,6 @@
<?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="RelatorioImpressaoRMD" printOrder="Horizontal" pageWidth="948" pageHeight="730" columnWidth="922" leftMargin="20" rightMargin="6" topMargin="0" bottomMargin="19" uuid="d3d490c9-33e7-4eeb-97cc-1fa9be0f10d4"> <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="RelatorioImpressaoRMD" printOrder="Horizontal" pageWidth="948" pageHeight="730" columnWidth="922" leftMargin="20" rightMargin="6" topMargin="0" bottomMargin="19" uuid="d3d490c9-33e7-4eeb-97cc-1fa9be0f10d4">
<property name="ireport.zoom" value="0.8264462809917396"/> <property name="ireport.zoom" value="1.464100000000008"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<field name="empresa" class="java.lang.String"/> <field name="empresa" class="java.lang.String"/>
@ -105,14 +105,14 @@
<textFieldExpression><![CDATA[$F{tipo}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tipo}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="29" y="0" width="162" height="18" uuid="b8964ae5-2660-4461-926e-8b7734cbe07f"/> <reportElement x="29" y="0" width="168" height="18" uuid="b8964ae5-2660-4461-926e-8b7734cbe07f"/>
<textElement> <textElement>
<font fontName="SansSerif" size="13" pdfFontName="Times-Roman" isPdfEmbedded="true"/> <font fontName="SansSerif" size="13" pdfFontName="Times-Roman" isPdfEmbedded="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement x="191" y="0" width="51" height="18" uuid="b5444b15-beaa-42fb-814d-424acf42b6ab"/> <reportElement x="197" y="0" width="45" height="18" uuid="b5444b15-beaa-42fb-814d-424acf42b6ab"/>
<textElement> <textElement>
<font fontName="SansSerif" size="13" pdfFontName="Times-Roman" isPdfEmbedded="true"/> <font fontName="SansSerif" size="13" pdfFontName="Times-Roman" isPdfEmbedded="true"/>
</textElement> </textElement>