From ec1cadaca57210d4400daa086c39025b3b2e4eac Mon Sep 17 00:00:00 2001 From: "wallace.novo" Date: Fri, 18 Nov 2022 19:59:16 +0000 Subject: [PATCH] fixes bug#AL-1425 qua:junia dev: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../catalogos/EditarPuntoVentaController.java | 327 ++++++++++++++---- ...arPuntoVentaMotivoFormaPagoController.java | 148 ++++++++ ...ndaHistoricoFormaPagoListItemRenderer.java | 54 +++ .../render/RenderHistoricoFormaPago.java | 49 +++ .../RenderHistoricoFormaPagoSelecao.java | 56 +++ src/java/spring-config.xml | 1 + web/WEB-INF/i3-label_es_MX.label | 22 ++ web/WEB-INF/i3-label_pt_BR.label | 24 ++ web/gui/catalogos/editarPuntoVenta.zul | 120 +++++++ .../editarPuntoVentaMotivoFormaPago.zul | 38 ++ 10 files changed, 771 insertions(+), 68 deletions(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaMotivoFormaPagoController.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/PuntoVendaHistoricoFormaPagoListItemRenderer.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPago.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPagoSelecao.java create mode 100644 web/gui/catalogos/editarPuntoVentaMotivoFormaPago.zul diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java index 040b47f21..82f768024 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java @@ -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 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 plwHistoricoFormaPagoPuntoVenta; + @Autowired + private transient PagedListWrapper plwHistoricoFormaPago; private Set 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(); 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��o, aberto/fechado. + * Caso adicionar novos campos, favor tratar neste m�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�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�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�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�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�rias removidas List excluir = new ArrayList(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()); - puntoVenta.setLsFormaPagoDet(lsFormaPagoDet); + + 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� est� 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�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�o no banco mas n�o est�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�o est� na lista if(removerEmpresa){ fechamentoParamptovtaService.borrar(paramFechamento); } @@ -2252,7 +2299,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { List 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�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�rio " + UsuarioLogado.getUsuarioLogado().getNombusuario() + " excluiu o ponto de venda " + puntoVenta.getPuntoventaId()); Messagebox.show( Labels.getLabel("editarPuntoVentaController.MSG.borrarOK"), @@ -2506,73 +2553,90 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { } public void onClick$btnSalvarFormaPago(Event ev) throws InterruptedException { + cmbFormaPago.getValue(); cmbEmpresaFormaPago.getValue(); - try { - FormaPago formaPago = new FormaPago(); + + isPermissaoMotivoFormaPago = isPermiteInserirMotivoFormaPago(); + try { - formaPago = (FormaPago) cmbFormaPago.getSelectedItem().getValue(); - Boolean achou = Boolean.FALSE; - Empresa empresa = (Empresa) cmbEmpresaFormaPago.getSelectedItem().getValue(); - if (formaPago != null) { - for (FormaPagoDet fpd : lsFormaPagoDet) { - if (fpd.getFormaPago().equals(formaPago) && empresa.equals(fpd.getEmpresa())) { - achou = Boolean.TRUE; + FormaPago formaPago = new FormaPago(); + try { + formaPago = (FormaPago) cmbFormaPago.getSelectedItem().getValue(); + Boolean achou = Boolean.FALSE; + Empresa empresa = (Empresa) cmbEmpresaFormaPago.getSelectedItem().getValue(); + if (formaPago != null) { + for (FormaPagoDet fpd : lsFormaPagoDet) { + if (fpd.getFormaPago().equals(formaPago) && empresa.equals(fpd.getEmpresa())) { + achou = Boolean.TRUE; + } + } + if (!achou) { + FormaPagoDet fpd = new FormaPagoDet(); + /* + * Mantis #6874 fpd.setCargosextras(new BigDecimal(txtCargosExtras.getValue())); + */ + fpd.setCargosextras(BigDecimal.ZERO); + fpd.setFormaPago(formaPago); + fpd.setPuntoVenta(puntoVenta); + fpd.setIndTotalBus(checkPtoVtaEmpresaIndTotalBus.isChecked()); + fpd.setIndEmbarcada(checkPtoVtaEmpresaIndEmbarcada.isChecked()); + + if (cmbEmpresaFormaPago.getSelectedItem() != null) { + fpd.setEmpresa(empresa); + } + + 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"), + Labels.getLabel("editarPuntoVentaController.window.title"), + Messagebox.OK, Messagebox.EXCLAMATION); } } - if (!achou) { - FormaPagoDet fpd = new FormaPagoDet(); - /* - * Mantis #6874 fpd.setCargosextras(new BigDecimal(txtCargosExtras.getValue())); - */ - fpd.setCargosextras(BigDecimal.ZERO); - fpd.setFormaPago(formaPago); - fpd.setPuntoVenta(puntoVenta); - fpd.setIndTotalBus(checkPtoVtaEmpresaIndTotalBus.isChecked()); - fpd.setIndEmbarcada(checkPtoVtaEmpresaIndEmbarcada.isChecked()); - - if (cmbEmpresaFormaPago.getSelectedItem() != null) { - fpd.setEmpresa(empresa); - } - - fpd.setActivo(Boolean.TRUE); - fpd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); - fpd.setFecmodif(Calendar.getInstance().getTime()); - - lsFormaPagoDet.add(fpd); - formaPagoList.setData(lsFormaPagoDet); - } else { - Messagebox.show( - Labels.getLabel("editarPuntoVentaController.MSG.Achou.FormaPago"), - Labels.getLabel("editarPuntoVentaController.window.title"), - Messagebox.OK, Messagebox.EXCLAMATION); - } + } catch (Exception e) { + Messagebox.show( + Labels.getLabel("editarPuntoVentaController.MSG.formaDePago"), + Labels.getLabel("editarPuntoVentaController.window.title"), + Messagebox.OK, Messagebox.EXCLAMATION); } - } catch (Exception e) { + } catch (Exception ex) { + log.error(ex); Messagebox.show( - Labels.getLabel("editarPuntoVentaController.MSG.formaDePago"), + Labels.getLabel("MSG.Error"), Labels.getLabel("editarPuntoVentaController.window.title"), - Messagebox.OK, Messagebox.EXCLAMATION); + Messagebox.OK, Messagebox.ERROR); } - } catch (Exception ex) { - log.error(ex); - Messagebox.show( - Labels.getLabel("MSG.Error"), - 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); + } - 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� 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��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��o Exce��o Multa Cancelamento", e); } } @@ -4195,6 +4259,22 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { e.printStackTrace(); } } + + @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) { @@ -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�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��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�aAdicional"), Labels.getLabel("editarPuntoVentaController.window.title"), Messagebox.YES | Messagebox.NO, Messagebox.QUESTION); @@ -4487,6 +4567,117 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { return false; } + + @Transactional + public boolean isPermiteInserirMotivoFormaPago() { + + Usuario usuarioLogado = usuarioService.obtenerID(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + List listUsuarioPerfil = usuarioLogado.getUsuarioPerfilList(); + for (UsuarioPerfil up : listUsuarioPerfil) { + List 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 busqueda = new HibernateSearchObject(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 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 busqueda = new HibernateSearchObject(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; diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaMotivoFormaPagoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaMotivoFormaPagoController.java new file mode 100644 index 000000000..a4e8cd565 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaMotivoFormaPagoController.java @@ -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()); + 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 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); + } + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/PuntoVendaHistoricoFormaPagoListItemRenderer.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/PuntoVendaHistoricoFormaPagoListItemRenderer.java new file mode 100644 index 000000000..df27c3958 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/PuntoVendaHistoricoFormaPagoListItemRenderer.java @@ -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); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPago.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPago.java new file mode 100644 index 000000000..62572d24c --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPago.java @@ -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); + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPagoSelecao.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPagoSelecao.java new file mode 100644 index 000000000..e6daf9b5b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderHistoricoFormaPagoSelecao.java @@ -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); + } +} diff --git a/src/java/spring-config.xml b/src/java/spring-config.xml index dad2cce4a..e3a077535 100644 --- a/src/java/spring-config.xml +++ b/src/java/spring-config.xml @@ -518,6 +518,7 @@ com.rjconsultores.ventaboletos.entidad.ConfTotemVentaRapida com.rjconsultores.ventaboletos.entidad.PtovtaExcecaoMultaCanc com.rjconsultores.ventaboletos.entidad.RedondeoOrgaoConcedente + com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 71847430e..acb5feb27 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -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 diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 87191e5b0..a59220d37 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -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 diff --git a/web/gui/catalogos/editarPuntoVenta.zul b/web/gui/catalogos/editarPuntoVenta.zul index 9a512207a..b059b1a87 100644 --- a/web/gui/catalogos/editarPuntoVenta.zul +++ b/web/gui/catalogos/editarPuntoVenta.zul @@ -99,6 +99,9 @@ + @@ -2271,6 +2274,123 @@ + + + + + + + + + + + +