fixes bug#AL-1425

qua:junia
dev:

Criado a função 'ADM > CATALOGO > PUNTO VENTA > PERMITE INSERIR MOTIVO DA INSERCAO/EXCLUSAO DA FORMA DE PAGAMENTO' para ser configurar por perfil
Somente com a função no perfil, será permitido inserir o motivo, na hora de realizar a inserção de forma de pagamento no ponto de venda

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@115540 d1611594-4594-4d17-8e1d-87c2c4800839
master
wallace.novo 2022-11-18 19:59:16 +00:00
parent 68a72ff547
commit ec1cadaca5
10 changed files with 771 additions and 68 deletions

View File

@ -71,6 +71,7 @@ import org.zkoss.zul.Intbox;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Radio;
import org.zkoss.zul.Row;
import org.zkoss.zul.Textbox;
@ -92,6 +93,7 @@ import com.rjconsultores.ventaboletos.entidad.EmpresaContaBancaria;
import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
import com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.HistoricoPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.InstiFinanceira;
import com.rjconsultores.ventaboletos.entidad.Moneda;
@ -159,6 +161,7 @@ import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.FechamentoParamptovtaListItemRenderer;
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.PuntoVendaHistoricoBloqueioListItemRenderer;
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.PuntoVendaHistoricoFormaPagoListItemRenderer;
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintNoEmpty;
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagemAllowNull;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
@ -167,6 +170,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.FormaPagoDetRender;
import com.rjconsultores.ventaboletos.web.utilerias.render.ParamRecoleccionRender;
import com.rjconsultores.ventaboletos.web.utilerias.render.PtovtaAntecipacomissaoRender;
@ -178,6 +183,9 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoriaBloque
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCobrancaAdcPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCobrancaAdcicionalHistorico;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaBloquear;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderFormaPago;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderHistoricoFormaPago;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderHistoricoFormaPagoSelecao;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderParadaPtoVtaCheckin;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtoVtaSeguro;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPtovtaAntifraude;
@ -206,6 +214,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
public static final String FUNCION_TIPO_BOLETO_BLOQUEADO = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.TIPOBOLETOBLOQUEADO";
public static final String FUNCION_COBRANCA_ADICIONAL = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.COBRANCAADICIONAL";
public static final String PERMITE_APENAS_BLQUEIO_DESBLOQUEIO_AGENCIA = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.PERMITEAPENASBLOQUEIODESBLOQUEIOAGENCIA";
public static final String FUNCION_INSERI_MOTIVO_FORMA_PAGO = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.PERMITEINSERIMOTIVOFORMAPAGO";
@Autowired
@ -267,6 +276,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Textbox txtCP;
private MyListbox categoriaList;
private MyListbox puntoVentaList;
private MyListbox puntoVentaHistoricoFormaPagoList;
private MyListbox puntoVentaHistoricoFormaPagoListSel;
private MyListbox paramRecoleccionList;
private MyListbox formaPagoList;
private MyListbox ptovtaEmpresaList;
@ -282,12 +293,14 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private MyListbox fechamentoParamptovtaList;
private MyTextbox txtDiasemtransito;
private MyListbox ptovtaHistoricoList;
private MyListbox ptovtaHistoricoFormaPagoList;
private MyListbox categoriasBloqImpPosteriorList;
private MyListbox empresaContaBancariaList;
private Textbox txtChaveAntifraude;
private MyListbox ptovtaAntifraudeList;
private MyListbox ptovtaExcecaoMultaCancList;
private Bandbox bbCategoria;
private Bandbox bbPesquisaHistoricoFormaPago;
private List<Categoria> lsCategoriaBloquear;
@ -336,10 +349,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Radio radTipoPagamentoBoleto;
private Radio radIndBloquear;
private Radio radIndLiberar;
private Radio radIndInclusaoHistoricoFormaPago;
private Radio radIndEclusaoHistoricoFormaPago;
private Button btnAdicionarEmpresaComissao;
private MyComboboxPuntoVenta cmbPuntoVentaPadre;
private Combobox cmbFormaPago;
private Combobox cmbEmpresaFormaPago;
private Combobox cmbHistoricoEmpresaFormaPago;
private Combobox cmbEmpresa;
private Combobox cmbEmpresaPtoVta;
private Combobox cmbEmpresaPtoVtaUsuarioBancario;
@ -401,11 +417,14 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private MyTextbox dscUsuarioInternet;
private MyTextbox dscContrasenaInternet;
private MyTextbox comentarios;
private MyTextbox txtHistoricoDescPago;
private MyTextboxDecimal importeInicial;
private MyTextboxDecimal importeAdicional;
private Datebox dateAntecipData;
private Datebox dateAbertura;
private Datebox dateFechamento;
private Datebox fecInicioAlteracaoHistoricoFormaPago;
private Datebox fecFimAlteracaoHistoricoFormaPago;
private MyTextboxDecimal txtAntecipRetem;
private MyTextboxDecimal txtAntecipPercentual;
private Image img;
@ -507,6 +526,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Tab tabAnrifraude;
private Tab tabExcecaoMultaCancelamento;
private Tab tabHistorico;
private Paging pagingHistoricoFormaPago;
private Paging pagingFormaPago;
@Autowired
private transient PagedListWrapper<HistoricoFormaPagoPuntoVenta> plwHistoricoFormaPagoPuntoVenta;
@Autowired
private transient PagedListWrapper<FormaPago> plwHistoricoFormaPago;
private Set<Object> lsCategoriaSel;
@ -551,6 +576,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Datebox dataFimHistorico;
private Boolean utilizaCobrancaAdicional = false;
private boolean isPerfilFuncionBloqueiaDesbloqueiaPontoVenda;
private boolean isPermissaoMotivoFormaPago;
@Autowired
private CobrancaAdcPuntoVentaService cobrancaAdcService;
@ -586,6 +613,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception {
setCt(new ConstraintPorcentagemAllowNull());
isPerfilFuncionBloqueiaDesbloqueiaPontoVenda = isPerfilFuncionBloqueiaDesbloqueiaPontoVenda();
isPermissaoMotivoFormaPago = isPermiteInserirMotivoFormaPago();
lsCategoriaSel = new HashSet<Object>();
lsCategoriaBloquear = categoriaService.obtenerTodasCategoriasVisibles();
lsEmpresasBloquear = empresaService.obtenerTodos();
@ -650,6 +678,20 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
ptovtaCatIndList.setItemRenderer(new RenderPtovtaCatInd());
ptovtaHistoricoList.setItemRenderer(new PuntoVendaHistoricoBloqueioListItemRenderer());
categoriasBloqImpPosteriorList.setItemRenderer(new RenderCategoriaBloqueioVendaImpPosterior());
ptovtaHistoricoFormaPagoList.setItemRenderer(new PuntoVendaHistoricoFormaPagoListItemRenderer());
puntoVentaHistoricoFormaPagoListSel.setItemRenderer(new RenderHistoricoFormaPago(new EventListener() {
@Override
public void onEvent(Event arg0) throws Exception {
FormaPago pf = (FormaPago) arg0.getTarget().getAttribute("data");
for (Object formaPago : puntoVentaHistoricoFormaPagoListSel.getListData()) {
if(((FormaPago)formaPago).equals(pf)){
puntoVentaHistoricoFormaPagoListSel.removeItem(pf);
executarPesquisaFormaPagoHistorico();
break;
}
}
}
}));;
cobrancaAdicionalList.addEventListener("onDoubleClick", new EventListener() {
@Override
@ -685,6 +727,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
ptovtaPtoVtaSeguroList.setData(puntoVenta.getPtovtaSeguroList());
ptovtaCatIndList.setData(puntoVenta.getPtovtaCatIndList());
ptovtaHistoricoList.setData(puntoVenta.getHistoricoPuntoVentaList());
ptovtaHistoricoFormaPagoList.setData(puntoVenta.getHistoricoFormaPagoPuntoVentaList());
categoriasBloqImpPosteriorList.setData(puntoVenta.getCategoriaBloqImpPosteriorList());
cobrancaAdicionalList.setData(puntoVenta.getCobrancaAdicionalList());
@ -1015,8 +1058,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
/**
* Desabilita todos os campos deixando apenas o status de aprovação, aberto/fechado.
* Caso adicionar novos campos, favor tratar neste método
* Desabilita todos os campos deixando apenas o status de aprova<EFBFBD><EFBFBD>o, aberto/fechado.
* Caso adicionar novos campos, favor tratar neste m<EFBFBD>todo
*/
private void validaPerfilFuncionBloqueiaDesbloqueiaPontoVenda() {
if(isPerfilFuncionBloqueiaDesbloqueiaPontoVenda) {
@ -1430,7 +1473,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
// try {
// myConn.close();
// } catch (SQLException e) {
// log.error("Erro ao fechar a conexão", e);
// log.error("Erro ao fechar a conex<EFBFBD>o", e);
// }
// }
}
@ -1485,7 +1528,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
myConn.close();
}
} catch (SQLException e) {
log.error("error fechar conexão", e);
log.error("error fechar conex<EFBFBD>o", e);
throw new RuntimeException(e);
}
}
@ -1536,7 +1579,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
try {
myConn.close();
} catch (SQLException e) {
log.error("Erro ao fechar a conexão", e);
log.error("Erro ao fechar a conex<EFBFBD>o", e);
}
}
}
@ -1925,7 +1968,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
for (PtovtaEmpresa emp : lsPtovtaEmpresa) {
if (emp.getActivo()) {
// Contas bancarias (Temporária)
// Contas bancarias (Tempor<EFBFBD>ria)
for (EmpresaContaBancaria ecc : emp.getContasBancaria()) {
if (ecc.getEmpresaContaBancariaId() == null) {
continue;
@ -1953,7 +1996,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
}
// Contas bancárias removidas
// Contas banc<EFBFBD>rias removidas
List<PtovtaEmpresaContaBancaria> excluir = new ArrayList<PtovtaEmpresaContaBancaria>(0);
for (PtovtaEmpresaContaBancaria pto : emp.getLsPtovtaEmpresaContaBancaria()) {
@ -1980,7 +2023,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVenta.setActivo(Boolean.TRUE);
puntoVenta.setFecmodif(Calendar.getInstance().getTime());
puntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
if(!isPermissaoMotivoFormaPago) {
puntoVenta.setLsFormaPagoDet(lsFormaPagoDet);
}
puntoVenta.setLsParamRecoleccion(lsParamRecoleccion);
puntoVenta.setLsPtovtaEmpresa(lsPtovtaEmpresa);
puntoVenta.setLsPtovtaUsuarioBancario(lsPtovtaUsuarioBancario);
@ -2202,7 +2249,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
for (Object object : fechamentoParamptovtaList.getListData()) {
encontrouEmpresaComFechamentoConfigurado = false;
FechamentoParamptovta fechamentoParamptovta = (FechamentoParamptovta) object;
//verifica se empresa já está configurada com fechamento de conta corrente
//verifica se empresa j<EFBFBD> est<73> configurada com fechamento de conta corrente
for(FechamentoParamptovta paramFechamento : paramsFechamento){
if(fechamentoParamptovta.getEmpresa().getEmpresaId() == paramFechamento.getEmpresa().getEmpresaId()){
encontrouEmpresaComFechamentoConfigurado = true;
@ -2213,7 +2260,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
break;
}
}
//Caso não esteja configurada insere no banco
//Caso n<EFBFBD>o esteja configurada insere no banco
if(!encontrouEmpresaComFechamentoConfigurado){
fechamentoParamptovta.setPuntoventa(puntoVenta);
fechamentoParamptovtaService.suscribir(fechamentoParamptovta);
@ -2225,7 +2272,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
boolean removerEmpresa = true;
for(FechamentoParamptovta paramFechamento : paramsFechamento){
removerEmpresa = true;
//Procura por empresas que estão no banco mas não estão na lista
//Procura por empresas que est<EFBFBD>o no banco mas n<>o est<73>o na lista
for (Object object : fechamentoParamptovtaList.getListData()) {
FechamentoParamptovta fechamentoParamptovta = (FechamentoParamptovta) object;
if(paramFechamento.getEmpresa().getEmpresaId() == fechamentoParamptovta.getEmpresa().getEmpresaId()){
@ -2233,7 +2280,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
break;
}
}
//Remove do banco a empresa que não está na lista
//Remove do banco a empresa que n<EFBFBD>o est<73> na lista
if(removerEmpresa){
fechamentoParamptovtaService.borrar(paramFechamento);
}
@ -2252,7 +2299,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
List<Object> empresasFechamento = Arrays.asList(fechamentoParamptovtaList.getData());
boolean validado = false;
try {
//Valida que todas empresas de Fechamento são empresa para venda.
//Valida que todas empresas de Fechamento s<EFBFBD>o empresa para venda.
for (int i = 0; i < empresasVenda.size(); i++) {
PtovtaEmpresa empresaVenda = (PtovtaEmpresa) empresasVenda.get(i);
@ -2314,7 +2361,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVentaService.borrar(puntoVenta);
log.warn("Usuário " + UsuarioLogado.getUsuarioLogado().getNombusuario() + " excluiu o ponto de venda " + puntoVenta.getPuntoventaId());
log.warn("Usu<EFBFBD>rio " + UsuarioLogado.getUsuarioLogado().getNombusuario() + " excluiu o ponto de venda " + puntoVenta.getPuntoventaId());
Messagebox.show(
Labels.getLabel("editarPuntoVentaController.MSG.borrarOK"),
@ -2506,8 +2553,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
public void onClick$btnSalvarFormaPago(Event ev) throws InterruptedException {
cmbFormaPago.getValue();
cmbEmpresaFormaPago.getValue();
isPermissaoMotivoFormaPago = isPermiteInserirMotivoFormaPago();
try {
FormaPago formaPago = new FormaPago();
try {
@ -2538,9 +2589,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
fpd.setActivo(Boolean.TRUE);
fpd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
fpd.setFecmodif(Calendar.getInstance().getTime());
if(isPermissaoMotivoFormaPago) {
abrirMotivoFormaPagamento(fpd, Boolean.TRUE, ((Empresa) cmbEmpresaFormaPago.getSelectedItem().getValue()).getEmpresaId()) ;
}else {
lsFormaPagoDet.add(fpd);
formaPagoList.setData(lsFormaPagoDet);
}
} else {
Messagebox.show(
Labels.getLabel("editarPuntoVentaController.MSG.Achou.FormaPago"),
@ -2561,19 +2616,28 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
Labels.getLabel("editarPuntoVentaController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnApagarFormaPago(Event ev) {
try {
isPermissaoMotivoFormaPago = isPermiteInserirMotivoFormaPago();
FormaPagoDet fpd = (FormaPagoDet) formaPagoList.getSelected();
if (fpd != null) {
fpd.setActivo(Boolean.FALSE);
fpd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
fpd.setFecmodif(Calendar.getInstance().getTime());
if(isPermissaoMotivoFormaPago) {
abrirMotivoFormaPagamento(fpd, Boolean.FALSE, null) ;
}else {
formaPagoList.removeItem(fpd);
lsFormaPagoDet.remove(fpd);
}
}
} catch (Exception ex) {
log.error(ex);
}
@ -3629,7 +3693,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private boolean validaFechamentoParamptovta(FechamentoParamptovta fechamentoParamptovta) {
boolean validado = true;
try {
// Valida Empresa Fechamento já cadastrada.
// Valida Empresa Fechamento j<EFBFBD> cadastrada.
Object[] params = fechamentoParamptovtaList.getData();
for (Object objectData : params) {
@ -3836,7 +3900,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
} catch (Exception e) {
log.error("Erro ao adicionar Exceção Multa Cancelamento", e);
log.error("Erro ao adicionar Exce<EFBFBD><EFBFBD>o Multa Cancelamento", e);
}
}
@ -3954,7 +4018,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
}
} catch (Exception e){
log.error("Erro ao processar remoção Exceção Multa Cancelamento", e);
log.error("Erro ao processar remo<EFBFBD><EFBFBD>o Exce<63><65>o Multa Cancelamento", e);
}
}
@ -4196,6 +4260,22 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public void abrirMotivoFormaPagamento(FormaPagoDet formaPagoDet, Boolean inclusao, Integer empresaId) {
Map args = new HashMap();
args.put("puntoVenta", puntoVenta);
args.put("formaPagoDet", formaPagoDet);
args.put("formaPagoList", formaPagoList);
args.put("ptovtaHistoricoFormaPagoList", ptovtaHistoricoFormaPagoList);
args.put("inclusao", inclusao);
args.put("empresaId", empresaId);
openWindow("/gui/catalogos/editarPuntoVentaMotivoFormaPago.zul", Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.window.title", new String[] { puntoVenta.getNombpuntoventa() }), args, MODAL);
}
private void voltarSelecaoIndBloquear(Boolean isBloquear) {
if(isBloquear) {
@ -4379,7 +4459,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
return false;
} else if(radioSemanal.isSelected()) { //Se escolher semana e não escolher um dia
} else if(radioSemanal.isSelected()) { //Se escolher semana e n<EFBFBD>o escolher um dia
if(!( radioSegunda.isSelected() || radioTerca.isSelected() || radioQuarta.isSelected()
|| radioQuinta.isSelected() || radioSexta.isSelected())) {
Messagebox.show(Labels.getLabel("editarPuntoVentaController.erroSemFrequencia.value"),
@ -4398,7 +4478,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
return false;
}
} catch (Exception e) {
log.error("Erro ao validar a inserção da cobranca adicional no ponto de venda: ", e);
log.error("Erro ao validar a inser<EFBFBD><EFBFBD>o da cobranca adicional no ponto de venda: ", e);
}
return true;
@ -4407,7 +4487,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
public void onClick$btnApagarCobrancaAdicional(Event event) {
try{
int resp = Messagebox.show(
Labels.getLabel("editarPuntoVentaController.MSG.apagarCobrançaAdicional"),
Labels.getLabel("editarPuntoVentaController.MSG.apagarCobran<EFBFBD>aAdicional"),
Labels.getLabel("editarPuntoVentaController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
@ -4488,6 +4568,117 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
return false;
}
@Transactional
public boolean isPermiteInserirMotivoFormaPago() {
Usuario usuarioLogado = usuarioService.obtenerID(UsuarioLogado.getUsuarioLogado().getUsuarioId());
List<UsuarioPerfil> listUsuarioPerfil = usuarioLogado.getUsuarioPerfilList();
for (UsuarioPerfil up : listUsuarioPerfil) {
List<PerfilFuncion> listPerfilFuncion = up.getPerfil().getPerfilFuncionList();
for (PerfilFuncion pf : listPerfilFuncion) {
if(pf.getFuncionSistema().getDescruta().equals(FUNCION_INSERI_MOTIVO_FORMA_PAGO))
return true;
}
}
return false;
}
public void onClick$btnPesquisaHistoricoFormaPago(Event ev) throws InterruptedException {
HibernateSearchObject<HistoricoFormaPagoPuntoVenta> busqueda = new HibernateSearchObject<HistoricoFormaPagoPuntoVenta>(HistoricoFormaPagoPuntoVenta.class, pagingHistoricoFormaPago.getPageSize());
Empresa empresa = (Empresa) cmbHistoricoEmpresaFormaPago.getSelectedItem().getValue();
Integer[] formaPagosIds = new Integer[puntoVentaHistoricoFormaPagoListSel.getSize()];
if (radIndInclusaoHistoricoFormaPago.isChecked()) {
busqueda.addFilterEqual("indInclusao", Boolean.TRUE);
}else if(radIndEclusaoHistoricoFormaPago.isChecked()) {
busqueda.addFilterEqual("indInclusao", Boolean.FALSE);
}
busqueda.addFilterGreaterOrEqual("fecAlteracao", DateUtil.inicioFecha(fecInicioAlteracaoHistoricoFormaPago.getValue()));
busqueda.addFilterLessOrEqual("fecAlteracao", DateUtil.fimFecha(fecFimAlteracaoHistoricoFormaPago.getValue()));
if (empresa != null && empresa.getEmpresaId() != -1) {
busqueda.addFilterEqual("empresaId", empresa.getEmpresaId());
}
@SuppressWarnings({ "unchecked", "rawtypes" })
List<FormaPago> lsFormaPagoSelecionados = new ArrayList(Arrays.asList(puntoVentaHistoricoFormaPagoListSel.getData()));
if (lsFormaPagoSelecionados.size() > 0) {
for (int i = 0; i < lsFormaPagoSelecionados.size(); i++) {
FormaPago formaPago = lsFormaPagoSelecionados.get(i);
formaPagosIds[i] = formaPago.getFormapagoId().intValue();
}
}
busqueda.addFilterEqual("activo", Boolean.TRUE);
if(formaPagosIds.length > 0) {
busqueda.addFilterIn("formaPagoId", Arrays.asList(formaPagosIds));
}
plwHistoricoFormaPagoPuntoVenta.init(busqueda, ptovtaHistoricoFormaPagoList, pagingHistoricoFormaPago);
if (ptovtaHistoricoFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaPuntoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisaFormaPago() {
executarPesquisaFormaPagoHistorico();
}
private void executarPesquisaFormaPagoHistorico() {
HibernateSearchObject<FormaPago> busqueda = new HibernateSearchObject<FormaPago>(FormaPago.class, pagingFormaPago.getPageSize());
busqueda.addFilterILike("descpago", "%" + txtHistoricoDescPago.getValue() + "%");
busqueda.addFilterEqual("activo", Boolean.TRUE);
busqueda.addFilterNotEqual("formapagoId", -1);
busqueda.addSortAsc("descpago");
plwHistoricoFormaPago.init(busqueda, puntoVentaHistoricoFormaPagoList, pagingFormaPago);
puntoVentaHistoricoFormaPagoList.setItemRenderer(new RenderHistoricoFormaPagoSelecao(new EventListener() {
@Override
public void onEvent(Event arg0) throws Exception {
FormaPago pf = (FormaPago) arg0.getTarget().getAttribute("data");
if(arg0.getTarget().getAttribute("tipo").equals(RenderHistoricoFormaPagoSelecao.BOTAO_ADICIONAR_FORMAPAGO)) {
if(puntoVentaHistoricoFormaPagoListSel.getListData().isEmpty()) {
puntoVentaHistoricoFormaPagoListSel.addItemNovo(pf);
}else {
for (Object perfilFuncion : puntoVentaHistoricoFormaPagoListSel.getListData()) {
if(!((FormaPago)perfilFuncion).equals(pf)){
puntoVentaHistoricoFormaPagoListSel.addItemNovo(pf);
break;
}
}
}
puntoVentaHistoricoFormaPagoList.removeItem(pf);
}
}
}));
if (puntoVentaHistoricoFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("relatorioVendasBilheteiroController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
log.error(ex);
}
}
}
public Boolean getUtilizaCobrancaAdicional() {
return utilizaCobrancaAdicional;
}

View File

@ -0,0 +1,148 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.lang.BooleanUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
import com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.service.HistoricoFormaPagoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
/**
*
* @author Wallace
*/
@Controller("editarPuntoVentaMotivoFormaPagoController")
@Scope("prototype")
public class EditarPuntoVentaMotivoFormaPagoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired
private HistoricoFormaPagoPuntoVentaService historicoFormaPagoPuntoVentaService;
private PuntoVenta puntoVenta;
private Integer empresaId;
private Button btnApagar;
private MyTextbox txtMotivo;
private static Logger log = Logger.getLogger(EditarPuntoVentaMotivoFormaPagoController.class);
private MyListbox formaPagoList;
private MyListbox ptovtaHistoricoFormaPagoList;
private FormaPagoDet formaPagoDet;
private Boolean inclusao;
@Autowired
private PuntoVentaService puntoVentaService;
public Button getBtnApagar() {
return btnApagar;
}
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
public PuntoVenta getPuntoVenta() {
return puntoVenta;
}
public void setPuntoVenta(PuntoVenta puntoVenta) {
this.puntoVenta = puntoVenta;
}
public MyTextbox getTxtMotivo() {
return txtMotivo;
}
public void setTxtMotivo(MyTextbox txtMotivo) {
this.txtMotivo = txtMotivo;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
formaPagoDet = (FormaPagoDet) Executions.getCurrent().getArg().get("formaPagoDet");
inclusao = (Boolean) Executions.getCurrent().getArg().get("inclusao");
puntoVenta.setHistoricoFormaPagoPuntoVentaList(new ArrayList<HistoricoFormaPagoPuntoVenta>());
ptovtaHistoricoFormaPagoList = (MyListbox) Executions.getCurrent().getArg().get("ptovtaHistoricoFormaPagoList");
empresaId = (Integer) Executions.getCurrent().getArg().get("empresaId");
txtMotivo.focus();
}
@SuppressWarnings("unchecked")
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtMotivo.getValue();
List<FormaPagoDet> lsFormaPagoDet = null;
if (puntoVenta.getPuntoventaId() == null) {
Messagebox.show(
Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.MSG.puntoVentaNaoCadastrado"),
Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
return;
}
try {
HistoricoFormaPagoPuntoVenta historicoFormaPagoPuntoVenta = new HistoricoFormaPagoPuntoVenta();
historicoFormaPagoPuntoVenta.setMotivo(txtMotivo.getValue());
historicoFormaPagoPuntoVenta.setPuntoVenta(puntoVenta);
historicoFormaPagoPuntoVenta.setFormaPagoId(formaPagoDet.getFormaPago().getFormapagoId().intValue());
historicoFormaPagoPuntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
historicoFormaPagoPuntoVenta.setFecmodif(Calendar.getInstance().getTime());
historicoFormaPagoPuntoVenta.setActivo(Boolean.TRUE);
historicoFormaPagoPuntoVenta.setFecAlteracao(Calendar.getInstance().getTime());
historicoFormaPagoPuntoVenta.setEmpresaId(empresaId != null ? empresaId : formaPagoDet.getEmpresa().getEmpresaId());
puntoVenta.getHistoricoFormaPagoPuntoVentaList().add(historicoFormaPagoPuntoVenta);
if (BooleanUtils.toBoolean(inclusao)) {
historicoFormaPagoPuntoVenta.setIndInclusao(Boolean.TRUE);
formaPagoList.addItemNovo(formaPagoDet);
lsFormaPagoDet = formaPagoList.getListData();
} else {
historicoFormaPagoPuntoVenta.setIndInclusao(Boolean.FALSE);
formaPagoList.removeItem(formaPagoDet);
lsFormaPagoDet = formaPagoList.getListData();
}
puntoVenta.setLsFormaPagoDet(lsFormaPagoDet);
puntoVentaService.actualizacion(puntoVenta);
puntoVenta.setHistoricoFormaPagoPuntoVentaList(historicoFormaPagoPuntoVentaService.obtenerTodosPorPuntoVenta(puntoVenta));
ptovtaHistoricoFormaPagoList.setData(puntoVenta.getHistoricoFormaPagoPuntoVentaList());
Messagebox.show(
Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} catch (Exception ex) {
log.error(ex);
Messagebox.show(Labels.getLabel("MSG.Error"),Labels.getLabel("editarPuntoVentaMotivoFormaPagoController.window.title"),Messagebox.OK, Messagebox.ERROR);
}
}
}

View File

@ -0,0 +1,54 @@
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;
import com.rjconsultores.ventaboletos.dao.FormaPagoDAO;
import com.rjconsultores.ventaboletos.dao.UsuarioDAO;
import com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.Usuario;
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
public class PuntoVendaHistoricoFormaPagoListItemRenderer implements ListitemRenderer {
private UsuarioDAO usuarioDAO;
private FormaPagoDAO formaPagoDAO;
public PuntoVendaHistoricoFormaPagoListItemRenderer() {
usuarioDAO = (UsuarioDAO) AppContext.getApplicationContext().getBean("usuarioDAO");
formaPagoDAO = (FormaPagoDAO) AppContext.getApplicationContext().getBean("formaPagoDAO");
}
@Override
public void render(Listitem lstm, Object o) throws Exception {
HistoricoFormaPagoPuntoVenta h = (HistoricoFormaPagoPuntoVenta) o;
Listcell lc = new Listcell(h.getIndInclusao() != null ? h.getIndInclusao() ? "Inclusão" : "Exclusão" : null);
lc.setParent(lstm);
SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
lc = new Listcell(h.getFecAlteracao() != null ? formato.format(h.getFecAlteracao()) : null);
lc.setParent(lstm);
lc = new Listcell(h.getFormaPagoId() != null ? formaPagoDAO.obtenerID(h.getFormaPagoId().shortValue()).getDescpago() : null);
lc.setParent(lstm);
lc = new Listcell(h.getMotivo());
lc.setParent(lstm);
if(h.getUsuarioId() != null) {
Usuario usuario = usuarioDAO.obtenerID(h.getUsuarioId());
lc = new Listcell(usuario.getNombusuario());
lc.setParent(lstm);
}
lstm.setAttribute("data", lc);
}
}

View File

@ -0,0 +1,49 @@
/**
*
*/
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Button;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
/**
* @author Wallace
*
*/
public class RenderHistoricoFormaPago implements ListitemRenderer {
private EventListener listenerGenerico;
public RenderHistoricoFormaPago(EventListener listenerGenerico) {
super();
this.listenerGenerico = listenerGenerico;
}
public void render(Listitem lstm, Object o) throws Exception {
FormaPago formaPago = (FormaPago) o;
Listcell lc = new Listcell(formaPago.getFormapagoId().toString());
lc.setParent(lstm);
lc = new Listcell(formaPago.getDescpago());
lc.setParent(lstm);
lc = new Listcell();
Button btnRemoverPermissao = new Button();
btnRemoverPermissao.setAttribute("data", o);
btnRemoverPermissao.addEventListener("onClick",listenerGenerico);
btnRemoverPermissao.setImage("/gui/img/remove.png");
lc.appendChild(btnRemoverPermissao);
lc.setParent(lstm);
lstm.setAttribute("data", formaPago);
}
}

View File

@ -0,0 +1,56 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Button;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
/**
*
* @author wallace
*/
public class RenderHistoricoFormaPagoSelecao implements ListitemRenderer {
public static final String BOTAO_ADICIONAR_FORMAPAGO = "btnAdicionarPermissao";
private EventListener listenerGenerico;
public RenderHistoricoFormaPagoSelecao(EventListener listenerGenerico) {
super();
this.listenerGenerico = listenerGenerico;
}
public RenderHistoricoFormaPagoSelecao() {
super();
}
public void render(Listitem lstm, Object o) throws Exception {
FormaPago formaPago = (FormaPago) o;
Listcell lc = new Listcell(formaPago.getFormapagoId().toString());
lc.setParent(lstm);
lc = new Listcell(formaPago.getDescpago());
lc.setParent(lstm);
lc = new Listcell();
Button btnAdicionarPermissao = new Button("");
btnAdicionarPermissao.setAttribute("data", o);
btnAdicionarPermissao.setAttribute("tipo", "btnAdicionarPermissao");
btnAdicionarPermissao.addEventListener("onClick", listenerGenerico);
btnAdicionarPermissao.setImage("/gui/img/add.png");
lc.appendChild(btnAdicionarPermissao);
lc.setParent(lstm);
lstm.setAttribute("data", formaPago);
}
}

View File

@ -518,6 +518,7 @@
<value>com.rjconsultores.ventaboletos.entidad.ConfTotemVentaRapida</value>
<value>com.rjconsultores.ventaboletos.entidad.PtovtaExcecaoMultaCanc</value>
<value>com.rjconsultores.ventaboletos.entidad.RedondeoOrgaoConcedente</value>
<value>com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta</value>
</list>
</property>

View File

@ -1903,6 +1903,21 @@ editarPuntoVentaController.MSG.empresaExcecaoMultaCancNaoInformada = Informe a e
editarPuntoVentaController.MSG.OrgaoConcedenteExcecaoMultaCancNaoInformada = Informe o Órgão Concedente
editarPuntoVentaController.OrgaoConcedente.label=Orgão Concedente
# Aba Historico Forma Pagamento Punto Venta
editarPuntoVentaController.lbTipoMotivo.value = Tipo
editarPuntoVentaController.lbTipoDataInclusao.value = Data
editarPuntoVentaController.lbUsuarioMotivo.value = Usuário
editarPuntoVentaController.lbMotivo.value = Motivo
editarPuntoVentaController.lbFormaPagamento.value = Forma Pagamento
editarPuntoVentaController.label.historicoFormaPago.inclusao = Inclusão
editarPuntoVentaController.label.historicoFormaPago.exclusao = Exclusão
editarPuntoVentaController.label.historicoFormaPago.todos = Todos
editarPuntoVentaController.lbDataInicioHistoricoFormaPago.value = Fechor Inicial
editarPuntoVentaController.lbDataFinalHistoricoFormaPago.value = Fechor Final
editarPuntoVentaController.lbPeriodo.value = Período
editarPuntoVentaController.lbIdFormaPagoHistoricoFormaPago.value=ID
editarPuntoVentaController.lbFormaPagoFormaPagoHistoricoFormaPago.value=Forma Pagamento
# Editar comisión ponto de venta
editarPuntoVentaComissaoController.window.title = Comisión empresa/Punto de venta - {0}
editarPuntoVentaComissaoController.MSG.suscribirOK = Comisión de la empresa/Punto de venta se registró exitosamente
@ -1926,6 +1941,13 @@ editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro1.value = 1- Informa
editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro2.value = 2- Marcando Seguro en los campos Composición de ingresos de BPR o Composición de retorno.
editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro3.value = *Solo se debe elegir una de las opciones.
# Editar Motivo Forma Pago Ponto de venda
editarPuntoVentaMotivoFormaPagoController.window.title = Motivo Inserção/Exclusão Forma de Pagamento
editarPuntoVentaMotivoFormaPagoController.lhMovito.label = Motivo
editarPuntoVentaMotivoFormaPagoController.lhMovito.label = Motivo
editarPuntoVentaMotivoFormaPagoController.MSG.suscribirOK = Motivo Registrado com Sucesso.
editarPuntoVentaMotivoFormaPagoController.MSG.puntoVentaNaoCadastrado = Não existe ponto de venda cadastrado para vincular o motivo da inclusão/exclusão. Por favor, realize o cadastro do ponto de venda primeiro e volte para inserir as formas de pagamento.
# Muestra o TipoVenta Búsqueda
busquedaTipoVentaController.window.title = Modalidad de venta
busquedaTipoVentaController.btnRefresh.tooltiptext = Actualizar

View File

@ -2066,6 +2066,7 @@ editarPuntoVentaController.label.fecIntegracion=Data
editarPuntoVentaController.tab.label.integracao=Integracao
editarPuntoVentaController.tab.label.integracaoag = Integração AG
editarPuntoVentaController.tab.label.historico = Histórico Bloqueio
editarPuntoVentaController.tab.label.historicoFormapago = Histórico Forma Pagamento
editarPuntoVentaController.tab.label.bloqueiaVendaImpPosterior = Venda Imp. Posterior
editarPuntoVentaController.label.bloqueiaVendaImpPosterior = Bloqueia Venda Impressão Posterior para o tipo de passagem
editarPuntoVentaController.btnAddCategoriaBloqueioImpPosterior.tooltiptext = Adiciona Categoria bloqueada para venda com impressão posterior
@ -2098,6 +2099,22 @@ editarPuntoVentaController.lbComportamentoAbaTipoPassagem.mensagemAlerta.value=A
editarPuntoVentaController.MSG.empresaOrgaoExcecaoMultaCancJaCadastrada = Empresa e Órgão Condente informados já cadastrados
editarPuntoVentaController.MSG.borrarChaveExcecaoMultaCancJaCadastrada = Deseja eliminar a Exceção de Multa Cancelamento para Empresa: {0} e Órgão Condente: {1} ?
# Aba Historico Forma Pagamento Punto Venta
editarPuntoVentaController.lbTipoMotivo.value = Tipo
editarPuntoVentaController.lbTipoDataInclusao.value = Data
editarPuntoVentaController.lbUsuarioMotivo.value = Usuário
editarPuntoVentaController.lbMotivo.value = Motivo
editarPuntoVentaController.lbFormaPagamento.value = Forma Pagamento
editarPuntoVentaController.label.historicoFormaPago.inclusao = Inclusão
editarPuntoVentaController.label.historicoFormaPago.exclusao = Exclusão
editarPuntoVentaController.label.historicoFormaPago.todos = Todos
editarPuntoVentaController.lbDataInicioHistoricoFormaPago.value = Data Inicial
editarPuntoVentaController.lbDataFinalHistoricoFormaPago.value = Data Final
editarPuntoVentaController.lbPeriodo.value = Período
editarPuntoVentaController.lbIdFormaPagoHistoricoFormaPago.value=ID
editarPuntoVentaController.lbFormaPagoFormaPagoHistoricoFormaPago.value=Forma Pagamento
editarPuntoVentaController.lbCheckDinheiro.value=R$
editarPuntoVentaController.lbCheckCredito.value=CC
editarPuntoVentaController.lbCheckDebito.value=CD
@ -2170,6 +2187,13 @@ editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro1.value = 1- Informa
editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro2.value = 2- Marcando Seguro nos campos Composição da Receita de BPR ou Composição da Devolução.
editarPuntoVentaComissaoController.MSG.lblInfoComissaoSeguro3.value = *Somente 1 das opções deverá ser escolhida.
# Editar Motivo Forma Pago Ponto de venda
editarPuntoVentaMotivoFormaPagoController.window.title = Motivo Inserção/Exclusão Forma de Pagamento
editarPuntoVentaMotivoFormaPagoController.lhMovito.label = Motivo
editarPuntoVentaMotivoFormaPagoController.lhMovito.label = Motivo
editarPuntoVentaMotivoFormaPagoController.MSG.suscribirOK = Motivo Registrado com Sucesso.
editarPuntoVentaMotivoFormaPagoController.MSG.puntoVentaNaoCadastrado = Não existe ponto de venda cadastrado para vincular o motivo da inclusão/exclusão. Por favor, realize o cadastro do ponto de venda primeiro e volte para inserir as formas de pagamento.
# Muestra o TipoVenta Pesquisa
busquedaTipoVentaController.window.title = Modalidade de Venda
busquedaTipoVentaController.btnRefresh.tooltiptext = Atualizar

View File

@ -99,6 +99,9 @@
<tab
id="tabHistorico"
label="${c:l('editarPuntoVentaController.tab.label.historico')}" />
<tab
id="tabHistoricoFormaPago"
label="${c:l('editarPuntoVentaController.tab.label.historicoFormapago')}" />
<tab
id="tabBloqueiaVendaImpPosterior"
label="${c:l('editarPuntoVentaController.tab.label.bloqueiaVendaImpPosterior')}" />
@ -2271,6 +2274,123 @@
</listhead>
</listbox>
</tabpanel>
<!-- DADOS HISTORICO FORMA PAGO -->
<tabpanel>
<grid fixedLayout="true">
<columns>
<column width="25%" />
<column width="75%" />
</columns>
<rows>
<row spans="1,3">
<label
value="${c:l('editarPuntoVentaController.lbTipoMotivo.value')}" />
<radiogroup Id="rgIndInclusao">
<radio id="radIndInclusaoHistoricoFormaPago"
label="${c:l('editarPuntoVentaController.label.historicoFormaPago.inclusao')}" />
<radio id="radIndEclusaoHistoricoFormaPago"
label="${c:l('editarPuntoVentaController.label.historicoFormaPago.exclusao')}" />
<radio id="radTodos"
label="${c:l('editarPuntoVentaController.label.historicoFormaPago.todos')}" checked="true"/>
</radiogroup>
</row>
<row spans="1,3">
<label id="lblFormaPago1" value="${c:l('editarFormaPagoController.lbNome.value')}" />
<bandbox id="bbPesquisaHistoricoFormaPago" width="100%"
mold="rounded" readonly="true">
<bandpopup>
<vbox>
<hbox>
<label
value="${c:l('editarPuntoVentaController.lbFormaPagoFormaPagoHistoricoFormaPago.value')}" />
<textbox id="txtHistoricoDescPago"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
width="300px" mold="rounded" />
<button id="btnPesquisaFormaPago"
image="/gui/img/find.png"
label="${c:l('relatorioLinhaOperacionalController.btnPesquisa.label')}" />
</hbox>
<paging id="pagingFormaPago"
pageSize="10" />
<listbox id="puntoVentaHistoricoFormaPagoList"
mold="paging"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" height="100%" width="700px">
<listhead>
<listheader width="20%" label="${c:l('editarPuntoVentaController.lbIdFormaPagoHistoricoFormaPago.value')}" />
<listheader width="74%" label="${c:l('editarPuntoVentaController.lbFormaPagoFormaPagoHistoricoFormaPago.value')}" />
<listheader align="center" label=" " width="6%" />
</listhead>
</listbox>
</vbox>
</bandpopup>
</bandbox>
</row>
<row spans="4">
<listbox id="puntoVentaHistoricoFormaPagoListSel" mold="paging"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" height="80px" width="100%">
<listhead>
<listheader
label="${c:l('editarPuntoVentaController.lbIdFormaPagoHistoricoFormaPago.value')}" />
<listheader width="35%"
label="${c:l('editarPuntoVentaController.lbFormaPagoFormaPagoHistoricoFormaPago.value')}" />
<listheader width="15%" />
</listhead>
</listbox>
<paging id="pagingSelPuntoVenta" pageSize="10" />
</row>
<row>
<label value="${c:l('editarPuntoVentaController.lbEmpresa.value')}" />
<combobox id="cmbHistoricoEmpresaFormaPago"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true"
width="65%"
model="@{winEditarPuntoVenta$composer.lsEmpresas}" />
</row>
<row spans="1,3">
<label
value="${c:l('editarPuntoVentaController.lbPeriodo.value')}" />
<hlayout>
<label
value="${c:l('editarPuntoVentaController.lbDataInicioHistoricoFormaPago.value')}"/>
<datebox id="fecInicioAlteracaoHistoricoFormaPago" width="105px" constraint="no empty"
mold="rounded" format="dd/MM/yyyy" maxlength="10" />
<label
value="${c:l('editarPuntoVentaController.lbDataFinalHistoricoFormaPago.value')}" />
<datebox id="fecFimAlteracaoHistoricoFormaPago" width="105px" constraint="no empty"
mold="rounded" format="dd/MM/yyyy" maxlength="10" />
</hlayout>
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisaHistoricoFormaPago" image="/gui/img/find.png"
label="${c:l('busquedaPuntoVentaController.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingHistoricoFormaPago" pageSize="10" />
<listbox id="ptovtaHistoricoFormaPagoList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false">
<listhead sizable="true">
<listheader id="lhHistoricoFormapago" width="65px"
image="/gui/img/create_doc.gif"
label="${c:l('editarPuntoVentaController.lbTipoMotivo.value')}" />
<listheader id="lhDataAberturaFormago" width="70px"
image="/gui/img/create_doc.gif"
label="${c:l('editarPuntoVentaController.lbTipoDataInclusao.value')}" />
<listheader id="lhFormapago" width="150px"
image="/gui/img/create_doc.gif"
label="${c:l('editarPuntoVentaController.lbFormaPagamento.value')}" />
<listheader id="lhMotivoFormapago"
image="/gui/img/create_doc.gif"
label="${c:l('editarPuntoVentaController.lbMotivo.value')}" />
<listheader id="lhUsuarioBloqueioFormapago" width="75px"
image="/gui/img/create_doc.gif"
label="${c:l('editarPuntoVentaController.lbUsuarioMotivo.value')}" />
</listhead>
</listbox>
</tabpanel>
<!-- BLOQUEIA VENDA IMPRESSÃO POSTERIOR -->
<tabpanel height="400px">
<grid fixedLayout="true">

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPuntoVentaMotivoFormaPago"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarPuntoVentaMotivoFormaPago" border="normal"
apply="${editarPuntoVentaMotivoFormaPagoController}"
width="650px" height="457x" contentStyle="overflow:auto"
title="${c:l('editarPuntoVentaMotivoFormaPagoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('winEditarPuntoVentaMotivoFormaPago.btnSalvar.tooltiptext')}"/>
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
onClick="winEditarPuntoVentaMotivoFormaPago.detach()"
tooltiptext="${c:l('editarPuntoVentaMotivoFormaPagoController.btnFechar.tooltiptext')}"/>
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label id="lbMotivo" value="${c:l('editarPuntoVentaMotivoFormaPagoController.lhMovito.label')}"/>
<textbox id="txtMotivo" constraint="no empty" width="90%" maxlength="100"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
</rows>
</grid>
</window>
</zk>