0015871: Graciosa - Divergência nos valores da venda do cartão entre os relatórios de vendas cartões do adm e fechamento de um dia do vda
bug#15871 dev:alberto qua:wallysson git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@98194 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a0ad2dfdbe
commit
65d46a27c9
|
@ -28,7 +28,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
|
|
||||||
List<RelatorioVendasCartoesBean> list = null;
|
List<RelatorioVendasCartoesBean> list = null;
|
||||||
|
|
||||||
public RelatorioVendasCartoes(Map<String, Object> parametros, Connection conexao) throws Exception {
|
public RelatorioVendasCartoes(Map<String, Object> parametros, Connection conexao, final Boolean buscarPorDataDaVenda) throws Exception {
|
||||||
super(parametros, conexao);
|
super(parametros, conexao);
|
||||||
|
|
||||||
this.setCustomDataSource(new DataSource(this) {
|
this.setCustomDataSource(new DataSource(this) {
|
||||||
|
@ -47,7 +47,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
Usuario usuario = (Usuario) parametros.get("USUARIO");
|
Usuario usuario = (Usuario) parametros.get("USUARIO");
|
||||||
Estacion estacao = (Estacion) parametros.get("ESTACION");
|
Estacion estacao = (Estacion) parametros.get("ESTACION");
|
||||||
|
|
||||||
String sql = getSql(dataInicial, dataFinal, empresa, puntoVenta, usuario, estacao);
|
String sql = getSql(dataInicial, dataFinal, empresa, puntoVenta, usuario, estacao, buscarPorDataDaVenda);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
stmt = new NamedParameterStatement(conexao, sql);
|
stmt = new NamedParameterStatement(conexao, sql);
|
||||||
|
@ -117,7 +117,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
protected void processaParametros() throws Exception {
|
protected void processaParametros() throws Exception {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSql(String dataInicial, String dataFinal, Empresa empresa, PuntoVenta puntoVenta, Usuario usuario, Estacion estacion) {
|
private String getSql(String dataInicial, String dataFinal, Empresa empresa, PuntoVenta puntoVenta, Usuario usuario, Estacion estacion, Boolean buscarPorDataDaVenda) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
@ -158,12 +158,16 @@ public class RelatorioVendasCartoes extends Relatorio {
|
||||||
sb.append(" and c.usuario_id = :usuarioId ");
|
sb.append(" and c.usuario_id = :usuarioId ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataInicial != null){
|
if(dataInicial != null && buscarPorDataDaVenda){
|
||||||
sb.append("AND c.fechorventa >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') ");
|
sb.append("AND c.fechorventa >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') ");
|
||||||
|
} else if (dataInicial != null && !buscarPorDataDaVenda) {
|
||||||
|
sb.append("AND c.feccorte >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataFinal != null){
|
if(dataFinal != null && buscarPorDataDaVenda){
|
||||||
sb.append("AND c.fechorventa <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') ");
|
sb.append("AND c.fechorventa <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') ");
|
||||||
|
} else if (dataInicial != null && !buscarPorDataDaVenda) {
|
||||||
|
sb.append("AND c.feccorte <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" AND fp.formapago_id IN(2,3)");
|
sb.append(" AND fp.formapago_id IN(2,3)");
|
||||||
|
|
|
@ -14,12 +14,12 @@ import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Datebox;
|
import org.zkoss.zul.Datebox;
|
||||||
|
import org.zkoss.zul.Radio;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioMovimentacaoEstoque;
|
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasCartoes;
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasCartoes;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
@ -43,7 +43,9 @@ public class RelatorioVendasCartoesController extends MyGenericForwardComposer {
|
||||||
private MyComboboxEstacion cmbEstacion;
|
private MyComboboxEstacion cmbEstacion;
|
||||||
private MyComboboxUsuario cmbUsuario;
|
private MyComboboxUsuario cmbUsuario;
|
||||||
private List<Empresa> lsEmpresa;
|
private List<Empresa> lsEmpresa;
|
||||||
|
|
||||||
|
private Radio radioDataVenda;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSource dataSourceRead;
|
private DataSource dataSourceRead;
|
||||||
|
|
||||||
|
@ -125,7 +127,7 @@ public class RelatorioVendasCartoesController extends MyGenericForwardComposer {
|
||||||
parametros.put("DATA_FINAL", DateUtil.getStringDate(dataFinal.getValue(), "dd/MM/yyyy"));
|
parametros.put("DATA_FINAL", DateUtil.getStringDate(dataFinal.getValue(), "dd/MM/yyyy"));
|
||||||
|
|
||||||
parametros.put("FILTROS", filtro.toString());
|
parametros.put("FILTROS", filtro.toString());
|
||||||
Relatorio relatorio = new RelatorioVendasCartoes(parametros, dataSourceRead.getConnection());
|
Relatorio relatorio = new RelatorioVendasCartoes(parametros, dataSourceRead.getConnection(), radioDataVenda.isSelected());
|
||||||
|
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
args.put("relatorio", relatorio);
|
args.put("relatorio", relatorio);
|
||||||
|
@ -170,4 +172,11 @@ public class RelatorioVendasCartoesController extends MyGenericForwardComposer {
|
||||||
this.cmbEmpresa = cmbEmpresa;
|
this.cmbEmpresa = cmbEmpresa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Radio getRadioDataVenda() {
|
||||||
|
return radioDataVenda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadioDataVenda(Radio radioDataVenda) {
|
||||||
|
this.radioDataVenda = radioDataVenda;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8396,3 +8396,6 @@ busquedaConfTotemController.seguroTabela.ajuda=Habilita a opção de escolher ou
|
||||||
busquedaConfTotemController.seguroTabela=Seguro Tabela (Cliente escolhe SIM/NÃO).
|
busquedaConfTotemController.seguroTabela=Seguro Tabela (Cliente escolhe SIM/NÃO).
|
||||||
busquedaConfTotemController.pagamentoMultiempresaBPe.ajuda=Habilita o pagamento multiempresa. Cada valor de transação cairá na conta sitef separado por empresa. Porém o cliente terá que inserir o cartão de acordo com a quantidade de empresas que tiver no carrinho de compras.
|
busquedaConfTotemController.pagamentoMultiempresaBPe.ajuda=Habilita o pagamento multiempresa. Cada valor de transação cairá na conta sitef separado por empresa. Porém o cliente terá que inserir o cartão de acordo com a quantidade de empresas que tiver no carrinho de compras.
|
||||||
busquedaConfTotemController.pagamentoMultiempresaBPe=Pagamento Multiempresa BPe
|
busquedaConfTotemController.pagamentoMultiempresaBPe=Pagamento Multiempresa BPe
|
||||||
|
|
||||||
|
relatorioVendasCartoesController.lb.bucarDataCorte.value = Buscar por data do fechamento
|
||||||
|
relatorioVendasCartoesController.lb.buscarDataVenda.value = Buscar por data da Venda
|
||||||
|
|
|
@ -921,6 +921,8 @@ relatorioVendasCartoesController.lb.estacao.value = Estação
|
||||||
relatorioVendasCartoesController.lbDatInicial.value = Data Inicial
|
relatorioVendasCartoesController.lbDatInicial.value = Data Inicial
|
||||||
relatorioVendasCartoesController.lbDatFinal.value = Data Final
|
relatorioVendasCartoesController.lbDatFinal.value = Data Final
|
||||||
relatorioVendasCartoesController.lb.usuario.value = Bilheteiro
|
relatorioVendasCartoesController.lb.usuario.value = Bilheteiro
|
||||||
|
relatorioVendasCartoesController.lb.bucarDataCorte.value = Buscar por data do fechamento do caixa
|
||||||
|
relatorioVendasCartoesController.lb.buscarDataVenda.value = Buscar por data da Venda
|
||||||
|
|
||||||
#Relatório de Vendas PTA
|
#Relatório de Vendas PTA
|
||||||
relatorioVendasPTAController.window.title = Relatório de Vendas PTA
|
relatorioVendasPTAController.window.title = Relatório de Vendas PTA
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winFiltroRelatorioVendasCartoes"
|
<window id="winFiltroRelatorioVendasCartoes"
|
||||||
apply="${relatorioVendasCartoesController}"
|
apply="${relatorioVendasCartoesController}"
|
||||||
contentStyle="overflow:auto" height="220px" width="600px"
|
contentStyle="overflow:auto" height="250px" width="600px"
|
||||||
border="normal">
|
border="normal">
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<datebox id="datFinal" width="100%" mold="rounded"
|
<datebox id="datFinal" width="100%" mold="rounded"
|
||||||
format="dd/MM/yyyy" constraint="no empty" maxlength="10" />
|
format="dd/MM/yyyy" constraint="no empty" maxlength="10" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row spans="1,3">
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioVendasCartoesController.lbEmpresa.value')}" />
|
value="${c:l('relatorioVendasCartoesController.lbEmpresa.value')}" />
|
||||||
<combobox id="cmbEmpresa" buttonVisible="true"
|
<combobox id="cmbEmpresa" buttonVisible="true"
|
||||||
|
@ -35,27 +35,35 @@
|
||||||
model="@{winFiltroRelatorioVendasCartoes$composer.lsEmpresa}"
|
model="@{winFiltroRelatorioVendasCartoes$composer.lsEmpresa}"
|
||||||
constraint="no empty" width="100%" />
|
constraint="no empty" width="100%" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row spans="1,3">
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioVendasCartoesController.lb.puntoVenta.value')}" />
|
value="${c:l('relatorioVendasCartoesController.lb.puntoVenta.value')}" />
|
||||||
<combobox id="cmbPuntoVenta"
|
<combobox id="cmbPuntoVenta"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
width="100%" mold="rounded" buttonVisible="true" />
|
width="100%" mold="rounded" buttonVisible="true" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row spans="1,3">
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioVendasCartoesController.lb.estacao.value')}" />
|
value="${c:l('relatorioVendasCartoesController.lb.estacao.value')}" />
|
||||||
<combobox id="cmbEstacion"
|
<combobox id="cmbEstacion"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion"
|
||||||
width="100%" mold="rounded" buttonVisible="true" />
|
width="100%" mold="rounded" buttonVisible="true" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row spans="1,3">
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioVendasCartoesController.lb.usuario.value')}" />
|
value="${c:l('relatorioVendasCartoesController.lb.usuario.value')}" />
|
||||||
<combobox id="cmbUsuario"
|
<combobox id="cmbUsuario"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario"
|
||||||
mold="rounded" buttonVisible="true" width="100%" />
|
mold="rounded" buttonVisible="true" width="100%" />
|
||||||
</row>
|
</row>
|
||||||
|
<row spans="4" >
|
||||||
|
<radiogroup style="margin-left: 20%; spacing=15%;" >
|
||||||
|
<radio id="radioDataVenda" selected="true"
|
||||||
|
label="${c:l('relatorioVendasCartoesController.lb.buscarDataVenda.value')}" />
|
||||||
|
<radio id="radioDataCorte"
|
||||||
|
label="${c:l('relatorioVendasCartoesController.lb.bucarDataCorte.value')}" />
|
||||||
|
</radiogroup>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
<toolbar>
|
<toolbar>
|
||||||
|
|
Loading…
Reference in New Issue