diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasPacotesBoletos.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasPacotesBoletos.java index 1960b5449..0496a223e 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasPacotesBoletos.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasPacotesBoletos.java @@ -96,7 +96,6 @@ public class RelatorioVendasPacotesBoletos extends Relatorio { relatorioVendasPacotesBoletosItemBean.setSimportepedagio(rset.getBigDecimal("simportepedagio")); relatorioVendasPacotesBoletosItemBean.setSimporteoutros(rset.getBigDecimal("simporteoutros")); relatorioVendasPacotesBoletosItemBean.setSimporteseguro(rset.getBigDecimal("simporteseguro")); - relatorioVendasPacotesBoletosItemBean.setSpreciopagado(rset.getBigDecimal("spreciopagado")); relatorioVendasPacotesBoletosItemBean.setSpreciobase(rset.getBigDecimal("spreciobase")); relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto")); @@ -134,8 +133,7 @@ public class RelatorioVendasPacotesBoletos extends Relatorio { sQuery.append("SELECT ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, TVP.NOMCONVENIO, TTP.DESCTIPOTARIFA, ") .append("COUNT(TVP.TARIFAVENDAPACOTE_ID) AS QTDE, SUM(B.IMPORTETAXAEMBARQUE) AS SIMPORTETAXAEMBARQUE, SUM(B.IMPORTEPEDAGIO) AS SIMPORTEPEDAGIO, ") - .append("SUM(B.IMPORTEOUTROS) AS SIMPORTEOUTROS, SUM(B.IMPORTESEGURO) AS SIMPORTESEGURO, SUM(B.PRECIOBASE) AS SPRECIOBASE, SUM(B.PRECIOBASE - B.PRECIOPAGADO) AS DESCONTO, ") - .append("SUM(B.PRECIOPAGADO) AS SPRECIOPAGADO ") + .append("SUM(B.IMPORTEOUTROS) AS SIMPORTEOUTROS, SUM(B.IMPORTESEGURO) AS SIMPORTESEGURO, SUM(B.PRECIOBASE) AS SPRECIOBASE, SUM(B.PRECIOBASE - B.PRECIOPAGADO) AS DESCONTO ") .append("FROM VENDA_PACOTE VP ") .append("LEFT JOIN PACOTE P ON P.PACOTE_ID = VP.PACOTE_ID ") .append("LEFT JOIN TARIFA_VENDA_PACOTE TVP ON TVP.VENDAPACOTE_ID = VP.VENDAPACOTE_ID ") diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper index f8ddfc97d..78304e35e 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jrxml index 5b9b1fc90..c132df8ee 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jrxml @@ -1,7 +1,7 @@ - - + + @@ -52,70 +52,70 @@ - + - + - + - + - + - + - + - + - + - + @@ -126,70 +126,70 @@ - + - + - + - + - + - + - + - + - + - + @@ -206,56 +206,56 @@ - + - + - + - + - + - + - + - + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioVendasPacotesBoletosBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioVendasPacotesBoletosBean.java index 918bca7dd..3395208cc 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioVendasPacotesBoletosBean.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioVendasPacotesBoletosBean.java @@ -44,7 +44,6 @@ public class RelatorioVendasPacotesBoletosBean { private BigDecimal simporteoutros; private BigDecimal simporteseguro; private BigDecimal desconto; - private BigDecimal spreciopagado; private BigDecimal spreciobase; public String getNomconvenio() { @@ -112,13 +111,13 @@ public class RelatorioVendasPacotesBoletosBean { } public BigDecimal getSpreciopagado() { + BigDecimal spreciopagado = BigDecimal.ZERO; + spreciopagado = getSpreciototal(); + spreciopagado = desconto != null ? spreciopagado.subtract(desconto) : spreciopagado; + return spreciopagado; } - public void setSpreciopagado(BigDecimal spreciopagado) { - this.spreciopagado = spreciopagado; - } - public BigDecimal getSpreciototal() { BigDecimal spreciototal = BigDecimal.ZERO;