fixes bug#AL-1558

Novo campo totalizador somente com status vendido
master
Gleison da Cruz 2022-12-20 14:17:24 -03:00
parent baeb1484e2
commit e400bff1a3
7 changed files with 31 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.0.14</version>
<version>1.0.15</version>
<packaging>war</packaging>
<distributionManagement>

View File

@ -127,6 +127,7 @@ public class RelatorioGratuidade extends Relatorio {
gratuidadeBean.setPorccategoria(rset.getBigDecimal("porccategoria"));
gratuidadeBean.setPreciooriginal(rset.getBigDecimal("preciooriginal"));
gratuidadeBean.setPreciopagado(rset.getBigDecimal("preciopagado"));
gratuidadeBean.setPreciopagadoVendido(rset.getBigDecimal("preciopagadovendido"));
gratuidadeBean.setDesctelefono(rset.getString("desctelefono"));
gratuidadeBean.setNombempresa(rset.getString("nombempresa"));
gratuidadeBean.setCvecategoria(rset.getString("cvecategoria"));
@ -194,7 +195,8 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" tar.preciooriginal,");
sb.append(" tar.precio,");
sb.append(" case when b.PRECIOBASE > 0 then TRUNC(((100 - (b.PRECIOPAGADO * 100) / b.PRECIOBASE)),2) else 0 end as porccategoria, ");
sb.append(" (select sum(bfpv.importe) from boleto_formapago bfpv where bfpv.boleto_id = b.boleto_id and bfpv.activo = 1) as preciopagado, ");;
sb.append(" (select sum(bfpv.importe) from boleto_formapago bfpv where bfpv.boleto_id = b.boleto_id and bfpv.activo = 1) as preciopagado, ");
sb.append(" nvl((select sum(bfpv.importe) from boleto_formapago bfpv where bfpv.boleto_id = b.boleto_id and bfpv.activo = 1 and b.indstatusboleto = 'V'),0) AS preciopagadovendido, ");
sb.append(" u.cveusuario,");
sb.append(" ag.nombpuntoventa,");
sb.append(" b.desctelefono,");
@ -292,6 +294,7 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" tar.precio,");
sb.append(" case when c.PRECIOBASE > 0 then TRUNC(((100 - (c.PRECIOPAGADO * 100) / c.PRECIOBASE)),2) else 0 end as porccategoria, ");
sb.append(" (select sum(cfpv.importe) from caja_formapago cfpv where cfpv.caja_id = c.caja_id and cfpv.activo = 1) as preciopagado, ");
sb.append(" nvl((select sum(cfpv.importe) from caja_formapago cfpv where cfpv.caja_id = c.caja_id and cfpv.activo = 1 and c.indstatusboleto = 'V'), 0) as preciopagadovendido, ");
sb.append(" u.cveusuario,");
sb.append(" ag.nombpuntoventa,");
sb.append(" c.desctelefono,");
@ -312,7 +315,7 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" or (c.indstatusboleto = 'T' and c.motivocancelacion_id is null and c.tipoventa_id = 8 and (bpe.tipoevento is null or bpe.tipoevento <> :bpeEventoAlteracaoPoltrona)) ");
sb.append(" then 'TROCA' ");
sb.append(" when c.indstatusboleto = 'T' and c.motivocancelacion_id is null and bpe.tipoevento = :bpeEventoAlteracaoPoltrona then 'TROCA POLTRONA' ");
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 81 then 'TRANSFERÊNCIA' " );
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 81 then 'TRANSFER<EFBFBD>NCIA' " );
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 82 then 'CONFIRM.ABERTO' " );
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 10 then 'TROCA PASSAGEM' " );

View File

@ -49,6 +49,9 @@ detail.status=Status
detail.codOrigem=Cod. Origem
detail.codDestino=Cod. Destino
detail.total=Total
detail.totalComDesconto=Total c/ desconto
detail.totalSemDesconto=Total s/ desconto
detail.totalVendido=Total vendido
detail.ccf=CCf
detail.chaveBPe=Ch. BP-e

View File

@ -49,6 +49,9 @@ detail.status=Status
detail.codOrigem=Cod. Origem
detail.codDestino=Cod. Destino
detail.total=Total
detail.totalComDesconto=Total c/ desconto
detail.totalSemDesconto=Total s/ desconto
detail.totalVendido=Total vendido
detail.ccf=CCf
detail.chaveBPe=Ch. BP-e

View File

@ -1,8 +1,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="RelatorioEmpresaCorrida" pageWidth="1152" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1132" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
<property name="ireport.zoom" value="2.923075650000008"/>
<property name="ireport.x" value="1620"/>
<property name="ireport.y" value="277"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="220"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
<parameter name="fecInicioViagem" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
@ -56,6 +56,7 @@
<field name="fecdatviaje" class="java.lang.String"/>
<field name="chbpe" class="java.lang.String"/>
<field name="desctelefono" class="java.lang.String"/>
<field name="preciopagadoVendido" class="java.math.BigDecimal"/>
<variable name="qtde" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{km}]]></variableExpression>
</variable>
@ -65,6 +66,10 @@
<variable name="total_com_desconto" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{preciopagado}]]></variableExpression>
</variable>
<variable name="total_vendido" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{preciopagadoVendido}]]></variableExpression>
<initialValueExpression><![CDATA[]]></initialValueExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
@ -613,6 +618,11 @@
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{total_com_desconto}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="97a0b50b-6760-4619-86ea-ea6ac23547d9" x="959" y="0" width="90" height="18"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{total_vendido}]]></textFieldExpression>
</textField>
</band>
</summary>
<noData>

View File

@ -43,6 +43,7 @@ public class RelatorioGratuidadeBean {
private String descorgao;
private String ccf;
private String chbpe; // Mantis 15731
private BigDecimal preciopagadoVendido;
public String getDesctelefono() {
@ -275,4 +276,10 @@ public class RelatorioGratuidadeBean {
public void setChbpe(String chbpe) {
this.chbpe = chbpe;
}
public BigDecimal getPreciopagadoVendido() {
return preciopagadoVendido;
}
public void setPreciopagadoVendido(BigDecimal preciopagadoVendido) {
this.preciopagadoVendido = preciopagadoVendido;
}
}