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;
|
||||
|
||||
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);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
|
@ -47,7 +47,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
|||
Usuario usuario = (Usuario) parametros.get("USUARIO");
|
||||
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 {
|
||||
stmt = new NamedParameterStatement(conexao, sql);
|
||||
|
@ -117,7 +117,7 @@ public class RelatorioVendasCartoes extends Relatorio {
|
|||
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();
|
||||
|
||||
|
@ -158,12 +158,16 @@ public class RelatorioVendasCartoes extends Relatorio {
|
|||
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') ");
|
||||
} 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') ");
|
||||
} 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)");
|
||||
|
|
|
@ -14,12 +14,12 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
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.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
|
@ -43,7 +43,9 @@ public class RelatorioVendasCartoesController extends MyGenericForwardComposer {
|
|||
private MyComboboxEstacion cmbEstacion;
|
||||
private MyComboboxUsuario cmbUsuario;
|
||||
private List<Empresa> lsEmpresa;
|
||||
|
||||
|
||||
private Radio radioDataVenda;
|
||||
|
||||
@Autowired
|
||||
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("FILTROS", filtro.toString());
|
||||
Relatorio relatorio = new RelatorioVendasCartoes(parametros, dataSourceRead.getConnection());
|
||||
Relatorio relatorio = new RelatorioVendasCartoes(parametros, dataSourceRead.getConnection(), radioDataVenda.isSelected());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
@ -170,4 +172,11 @@ public class RelatorioVendasCartoesController extends MyGenericForwardComposer {
|
|||
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.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
|
||||
|
||||
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.lbDatFinal.value = Data Final
|
||||
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
|
||||
relatorioVendasPTAController.window.title = Relatório de Vendas PTA
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioVendasCartoes"
|
||||
apply="${relatorioVendasCartoesController}"
|
||||
contentStyle="overflow:auto" height="220px" width="600px"
|
||||
contentStyle="overflow:auto" height="250px" width="600px"
|
||||
border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<datebox id="datFinal" width="100%" mold="rounded"
|
||||
format="dd/MM/yyyy" constraint="no empty" maxlength="10" />
|
||||
</row>
|
||||
<row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasCartoesController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa" buttonVisible="true"
|
||||
|
@ -35,27 +35,35 @@
|
|||
model="@{winFiltroRelatorioVendasCartoes$composer.lsEmpresa}"
|
||||
constraint="no empty" width="100%" />
|
||||
</row>
|
||||
<row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasCartoesController.lb.puntoVenta.value')}" />
|
||||
<combobox id="cmbPuntoVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="100%" mold="rounded" buttonVisible="true" />
|
||||
</row>
|
||||
<row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasCartoesController.lb.estacao.value')}" />
|
||||
<combobox id="cmbEstacion"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion"
|
||||
width="100%" mold="rounded" buttonVisible="true" />
|
||||
</row>
|
||||
<row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasCartoesController.lb.usuario.value')}" />
|
||||
<combobox id="cmbUsuario"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario"
|
||||
mold="rounded" buttonVisible="true" width="100%" />
|
||||
</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>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue