From 768810390996b4790ba98c34e60049f6e81d77ef Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 15 Jun 2023 20:32:00 -0300 Subject: [PATCH] bug#AL-2574 --- pom.xml | 6 ++-- .../catalogos/EditarFormaPagoController.java | 33 +++++++++++++++++++ web/WEB-INF/i3-label_en.label | 3 ++ web/WEB-INF/i3-label_es_MX.label | 3 ++ web/WEB-INF/i3-label_pt_BR.label | 3 ++ web/gui/catalogos/editarFormaPago.zul | 13 ++++++++ 6 files changed, 58 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index bd6b5cd58..da2fe3f04 100644 --- a/pom.xml +++ b/pom.xml @@ -4,12 +4,12 @@ 4.0.0 br.com.rjconsultores ventaboletosadm - 1.7.15 + 1.7.16 war - 1.5.3 - 1.4.2 + 1.5.4 + 1.4.3 UTF-8 UTF-8 diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarFormaPagoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarFormaPagoController.java index 1bd81bd89..e1be02576 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarFormaPagoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarFormaPagoController.java @@ -79,10 +79,12 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { private boolean exibeTipoRestricaoFormaPago; private Checkbox chkIndEstorno; + private Checkbox chkAtivaEstornoReceitaDespesaCredito; private Checkbox chkIndVoucherRodoviaria; private Row rowIdEventoExtra; + private Row rowAtivaEstornoReceitaDespesaCredito; private MyComboboxEstandar cmbTipoFormapago; private MyComboboxEstandar cmbTipoCarteiraDigital; @@ -150,6 +152,7 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { } chkIndEstorno.setChecked(formaPago.getIndProcessoEstorno()); + chkAtivaEstornoReceitaDespesaCredito.setChecked(formaPago.getIndEstornoReceitaDespesaCredito()); chkIndVoucherRodoviaria.setChecked(formaPago.getIndVoucherRodoviaria()); chkIndTransferenciaReativacao.setChecked(formaPago.getIndTransferenciaReativacao()); @@ -177,6 +180,10 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { rowIdEventoExtra.setVisible(formaPago.getIndProcessoEstorno()); } + if(formaPago != null) { + rowAtivaEstornoReceitaDespesaCredito.setVisible(formaPago.getIndEstornoReceitaDespesaCredito()); + } + if(formaPago.getTipoCarteiraDigital() != null) { cmbTipoCarteiraDigital.setValue(formaPago.getTipoCarteiraDigital().toString()); } @@ -237,6 +244,7 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { cmbTipoCarteiraDigital.setVisible(false); lblTipoCarteiraDigital.setVisible(false); rowIdEventoExtra.setVisible(chkIndEstorno.isChecked()); + rowAtivaEstornoReceitaDespesaCredito.setVisible(chkAtivaEstornoReceitaDespesaCredito.isChecked()); if(cmbTipoFormapago!=null && cmbTipoFormapago.getSelectedItem() != null) { TipoFormapago tipoFormaPagoEscolhido = ((TipoFormapago) cmbTipoFormapago.getSelectedItem().getValue()); @@ -305,8 +313,13 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { if(!chkIndEstorno.isChecked()) { formaPago.setTipoEventoExtraId(null); } + + if(!chkAtivaEstornoReceitaDespesaCredito.isChecked()) { + formaPago.setTipoEventoExtraIdCredito(null); + } formaPago.setIndProcessoEstorno(chkIndEstorno.isChecked()); + formaPago.setIndEstornoReceitaDespesaCredito(chkAtivaEstornoReceitaDespesaCredito.isChecked()); formaPago.setIndVoucherRodoviaria(chkIndVoucherRodoviaria.isChecked()); formaPago.setIndTransferenciaReativacao(chkIndTransferenciaReativacao.isChecked()); if(radioPor.isChecked()) { @@ -522,6 +535,26 @@ public class EditarFormaPagoController extends MyGenericForwardComposer { rowIdEventoExtra.setVisible(chkIndEstorno.isChecked()); } + public void onClick$chkAtivaEstornoReceitaDespesaCredito(Event event) { + rowAtivaEstornoReceitaDespesaCredito.setVisible(chkAtivaEstornoReceitaDespesaCredito.isChecked()); + } + + public Checkbox getChkAtivaEstornoReceitaDespesaCredito() { + return chkAtivaEstornoReceitaDespesaCredito; + } + + public void setChkAtivaEstornoReceitaDespesaCredito(Checkbox chkAtivaEstornoReceitaDespesaCredito) { + this.chkAtivaEstornoReceitaDespesaCredito = chkAtivaEstornoReceitaDespesaCredito; + } + + public Row getRowAtivaEstornoReceitaDespesaCredito() { + return rowAtivaEstornoReceitaDespesaCredito; + } + + public void setRowAtivaEstornoReceitaDespesaCredito(Row rowAtivaEstornoReceitaDespesaCredito) { + this.rowAtivaEstornoReceitaDespesaCredito = rowAtivaEstornoReceitaDespesaCredito; + } + public void onClick$radioPor(Event ev) { rowPercentualDesconto.setVisible(true); rowValorDesconto.setVisible(false); diff --git a/web/WEB-INF/i3-label_en.label b/web/WEB-INF/i3-label_en.label index 387dcba18..85253452b 100644 --- a/web/WEB-INF/i3-label_en.label +++ b/web/WEB-INF/i3-label_en.label @@ -1418,10 +1418,13 @@ editarFormaPagoController.lblTPI.label=TPI editarFormaPagoController.lblMobiPix.label=MobiPix editarFormaPagoController.lblAdyen.label=Adyen editarFormaPagoController.lblMercadoPago.label=Mercado Pago +editarFormaPagoController.lblEmbarqueJa.label=Embarque Já editarFormaPagoController.lblAtivaProcessoEstorno.label=Ativa processo de estorno editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação editarFormaPagoController.lblEventoExtra.label=ID Tipo Evento Extra Estorno +editarFormaPagoController.lblEstornoReceitaDespesaCredito.label=Use reversal with income / expense +editarFormaPagoController.lblTipoEventoExtraCredito.label=Extra Credit Event Type ID editarFormaPagoController.MSG.tipoCarteiraDigital.label=Informe o tipo da Tipo Carteira Digital editarFormaPagoController.lblTipoCarteiraDigital.label=Tipo Carteira Digital diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 4ee9c7ed1..1d7738c57 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -1242,10 +1242,13 @@ editarFormaPagoController.lblTPI.label=TPI editarFormaPagoController.lblMobiPix.label=MobiPix editarFormaPagoController.lblAdyen.label=Adyen editarFormaPagoController.lblMercadoPago.label=Mercado Pago +editarFormaPagoController.lblEmbarqueJa.label=Embarque Já editarFormaPagoController.lblAtivaProcessoEstorno.label=Activa el proceso de contracargo editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação editarFormaPagoController.lblEventoExtra.label=ID Tipo Evento Extra Estorno +editarFormaPagoController.lblEstornoReceitaDespesaCredito.label=Activa el uso con ingresos/gastos +editarFormaPagoController.lblTipoEventoExtraCredito.label=ID de tipo de evento de crédito adicional editarFormaPagoController.MSG.tipoCarteiraDigital.label=Informe o tipo da Tipo Carteira Digital editarFormaPagoController.lblTipoCarteiraDigital.label=Tipo Carteira Digital diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index aaa07a045..7c97ab975 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -1420,10 +1420,13 @@ editarFormaPagoController.lblTPI.label=TPI editarFormaPagoController.lblMobiPix.label=MobiPix editarFormaPagoController.lblAdyen.label=Adyen editarFormaPagoController.lblMercadoPago.label=Mercado Pago +editarFormaPagoController.lblEmbarqueJa.label=Embarque Já editarFormaPagoController.lblAtivaProcessoEstorno.label=Ativa processo de estorno editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação editarFormaPagoController.lblEventoExtra.label=ID Tipo Evento Extra Estorno +editarFormaPagoController.lblEstornoReceitaDespesaCredito.label=Utiliza estorno com receita / despesa +editarFormaPagoController.lblTipoEventoExtraCredito.label=ID Tipo Evento Extra Crédito editarFormaPagoController.MSG.tipoCarteiraDigital.label=Informe o tipo da Tipo Carteira Digital editarFormaPagoController.lblTipoCarteiraDigital.label=Tipo Carteira Digital diff --git a/web/gui/catalogos/editarFormaPago.zul b/web/gui/catalogos/editarFormaPago.zul index 85cee7e83..fd988faa9 100644 --- a/web/gui/catalogos/editarFormaPago.zul +++ b/web/gui/catalogos/editarFormaPago.zul @@ -102,6 +102,19 @@ value="@{winEditarFormaPago$composer.formaPago.tipoEventoExtraId}" /> + + + + + +