0013168: Motta - Inconsistência de valores.
fixes bug#13168 dev:Wallace qua:Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@89731 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2d0b31cbce
commit
8ab4ca1506
|
@ -297,6 +297,7 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
||||||
this.prepareQuery();
|
this.prepareQuery();
|
||||||
this.mapDados = new HashMap<String, HashMap<String, Object>>();
|
this.mapDados = new HashMap<String, HashMap<String, Object>>();
|
||||||
|
|
||||||
|
this.resultSet.setFetchSize(1000);
|
||||||
while (this.resultSet.next()) {
|
while (this.resultSet.next()) {
|
||||||
|
|
||||||
Integer puntoVentaId = this.resultSet.getInt("PUNTOVENTA_ID");
|
Integer puntoVentaId = this.resultSet.getInt("PUNTOVENTA_ID");
|
||||||
|
@ -310,8 +311,12 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
||||||
|
|
||||||
this.mapDados.put(row.get("PUNTOVENTA_ID") + "-" + empresaId.toString(), (HashMap<String, Object>) row);
|
this.mapDados.put(row.get("PUNTOVENTA_ID") + "-" + empresaId.toString(), (HashMap<String, Object>) row);
|
||||||
|
|
||||||
// Utiliza o -1 para retirar as transferências
|
if ((Boolean) getParametros().get("TRANSFERENCIA_PASSAGENS")) {
|
||||||
row.put("TOTAL_BILHETES", ((BigDecimal) row.get("TOTAL_BILHETES")).add(motivoCancelacionId == 23 ? new BigDecimal(-1) : motivoCancelacionId == 0 && !tipoVentaId.equals(18) ? BigDecimal.ONE : BigDecimal.ZERO));
|
// Utiliza o -1 para retirar as transferências
|
||||||
|
row.put("TOTAL_BILHETES", ((BigDecimal) row.get("TOTAL_BILHETES")).add(motivoCancelacionId == 23 ? new BigDecimal(-1) : motivoCancelacionId == 0 && !tipoVentaId.equals(18) ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||||
|
} else {
|
||||||
|
row.put("TOTAL_BILHETES", ((BigDecimal) row.get("TOTAL_BILHETES")).add(motivoCancelacionId == 0 && !tipoVentaId.equals(18) ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||||
|
}
|
||||||
row.put("TOTAL_BILHETES_GAP", ((BigDecimal) row.get("TOTAL_BILHETES_GAP")).add(motivoCancelacionId == 0 && tipoVentaId.equals(18) && this.resultSet.getInt("INDREIMPRESION") == 0 ? BigDecimal.ONE : BigDecimal.ZERO));
|
row.put("TOTAL_BILHETES_GAP", ((BigDecimal) row.get("TOTAL_BILHETES_GAP")).add(motivoCancelacionId == 0 && tipoVentaId.equals(18) && this.resultSet.getInt("INDREIMPRESION") == 0 ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||||
row.put("TOTAL_BILHETES_CANC", ((BigDecimal) row.get("TOTAL_BILHETES_CANC")).add(motivoCancelacionId == 31 ? BigDecimal.ONE : BigDecimal.ZERO));
|
row.put("TOTAL_BILHETES_CANC", ((BigDecimal) row.get("TOTAL_BILHETES_CANC")).add(motivoCancelacionId == 31 ? BigDecimal.ONE : BigDecimal.ZERO));
|
||||||
|
|
||||||
|
@ -347,7 +352,7 @@ public class RelatorioReceitaDiariaAgencia extends Relatorio {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deduz os cancelamentos e trocas e transferencias
|
// Deduz os cancelamentos e trocas e transferencias
|
||||||
if (motivoCancelacionId == 31 || motivoCancelacionId == 10 || motivoCancelacionId == 23) {
|
if (motivoCancelacionId == 31 || motivoCancelacionId == 10 || (motivoCancelacionId == 23 && (Boolean) getParametros().get("TRANSFERENCIA_PASSAGENS"))) {
|
||||||
|
|
||||||
row.put("RECEITA_TARIFA", ((BigDecimal) row.get("RECEITA_TARIFA")).subtract(!tipoVentaId.equals(18) && !tipoVentaId.equals(39) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
row.put("RECEITA_TARIFA", ((BigDecimal) row.get("RECEITA_TARIFA")).subtract(!tipoVentaId.equals(18) && !tipoVentaId.equals(39) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||||
row.put("RECEITA_TARIFA_GAP", ((BigDecimal) row.get("RECEITA_TARIFA_GAP")).subtract((tipoVentaId.equals(18) || tipoVentaId.equals(39)) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
row.put("RECEITA_TARIFA_GAP", ((BigDecimal) row.get("RECEITA_TARIFA_GAP")).subtract((tipoVentaId.equals(18) || tipoVentaId.equals(39)) ? this.resultSet.getBigDecimal("PRECIOPAGADO") : BigDecimal.ZERO));
|
||||||
|
|
|
@ -76,6 +76,7 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
private List<PuntoVenta> lsNumPuntoVenta;
|
private List<PuntoVenta> lsNumPuntoVenta;
|
||||||
|
|
||||||
private Checkbox somenteCancelados;
|
private Checkbox somenteCancelados;
|
||||||
|
private Checkbox consideraTransferenciaPassagem;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
||||||
|
@ -110,6 +111,15 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
this.somenteCancelados = somenteCancelados;
|
this.somenteCancelados = somenteCancelados;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Checkbox getConsideraTransferenciaPassagem() {
|
||||||
|
return consideraTransferenciaPassagem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConsideraTransferenciaPassagem(Checkbox consideraTransferenciaPassagem) {
|
||||||
|
this.consideraTransferenciaPassagem = consideraTransferenciaPassagem;
|
||||||
|
}
|
||||||
|
|
||||||
public Datebox getDatInicial() {
|
public Datebox getDatInicial() {
|
||||||
return datInicial;
|
return datInicial;
|
||||||
}
|
}
|
||||||
|
@ -312,6 +322,7 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
parametros.put("ISDEVOLUCAODESTINO", rd1.isChecked() ? 0 : 1);
|
parametros.put("ISDEVOLUCAODESTINO", rd1.isChecked() ? 0 : 1);
|
||||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
||||||
parametros.put("SOMENTE_CANCELADOS", somenteCancelados.isChecked());
|
parametros.put("SOMENTE_CANCELADOS", somenteCancelados.isChecked());
|
||||||
|
parametros.put("TRANSFERENCIA_PASSAGENS", consideraTransferenciaPassagem.isChecked());
|
||||||
|
|
||||||
parametros.put("BASE_CALCULO_IMPOSTO", Integer.valueOf(cmbReceitaImposto.getSelectedItem().getValue().toString()));
|
parametros.put("BASE_CALCULO_IMPOSTO", Integer.valueOf(cmbReceitaImposto.getSelectedItem().getValue().toString()));
|
||||||
|
|
||||||
|
|
|
@ -429,6 +429,8 @@ financeiroGrupoLinhasController.lbDataFin.value = Data Fim
|
||||||
financeiroGrupoLinhasController.lbEmpresa.value = Empresa
|
financeiroGrupoLinhasController.lbEmpresa.value = Empresa
|
||||||
financeiroGrupoLinhasController.label.somenteCancelados = Somente Cancelados
|
financeiroGrupoLinhasController.label.somenteCancelados = Somente Cancelados
|
||||||
financeiroGrupoLinhasController.label.grupo.linhas = Grupo de Linhas
|
financeiroGrupoLinhasController.label.grupo.linhas = Grupo de Linhas
|
||||||
|
financeiroGrupoLinhasController.label.consideraTransferenciaPassagem = Retirar bilhetes transferência de passagens
|
||||||
|
|
||||||
|
|
||||||
# Muestra a Pesquisa Tipo Classe
|
# Muestra a Pesquisa Tipo Classe
|
||||||
busquedaClaseServicioController.window.title = Tipo de Classe
|
busquedaClaseServicioController.window.title = Tipo de Classe
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winFiltroRelatorioReceitaDiariaAgencia"
|
<window id="winFiltroRelatorioReceitaDiariaAgencia"
|
||||||
apply="${relatorioReceitaDiariaAgenciaController}"
|
apply="${relatorioReceitaDiariaAgenciaController}"
|
||||||
contentStyle="overflow:auto" height="324px" width="550px"
|
contentStyle="overflow:auto" height="374px" width="550px"
|
||||||
border="normal">
|
border="normal">
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
|
@ -164,8 +164,14 @@
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
<cell colspan="2">
|
||||||
<label value="${c:l('financeiroGrupoLinhasController.label.somenteCancelados')}" />
|
<label value="${c:l('financeiroGrupoLinhasController.label.somenteCancelados')}" />
|
||||||
<checkbox id="somenteCancelados"/>
|
<checkbox id="somenteCancelados"/>
|
||||||
|
</cell>
|
||||||
|
<cell colspan="4">
|
||||||
|
<label value="${c:l('financeiroGrupoLinhasController.label.consideraTransferenciaPassagem')}" />
|
||||||
|
<checkbox id="consideraTransferenciaPassagem" checked="true"/>
|
||||||
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('financeiroGrupoLinhasController.label.grupo.linhas')}" />
|
<label value="${c:l('financeiroGrupoLinhasController.label.grupo.linhas')}" />
|
||||||
|
|
Loading…
Reference in New Issue