- Ajustes RDA e RRL
- Fechamento de conexão git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@30019 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d467947e3f
commit
5127fc5abe
|
@ -1,3 +1,3 @@
|
|||
#Thu May 02 10:20:38 BRT 2013
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jrxml=UTF-8
|
||||
encoding//web/WEB-INF/i3-label_pt_BR.label=UTF-8
|
||||
|
|
|
@ -142,10 +142,11 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
|||
if ((Boolean) configComissao.get("PEDAGIORECEITA"))
|
||||
baseCalculo = baseCalculo.add(this.resultSet.getBigDecimal("IMPORTEPEDAGIO"));
|
||||
|
||||
System.out.println("configComissao "+configComissao);
|
||||
// Caso esteje setado na configuração de comissão que o calculo deve ser sobre o liquido, deduz o imposto.
|
||||
if (((String) configComissao.get("RECEITA")).equals("RL") &&
|
||||
if (configComissao.get("RECEITA") != null && ((String) configComissao.get("RECEITA")).equals("RL") &&
|
||||
(!tipoVentaId.equals(18) || (tipoVentaId.equals(18) && (Boolean) this.relatorio.getParametros().get("B_CONTEMPLAR_GAP"))))
|
||||
baseCalculo = baseCalculo.subtract((BigDecimal) rowOrigem.get("IMPOSTO"));
|
||||
baseCalculo = baseCalculo.subtract((BigDecimal) rowOrigem.get("IMPOSTOS"));
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -172,6 +173,8 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
|||
|
||||
percComissao = isAltaTemporada ? (BigDecimal) configComissao.get("PASSAGEMALTA") : (BigDecimal) configComissao.get("PASSAGEMBAIXA");
|
||||
|
||||
if(percComissao==null)
|
||||
return;
|
||||
// VALOR COMISSAO = BASE DE CALCULO * (PERCENTUAL COMISSAO / 100)
|
||||
valorComissao = baseCalculo.multiply(percComissao.divide(BigDecimal.valueOf(100)));
|
||||
|
||||
|
@ -273,7 +276,7 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
|||
while (this.resultSet.next()) {
|
||||
|
||||
Integer puntoVentaId = this.resultSet.getInt("PUNTOVENTA_ID");
|
||||
BigDecimal motivoCancelacionId = this.resultSet.getBigDecimal("MOTIVOCANCELACION_ID");
|
||||
Integer motivoCancelacionId = this.resultSet.getInt("MOTIVOCANCELACION_ID");
|
||||
Integer tipoVentaId = this.resultSet.getInt("TIPOVENTA_ID");
|
||||
|
||||
// Inicializa a row atual
|
||||
|
@ -284,7 +287,7 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
|||
row.put("TOTAL_BILHETES_GAP", ((BigDecimal) row.get("TOTAL_BILHETES_GAP")).add(motivoCancelacionId == null && tipoVentaId.equals(18) ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||
row.put("TOTAL_BILHETES_CANC", ((BigDecimal) row.get("TOTAL_BILHETES_CANC")).add(motivoCancelacionId != null ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||
|
||||
if (motivoCancelacionId == null) {
|
||||
if (motivoCancelacionId == 0) {
|
||||
|
||||
row.put("RECEITA_TARIFA", ((BigDecimal) row.get("RECEITA_TARIFA")).add(!tipoVentaId.equals(18) && !tipoVentaId.equals(39) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||
row.put("RECEITA_TARIFA_GAP", ((BigDecimal) row.get("RECEITA_TARIFA_GAP")).add((tipoVentaId.equals(18) || tipoVentaId.equals(39)) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||
|
@ -306,9 +309,10 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
|||
}
|
||||
else {
|
||||
// Verificia se a devolução é pra ser contabilizada na agência de destino ou de origem da venda
|
||||
if (((Integer) this.relatorio.getParametros().get("ISDEVOLUCAODESTINO")).equals(1) || (((Integer) this.relatorio.getParametros().get("ISDEVOLUCAODESTINO")).equals(0) && this.resultSet.getInt("POSSUI_CANC") == 1)) {
|
||||
if (((Integer) this.relatorio.getParametros().get("ISDEVOLUCAODESTINO") == 1 )|| (((Integer) this.relatorio.getParametros().get("ISDEVOLUCAODESTINO")).equals(0) && this.resultSet.getInt("POSSUI_CANC") == 1)) {
|
||||
row.put("TOTAL_DEVOL", ((BigDecimal) row.get("TOTAL_DEVOL")).add((motivoCancelacionId.equals(31) || motivoCancelacionId.equals(32)) && !tipoVentaId.equals(18) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||
row.put("TOTAL_DEVOL_GAP", ((BigDecimal) row.get("TOTAL_DEVOL_GAP")).add((motivoCancelacionId.equals(31) || motivoCancelacionId.equals(32)) && tipoVentaId.equals(18) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<?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="RelatorioReceitaDiariaAgencia" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="822" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" uuid="c5fca8ba-9c4b-4e17-9986-a053943688db">
|
||||
<property name="ireport.zoom" value="2.0"/>
|
||||
<property name="ireport.x" value="223"/>
|
||||
<property name="ireport.x" value="267"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/>
|
||||
<style name="SubTitle" forecolor="#736343" fontName="SansSerif" fontSize="18"/>
|
||||
|
@ -671,7 +671,7 @@
|
|||
<textElement textAlignment="Right">
|
||||
<font size="6" isBold="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Devololução]]></text>
|
||||
<text><![CDATA[Devolução]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="f1d10a1d-13fb-4ca0-914a-734f48754946" style="Column header" x="546" y="11" width="57" height="14" forecolor="#000000"/>
|
||||
|
|
|
@ -35,7 +35,6 @@ public abstract class Relatorio {
|
|||
private JRBeanCollectionDataSource collectionDataSource;
|
||||
|
||||
protected Relatorio(Map<String, Object> parametros, Connection conexao) {
|
||||
|
||||
this.parametros = parametros;
|
||||
this.conexao = conexao;
|
||||
this.infoMsg = new HashSet<String>();
|
||||
|
@ -106,12 +105,26 @@ public abstract class Relatorio {
|
|||
* @see com.rjconsultores.ventaboletos.relatorios.utilitarios.IRenderRelatorio#getConteudo()
|
||||
*/
|
||||
public byte[] getConteudo(SaidaRelatorio saida) throws Exception {
|
||||
byte[] conteudo = null;
|
||||
try {
|
||||
|
||||
this.processaParametros();
|
||||
|
||||
if (this.render == null)
|
||||
this.render = new RenderRelatorioJasper(this);
|
||||
|
||||
return this.render.render(saida);
|
||||
conteudo = this.render.render(saida);
|
||||
|
||||
} catch (Exception e) {
|
||||
if (!this.conexao.isClosed())
|
||||
this.conexao.close();
|
||||
throw e;
|
||||
} finally {
|
||||
if (!this.conexao.isClosed())
|
||||
this.conexao.close();
|
||||
}
|
||||
|
||||
return conteudo;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -210,7 +210,6 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
|||
PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaList.getSelected();
|
||||
puntoVentaSelList.addItemNovo(puntoVentaSel);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onDoubleClick$puntoVentaSelList(Event ev) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# <controler>. <id>. <propiedade> = XXX
|
||||
|
||||
#Versao do VentaBoleto:
|
||||
versao = ADM_20130823_1RC207
|
||||
versao = ADM_20130825_1RC208
|
||||
|
||||
# MSG Defaut:
|
||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||
|
|
Loading…
Reference in New Issue