bug #6010: Boleto - Fechamento automático por agência par todas empresas
Descrição: 1.2) Quando houver um fechamento de caixa automático, o usuário deve ser avisado que existem boletos que devem ser impressos para pagamento. 2) Tanto o fechamento automático quanto o feito manualmente devem permitir gerar o boleto de todas as empresas do ponto de venda, gerando um boleto para cada empresa. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@41103 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
41c3162721
commit
5511034344
|
@ -8,6 +8,7 @@ import java.io.IOException;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -46,6 +47,7 @@ import com.rjconsultores.ventaboletos.entidad.Categoria;
|
|||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||
import com.rjconsultores.ventaboletos.entidad.Colonia;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta;
|
||||
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
|
||||
import com.rjconsultores.ventaboletos.entidad.InstiFinanceira;
|
||||
|
@ -75,6 +77,7 @@ import com.rjconsultores.ventaboletos.entidad.UsuarioPerfil;
|
|||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.ColoniaService;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.FechamentoParamptovtaService;
|
||||
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||
import com.rjconsultores.ventaboletos.service.InstiFinanceiraService;
|
||||
import com.rjconsultores.ventaboletos.service.MonedaService;
|
||||
|
@ -91,6 +94,7 @@ import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
|||
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
|
||||
import com.rjconsultores.ventaboletos.service.UsuarioService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.FechamentoParamptovtaListItemRenderer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
@ -157,6 +161,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private PtovtaCatIndService ptovtaCatIndService;
|
||||
@Autowired
|
||||
private UsuarioService usuarioService;
|
||||
@Autowired
|
||||
private FechamentoParamptovtaService fechamentoParamptovtaService;
|
||||
|
||||
private PuntoVenta puntoVenta;
|
||||
private Textbox txtCP;
|
||||
|
@ -173,6 +179,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private MyListbox ptovtaEstoqueList;
|
||||
private MyListbox ptovtaComissaoList;
|
||||
private MyListbox ptovtaCatIndList;
|
||||
private MyListbox fechamentoParamptovtaList;
|
||||
|
||||
private List<Categoria> lsCategoriaBloquear;
|
||||
|
||||
|
@ -229,7 +236,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private Combobox cmbEmpresaComissao;
|
||||
private Combobox cmbEmpresas;
|
||||
private Combobox cmbCategorias;
|
||||
|
||||
private Combobox cmbEmpresaFechamentoParamptovta;
|
||||
private Button btnSalvarFormaPago;
|
||||
private Button btnApagar;
|
||||
private Doublebox txtCargosExtras;
|
||||
|
@ -256,7 +263,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private Datebox dateAntecipData;
|
||||
private MyTextboxDecimal txtAntecipRetem;
|
||||
private MyTextboxDecimal txtAntecipPercentual;
|
||||
|
||||
private Textbox txtIntervalofechamento;
|
||||
private Image img;
|
||||
private Timebox timeboxInicio;
|
||||
private Timebox timeboxFim;
|
||||
|
@ -575,6 +582,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
cmbParada.setText(puntoVenta.getParada().getDescparada());
|
||||
}
|
||||
}
|
||||
|
||||
fechamentoParamptovtaList.setItemRenderer(new FechamentoParamptovtaListItemRenderer());
|
||||
List<FechamentoParamptovta> params = fechamentoParamptovtaService.buscaParametrosPorPuntoventa(puntoVenta);
|
||||
fechamentoParamptovtaList.setData(params);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("Punto de Venta: " + e);
|
||||
Messagebox.show(
|
||||
|
@ -2222,4 +2234,64 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
Labels.getLabel("ededitarPuntoVentaComissaoController.window.title"), args, MODAL);
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnApagarFechamentoParamptovta(Event ev) {
|
||||
try {
|
||||
if (fechamentoParamptovtaList.getSelected() != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPuntoVentaController.MSG.borrarPtoVtaCheckin"),
|
||||
Labels.getLabel("editarPuntoVentaController.window.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
|
||||
FechamentoParamptovta fpp = (FechamentoParamptovta) fechamentoParamptovtaList.getSelected();
|
||||
fechamentoParamptovtaService.borrar(fpp);
|
||||
|
||||
List<FechamentoParamptovta> params = fechamentoParamptovtaService.buscaParametrosPorPuntoventa(puntoVenta);
|
||||
fechamentoParamptovtaList.setData(params);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex.toString());
|
||||
}
|
||||
}
|
||||
public void onClick$btnAdicionarFechamentoParamptovta(Event ev) {
|
||||
if (cmbEmpresaFechamentoParamptovta.getSelectedItem() != null) {
|
||||
Empresa empresa = (Empresa) cmbEmpresaFechamentoParamptovta.getSelectedItem().getValue();
|
||||
|
||||
FechamentoParamptovta fechamentoParamptovta = new FechamentoParamptovta();
|
||||
fechamentoParamptovta.setEmpresa(empresa);
|
||||
fechamentoParamptovta.setPuntoventa(puntoVenta);
|
||||
Integer intervalofechamento = Integer.valueOf(txtIntervalofechamento.getValue());
|
||||
fechamentoParamptovta.setIntervalofechamento(intervalofechamento);
|
||||
|
||||
fechamentoParamptovta.setActivo(true);
|
||||
fechamentoParamptovta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
fechamentoParamptovta.setFecmodif(new Date());
|
||||
|
||||
fechamentoParamptovtaService.suscribir(fechamentoParamptovta);
|
||||
|
||||
List<FechamentoParamptovta> params = fechamentoParamptovtaService.buscaParametrosPorPuntoventa(puntoVenta);
|
||||
fechamentoParamptovtaList.setData(params);
|
||||
}
|
||||
}
|
||||
|
||||
public Textbox getTxtIntervalofechamento() {
|
||||
return txtIntervalofechamento;
|
||||
}
|
||||
|
||||
public void setTxtIntervalofechamento(Textbox txtIntervalofechamento) {
|
||||
this.txtIntervalofechamento = txtIntervalofechamento;
|
||||
}
|
||||
|
||||
public Combobox getCmbEmpresaFechamentoParamptovta() {
|
||||
return cmbEmpresaFechamentoParamptovta;
|
||||
}
|
||||
|
||||
public void setCmbEmpresaFechamentoParamptovta(Combobox cmbEmpresaFechamentoParamptovta) {
|
||||
this.cmbEmpresaFechamentoParamptovta = cmbEmpresaFechamentoParamptovta;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
@ -15,27 +13,14 @@ public class FechamentoParamptovtaListItemRenderer implements ListitemRenderer {
|
|||
|
||||
FechamentoParamptovta params = (FechamentoParamptovta)arg1;
|
||||
|
||||
// private Long FechamentoParamptovtaId;
|
||||
Listcell idCell = new Listcell(params.getFechamentoparamptovtaId().toString());
|
||||
idCell.setParent(listItem);
|
||||
|
||||
// private Empresa empresa;
|
||||
Listcell empresaCell = new Listcell(params.getEmpresa().getNombempresa());
|
||||
empresaCell.setParent(listItem);
|
||||
|
||||
// private String puntoVenta;
|
||||
Listcell puntoventaCell = new Listcell(params.getPuntoventa().getNombpuntoventa());
|
||||
puntoventaCell.setParent(listItem);
|
||||
|
||||
// private Integer intervalofechamento;
|
||||
Listcell intervalofechamento = new Listcell(params.getIntervalofechamento().toString());
|
||||
intervalofechamento.setParent(listItem);
|
||||
|
||||
// private Date fecmodif;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
Listcell fecmodifCell = new Listcell(sdf.format(params.getFecmodif()));
|
||||
fecmodifCell.setParent(listItem);
|
||||
|
||||
listItem.setAttribute("data", params);
|
||||
}
|
||||
|
||||
|
|
|
@ -805,6 +805,7 @@ editarPuntoVentaController.tab.label.localidades = Localidades Permitidas
|
|||
editarPuntoVentaController.tab.label.seguro = Seguro
|
||||
editarPuntoVentaController.tab.label.tipoPassageiroBloqueio = Tipos de boletos bloqueados
|
||||
editarPuntoVentaController.tab.label.usuBancario = Usuarios bancários
|
||||
editarPuntoVentaController.tab.label.fechamentocntcorrente = Fechamento Conta Corrente
|
||||
editarPuntoVentaController.lbCP.value = Cod. Postal
|
||||
editarPuntoVentaController.lblNumPuntoVenda=Número punto de venta
|
||||
editarPuntoVentaController.registroNumPtoVtaExiste = Ya existe un punto de venta con este número
|
||||
|
@ -813,6 +814,12 @@ editarPuntoVentaController.lbCheckStock.value = Validar estoque
|
|||
editarPuntoVentaController.lbVendeSegOpcional.value = Vende seguro opcional
|
||||
editarPuntoVentaController.lbEstanSegOpcional.value = Estan seguro opcional
|
||||
editarPuntoVentaController.label.tipoPassagem = Tipo de boletos
|
||||
# Fechamento Conta Corrente Agencia
|
||||
editarPuntoVentaController.window.title = Fechamento Conta Corrente Agencia
|
||||
editarPuntoVentaController.puntoventa.label = Agencia
|
||||
editarPuntoVentaController.btnPesquisa.label = Pesquisa
|
||||
editarPuntoVentaController.intervalofechamento.label = Intervalo Fechamento(dias)
|
||||
editarPuntoVentaController.fecmodif.label = Ult. Atual.
|
||||
|
||||
# Editar comisión ponto de venta
|
||||
editarPuntoVentaComissaoController.window.title = Comisión empresa/Punto de venta
|
||||
|
|
|
@ -836,6 +836,7 @@ editarPuntoVentaController.tab.label.localidades = Localidades Permitidas
|
|||
editarPuntoVentaController.tab.label.seguro = Seguro
|
||||
editarPuntoVentaController.tab.label.tipoPassageiroBloqueio = Tipos de Passagens Bloqueadas
|
||||
editarPuntoVentaController.tab.label.usuBancario = Usuarios bancários
|
||||
editarPuntoVentaController.tab.label.fechamentocntcorrente = Fechamento Conta Corrente
|
||||
editarPuntoVentaController.lbCP.value = Cod. Postal
|
||||
editarPuntoVentaController.lblNumPuntoVenda=Número Agência
|
||||
editarPuntoVentaController.registroNumPtoVtaExiste = Já existe uma agência com este número
|
||||
|
@ -844,6 +845,13 @@ editarPuntoVentaController.lbCheckStock.value = Validar Estoque
|
|||
editarPuntoVentaController.lbVendeSegOpcional.value = Vende Seguro Opcional
|
||||
editarPuntoVentaController.lbEstanSegOpcional.value = Estan Seguro Opcional
|
||||
editarPuntoVentaController.label.tipoPassagem = Tipo de Passagens
|
||||
# Fechamento Conta Corrente Agencia
|
||||
editarPuntoVentaController.window.title = Fechamento Conta Corrente Agencia
|
||||
editarPuntoVentaController.puntoventa.label = Agencia
|
||||
editarPuntoVentaController.btnPesquisa.label = Pesquisa
|
||||
editarPuntoVentaController.intervalofechamento.label = Intervalo Fechamento(dias)
|
||||
editarPuntoVentaController.fecmodif.label = Ult. Atual.
|
||||
|
||||
|
||||
# Editar comissão ponto de venda
|
||||
editarPuntoVentaComissaoController.window.title = Comissão Empresa/Ponto de Venda
|
||||
|
@ -5033,16 +5041,5 @@ editarFechamentoParamgeralController.MSG.borrarPergunta = Eliminar o Fechamento
|
|||
editarFechamentoParamgeralController.MSG.borrarOK = Fechamento Conta Corrente excluido com Sucesso.
|
||||
|
||||
|
||||
# Búsqueda Fechamento Conta Corrente Agencia
|
||||
busquedaFechamentoParamptovtaController.window.title = Fechamento Conta Corrente Agencia
|
||||
busquedaFechamentoParamptovtaController.empresa.label = Empresa
|
||||
busquedaFechamentoParamptovtaController.puntoventa.label = Agencia
|
||||
busquedaFechamentoParamptovtaController.btnPesquisa.label = Pesquisa
|
||||
busquedaFechamentoParamptovtaController.intervalofechamento.label = Intervalo Fechamento(dias)
|
||||
busquedaFechamentoParamptovtaController.fecmodif.label = Ult. Atual.
|
||||
|
||||
# Editar Fechamento Conta Corrente Agencia
|
||||
editarFechamentoParamptovtaController.window.title = Fechamento Conta Corrente - Editar Parâmetro Agencia
|
||||
editarFechamentoParamptovtaController.MSG.suscribirOK = Fechamento Conta Corrente Agencia gravada com sucesso.
|
||||
editarFechamentoParamptovtaController.MSG.borrarPergunta = Eliminar o Fechamento Conta Corrente Agencia?
|
||||
editarFechamentoParamptovtaController.MSG.borrarOK = Fechamento Conta Corrente Agencia excluido com Sucesso.
|
||||
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
label="${c:l('editarPuntoVentaController.tab.label.seguro')}" />
|
||||
<tab visible="@{winEditarPuntoVenta$composer.validaFuncionTipoBoletoBloqueado}"
|
||||
label="${c:l('editarPuntoVentaController.tab.label.tipoPassageiroBloqueio')}" />
|
||||
<tab
|
||||
label="${c:l('editarPuntoVentaController.tab.label.fechamentocntcorrente')}" />
|
||||
|
||||
</tabs>
|
||||
|
||||
<tabpanels>
|
||||
|
@ -1216,6 +1219,51 @@
|
|||
</listbox>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel>
|
||||
<grid fixedLayout="true">
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPuntoVentaController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresaFechamentoParamptovta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded"
|
||||
buttonVisible="true"
|
||||
model="@{winEditarPuntoVenta$composer.lsEmpresas}"
|
||||
constraint="no empty" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPuntoVentaController.intervalofechamento.label')}" />
|
||||
<textbox id="txtIntervalofechamento"
|
||||
width="190px"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||
constraint="no empty" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
<button id="btnApagarFechamentoParamptovta"
|
||||
height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarEmpresaController.btnApagar.tooltiptext')}" />
|
||||
<button id="btnAdicionarFechamentoParamptovta"
|
||||
height="20" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaEmpresaController.btnNovo.tooltiptext')}" />
|
||||
|
||||
</toolbar>
|
||||
|
||||
<listbox id="fechamentoParamptovtaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="false">
|
||||
|
||||
<listhead sizable="true">
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('editarPuntoVentaController.lbEmpresa.value')}" sort="auto(empresa)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('editarPuntoVentaController.intervalofechamento.label')}" sort="auto(intervalofechamento)"/>
|
||||
|
||||
</listhead>
|
||||
</listbox>
|
||||
</tabpanel>
|
||||
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
|
Loading…
Reference in New Issue