agrupado por autorização
fixes bug#11948 dev:wallace qua:wallace git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@85275 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a8bff45676
commit
7991d4ec21
|
@ -17,6 +17,7 @@ import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasCartoesBean;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasCartoesBean;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
@ -78,11 +79,11 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
|
|
||||||
RelatorioVendasCartoesBean bean = new RelatorioVendasCartoesBean();
|
RelatorioVendasCartoesBean bean = new RelatorioVendasCartoesBean();
|
||||||
|
|
||||||
bean.setDataVenda(rset.getDate("dataVenda"));
|
bean.setDataVenda(rset.getString("dataVenda") != null ? DateUtil.getDateFromString(rset.getString("dataVenda"), "ddMMyy") : null);
|
||||||
bean.setDataOperacao(rset.getDate("dataOperacao"));
|
bean.setDataOperacao(rset.getString("dataOperacao") != null ? DateUtil.getDateFromString(rset.getString("dataOperacao"), "ddMMyy") : null);
|
||||||
bean.setDescPagamento(rset.getString("descPagamento"));
|
bean.setDescPagamento(rset.getString("descPagamento") != null ? rset.getString("descPagamento") : null);
|
||||||
bean.setValor(rset.getBigDecimal("valor"));
|
bean.setValor(rset.getBigDecimal("valor") != null ? rset.getBigDecimal("valor") : null);
|
||||||
bean.setAutorizacao(rset.getString("autorizacao"));
|
bean.setAutorizacao(rset.getString("autorizacao") != null ? rset.getString("autorizacao") : null);
|
||||||
bean.setQtdParcelas(rset.getInt("qtdParcelas"));
|
bean.setQtdParcelas(rset.getInt("qtdParcelas"));
|
||||||
|
|
||||||
valorTotal = valorTotal.add(bean.getValor() != null ? bean.getValor() : BigDecimal.ZERO);
|
valorTotal = valorTotal.add(bean.getValor() != null ? bean.getValor() : BigDecimal.ZERO);
|
||||||
|
@ -121,10 +122,10 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append("SELECT caja.descpago as descPagamento,");
|
sb.append("SELECT caja.descpago as descPagamento,");
|
||||||
sb.append(" caja.dataoperacao as dataOperacao,");
|
sb.append(" to_char(caja.dataoperacao, 'ddMMyy') as dataOperacao,");
|
||||||
sb.append(" caja.autorizacao as autorizacao,");
|
sb.append(" caja.autorizacao as autorizacao,");
|
||||||
sb.append(" caja.qtdparcelas as qtdParcelas,");
|
sb.append(" caja.qtdparcelas as qtdParcelas,");
|
||||||
sb.append(" caja.datavenda as dataVenda, ");
|
sb.append(" to_char(caja.datavenda, 'ddMMyy') as dataVenda, ");
|
||||||
sb.append(" sum(caja.preco) as valor ");
|
sb.append(" sum(caja.preco) as valor ");
|
||||||
sb.append("FROM");
|
sb.append("FROM");
|
||||||
sb.append(" (SELECT fp.descpago AS descpago,");
|
sb.append(" (SELECT fp.descpago AS descpago,");
|
||||||
|
@ -132,7 +133,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
sb.append(" ct.numautorizacion AS autorizacao,");
|
sb.append(" ct.numautorizacion AS autorizacao,");
|
||||||
sb.append(" ct.cantparcelas AS qtdparcelas,");
|
sb.append(" ct.cantparcelas AS qtdparcelas,");
|
||||||
sb.append(" c.fechorventa AS datavenda,");
|
sb.append(" c.fechorventa AS datavenda,");
|
||||||
sb.append(" c.preciopagado AS preco");
|
sb.append(" cfp.importe AS preco");
|
||||||
sb.append(" FROM caja c");
|
sb.append(" FROM caja c");
|
||||||
sb.append(" INNER JOIN caja_formapago cfp ON c.caja_id=cfp.caja_id");
|
sb.append(" INNER JOIN caja_formapago cfp ON c.caja_id=cfp.caja_id");
|
||||||
sb.append(" AND cfp.activo = 1");
|
sb.append(" AND cfp.activo = 1");
|
||||||
|
@ -168,12 +169,11 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
sb.append(" AND fp.formapago_id IN(2,3)");
|
sb.append(" AND fp.formapago_id IN(2,3)");
|
||||||
sb.append(" AND c.activo = 1) caja ");
|
sb.append(" AND c.activo = 1) caja ");
|
||||||
sb.append("GROUP BY caja.descpago,");
|
sb.append("GROUP BY caja.descpago,");
|
||||||
sb.append(" caja.dataoperacao,");
|
sb.append(" to_char(caja.dataoperacao, 'ddMMyy'),");
|
||||||
sb.append(" caja.autorizacao,");
|
sb.append(" caja.autorizacao,");
|
||||||
sb.append(" caja.qtdparcelas,");
|
sb.append(" caja.qtdparcelas,");
|
||||||
sb.append(" caja.datavenda,");
|
sb.append(" to_char(caja.datavenda, 'ddMMyy') ");
|
||||||
sb.append(" caja.preco ");
|
sb.append("ORDER BY caja.descpago, to_char(caja.datavenda, 'ddMMyy')");
|
||||||
sb.append("ORDER BY caja.descpago, caja.datavenda");
|
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
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="RelatorioVendasCartoes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ae2cbb01-bc79-4d18-8206-3b59273fe793">
|
<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="RelatorioVendasCartoes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ae2cbb01-bc79-4d18-8206-3b59273fe793">
|
||||||
<property name="ireport.zoom" value="4.177248169415656"/>
|
<property name="ireport.zoom" value="4.177248169415656"/>
|
||||||
<property name="ireport.x" value="1210"/>
|
<property name="ireport.x" value="2573"/>
|
||||||
<property name="ireport.y" value="192"/>
|
<property name="ireport.y" value="78"/>
|
||||||
<parameter name="NOMBEMPRESA" class="java.lang.String"/>
|
<parameter name="NOMBEMPRESA" class="java.lang.String"/>
|
||||||
<parameter name="DATA_INICIAL" class="java.lang.String">
|
<parameter name="DATA_INICIAL" class="java.lang.String">
|
||||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$V{total_group}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$V{total_group}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement x="648" y="1" width="77" height="23" uuid="b3279060-d361-41c6-bc5c-a02d9d08774c"/>
|
<reportElement x="648" y="1" width="132" height="23" uuid="b3279060-d361-41c6-bc5c-a02d9d08774c"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="10"/>
|
<font size="10"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
<reportElement x="0" y="60" width="802" height="1" uuid="27a77abc-db13-4836-9261-8208f3825802"/>
|
<reportElement x="0" y="60" width="802" height="1" uuid="27a77abc-db13-4836-9261-8208f3825802"/>
|
||||||
</line>
|
</line>
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement x="0" y="61" width="802" height="20" uuid="06a43567-1fd2-4c86-a0cc-443618ddf965"/>
|
<reportElement x="0" y="61" width="780" height="20" uuid="06a43567-1fd2-4c86-a0cc-443618ddf965"/>
|
||||||
<textElement>
|
<textElement>
|
||||||
<font size="11"/>
|
<font size="11"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
<textFieldExpression><![CDATA[$R{detail.dataVenda}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$R{detail.dataVenda}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement x="480" y="86" width="276" height="23" uuid="c5d483c4-89a2-4724-ad57-731676551f0f"/>
|
<reportElement x="480" y="86" width="300" height="23" uuid="c5d483c4-89a2-4724-ad57-731676551f0f"/>
|
||||||
<textElement textAlignment="Right" markup="none">
|
<textElement textAlignment="Right" markup="none">
|
||||||
<font size="12" isBold="true"/>
|
<font size="12" isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -190,8 +190,8 @@
|
||||||
</columnHeader>
|
</columnHeader>
|
||||||
<detail>
|
<detail>
|
||||||
<band height="15" splitType="Stretch">
|
<band height="15" splitType="Stretch">
|
||||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement x="648" y="0" width="108" height="15" uuid="80a57c70-9f34-49b9-86f9-14bb27c462ca"/>
|
<reportElement x="648" y="0" width="132" height="15" uuid="80a57c70-9f34-49b9-86f9-14bb27c462ca"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="10"/>
|
<font size="10"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -248,8 +248,8 @@
|
||||||
<line>
|
<line>
|
||||||
<reportElement positionType="Float" x="0" y="0" width="803" height="1" uuid="d9792af6-b583-4b6e-bb69-7edd7f78fdfa"/>
|
<reportElement positionType="Float" x="0" y="0" width="803" height="1" uuid="d9792af6-b583-4b6e-bb69-7edd7f78fdfa"/>
|
||||||
</line>
|
</line>
|
||||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement x="648" y="1" width="77" height="21" uuid="7ef31b82-e8a2-4baa-821a-174d5ca113fe"/>
|
<reportElement x="648" y="1" width="132" height="21" uuid="7ef31b82-e8a2-4baa-821a-174d5ca113fe"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="10"/>
|
<font size="10"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
<noData>
|
<noData>
|
||||||
<band height="20">
|
<band height="20">
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement x="0" y="0" width="791" height="20" uuid="3429e199-e682-4e28-b2ce-1bc9f2d031b2"/>
|
<reportElement x="0" y="0" width="780" height="20" uuid="3429e199-e682-4e28-b2ce-1bc9f2d031b2"/>
|
||||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
|
|
Loading…
Reference in New Issue