fixes bug#14522
dev: fabio qua: xxx git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@95669 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c162877be7
commit
777950a043
|
@ -170,11 +170,11 @@ public class RelatorioOperacionalFinanceiro extends Relatorio {
|
|||
sql.append(" ");
|
||||
sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL ");
|
||||
sql.append(" AND c.FECVENTADIGITA IS NULL ");
|
||||
sql.append(" AND c.PORCCATEGORIA = 100 ");
|
||||
sql.append(" AND c.PORCCATEGORIA > 0 ");
|
||||
sql.append(" AND (c.INDREMOTOINVERSO IS NULL ");
|
||||
sql.append(" OR c.INDREMOTOINVERSO =0) ");
|
||||
sql.append(" AND (c.INDSTATUSBOLETO <> 'E' AND c.TIPOVENTA_ID not in (5,12,18)) ");
|
||||
sql.append(" THEN 'BENEFICIO 100%' ");
|
||||
sql.append(" THEN cat.DESCCATEGORIA ");
|
||||
sql.append(" ");
|
||||
sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL ");
|
||||
sql.append(" AND c.FECVENTADIGITA IS NOT NULL ");
|
||||
|
@ -201,6 +201,7 @@ public class RelatorioOperacionalFinanceiro extends Relatorio {
|
|||
sql.append("FROM caja c ");
|
||||
sql.append(" INNER JOIN MARCA ma on c.marca_id = ma.marca_id ");
|
||||
sql.append(" INNER JOIN EMPRESA emp on ma.empresa_id = emp.empresa_id ");
|
||||
sql.append(" INNER JOIN CATEGORIA cat on c.categoria_id = cat.categoria_id ");
|
||||
sql.append(" LEFT JOIN TIPO_VENTA tv ON tv.TIPOVENTA_ID = c.TIPOVENTA_ID ");
|
||||
sql.append(" LEFT JOIN RUTA r ON r.RUTA_ID = c.RUTA_ID and r.ACTIVO = 1 ");
|
||||
sql.append(" LEFT JOIN CORRIDA cor ON c.CORRIDA_ID = cor.CORRIDA_ID and cor.FECCORRIDA = c.FECCORRIDA and cor.ACTIVO = 1 ");
|
||||
|
|
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="RelatorioOperacionalFinanceiro" pageWidth="950" pageHeight="595" orientation="Landscape" columnWidth="930" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" uuid="3ee05e26-199e-4ad2-a96b-dd421627aceb">
|
||||
<property name="ireport.zoom" value="1.239669421487605"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="90"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
|
||||
|
@ -26,13 +26,18 @@
|
|||
<field name="sentido" class="java.lang.String"/>
|
||||
<field name="tipo" class="java.lang.String"/>
|
||||
<variable name="totalTrecho" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
.add( $F{outros} )
|
||||
.add( $F{seguro} )).multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
|
@ -41,35 +46,88 @@
|
|||
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoQte" class="java.lang.Integer" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{qtde}*-1:$F{qtde}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{qtde} * -1
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
0
|
||||
:
|
||||
$F{qtde}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoTarifa" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{tarifa}.multiply( new java.math.BigDecimal("-1") ):$F{tarifa}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{tarifa}.multiply( new java.math.BigDecimal("-1"))
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{tarifa}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoTaxaEmbarque" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{taxaembarque}.multiply( new java.math.BigDecimal("-1") ):$F{taxaembarque}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{taxaembarque}.multiply( new java.math.BigDecimal("-1"))
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{taxaembarque}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoPedagio" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{pedagio}.multiply( new java.math.BigDecimal("-1") ):$F{pedagio}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{pedagio}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{pedagio}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoOutros" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{outros}.multiply( new java.math.BigDecimal("-1") ):$F{outros}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{outros}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{outros}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoSeguro" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{seguro}.multiply( new java.math.BigDecimal("-1") ):$F{seguro}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{seguro}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{seguro}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTrechoGeral" class="java.math.BigDecimal" resetType="Group" resetGroup="groupTrecho">
|
||||
<variableExpression><![CDATA[$V{totalTrecho}]]></variableExpression>
|
||||
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||
</variable>
|
||||
<variable name="totalLinha" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
.add( $F{outros} )
|
||||
.add( $F{seguro} )).multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
|
@ -78,22 +136,70 @@
|
|||
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaQte" class="java.lang.Integer" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{qtde}*-1:$F{qtde}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{qtde}*-1
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
0
|
||||
:
|
||||
$F{qtde}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaTarifa" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{tarifa}.multiply( new java.math.BigDecimal("-1") ):$F{tarifa}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{tarifa}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{tarifa}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaTaxaEmbarque" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{taxaembarque}.multiply( new java.math.BigDecimal("-1") ):$F{taxaembarque}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{taxaembarque}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{taxaembarque}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaPedagio" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{pedagio}.multiply( new java.math.BigDecimal("-1") ):$F{pedagio}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{pedagio}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{pedagio}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaOutros" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{outros}.multiply( new java.math.BigDecimal("-1") ):$F{outros}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{outros}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{outros}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaSeguro" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{seguro}.multiply( new java.math.BigDecimal("-1") ):$F{seguro}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{seguro}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{seguro}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalLinhaGeral" class="java.math.BigDecimal" resetType="Group" resetGroup="groupLinha">
|
||||
<variableExpression><![CDATA[$V{totalLinha}]]></variableExpression>
|
||||
|
@ -107,13 +213,18 @@
|
|||
.add( $F{seguro} )]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="total" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
.add( $F{outros} )
|
||||
.add( $F{seguro} )).multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
($F{tarifa}
|
||||
.add( $F{taxaembarque} )
|
||||
.add( $F{pedagio} )
|
||||
|
@ -122,22 +233,70 @@
|
|||
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||
</variable>
|
||||
<variable name="totalQte" class="java.lang.Integer" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{qtde}*-1:$F{qtde}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{qtde}*-1
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
0
|
||||
:
|
||||
$F{qtde}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTarifa" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{tarifa}.multiply( new java.math.BigDecimal("-1") ):$F{tarifa}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{tarifa}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{tarifa}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalTaxaEmbarque" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{taxaembarque}.multiply( new java.math.BigDecimal("-1") ):$F{taxaembarque}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{taxaembarque}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{taxaembarque}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalPedagio" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{pedagio}.multiply( new java.math.BigDecimal("-1") ):$F{pedagio}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{pedagio}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{pedagio}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalOutros" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{outros}.multiply( new java.math.BigDecimal("-1") ):$F{outros}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{outros}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{outros}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalSeguro" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")?$F{seguro}.multiply( new java.math.BigDecimal("-1") ):$F{seguro}]]></variableExpression>
|
||||
<variableExpression><![CDATA[$F{tipo}.equals("CANCELADO")
|
||||
?
|
||||
$F{seguro}.multiply( new java.math.BigDecimal("-1") )
|
||||
:
|
||||
$F{tipo}.equals("IMPRESSAO POSTERIOR")
|
||||
?
|
||||
new java.math.BigDecimal("0")
|
||||
:
|
||||
$F{seguro}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalGeral" class="java.math.BigDecimal">
|
||||
<variableExpression><![CDATA[$V{total}]]></variableExpression>
|
||||
|
|
|
@ -98,8 +98,6 @@ public class RelatorioOperacionalFinanceiroController extends MyGenericForwardCo
|
|||
tramoListSelList.setItemRenderer(new RenderTramoDesc());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void executarPesquisaLinha() {
|
||||
|
||||
String palavraPesquisaRuta = txtPalavraPesquisaLinha.getText();
|
||||
|
|
Loading…
Reference in New Issue