fixes bug #AL-2209
parent
f76e629b65
commit
44e33a3014
6
pom.xml
6
pom.xml
|
@ -4,12 +4,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.0.87</version>
|
||||
<version>1.0.88</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<modelWeb.version>1.0.46</modelWeb.version>
|
||||
<flyway.version>1.0.29</flyway.version>
|
||||
<modelWeb.version>1.0.47</modelWeb.version>
|
||||
<flyway.version>1.0.31</flyway.version>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -20,6 +21,7 @@ import org.zkoss.zk.ui.event.Event;
|
|||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Decimalbox;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.Radio;
|
||||
import org.zkoss.zul.Row;
|
||||
|
@ -62,12 +64,19 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
private Radio rd2;
|
||||
private Radio rd3;
|
||||
private Radio rd4;
|
||||
private Radio radioImp;
|
||||
private Radio radioPor;
|
||||
private static Logger log = Logger.getLogger(EditarFormaPagoController.class);
|
||||
private Row rowEquivalencia;
|
||||
private Row rowRestricaoFormaPago;
|
||||
private Row rowTransferenciaReativacao;
|
||||
private Row rowTarifaTaxa;
|
||||
private Row rowSomenteTarifa;
|
||||
private Row rowIndPercentualDesconto;
|
||||
private Row rowPercentualDesconto;
|
||||
private Row rowValorDesconto;
|
||||
private Decimalbox percentualDescontoBox;
|
||||
private Decimalbox valorDescontoBox;
|
||||
private boolean exibeTipoRestricaoFormaPago;
|
||||
|
||||
private Checkbox chkIndEstorno;
|
||||
|
@ -103,7 +112,7 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
|
||||
popularCombobox();
|
||||
/*
|
||||
* Somente exibe se vai ter restrição de forma de pagamento na hora da venda se não houver cvesistema.
|
||||
* Somente exibe se vai ter restri<EFBFBD><EFBFBD>o de forma de pagamento na hora da venda se n<EFBFBD>o houver cvesistema.
|
||||
* Pode ser alterado para respeitar somente as formas de pagamento especiais.
|
||||
*
|
||||
*/
|
||||
|
@ -173,6 +182,36 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
cmbTipoCarteiraDigital.setValue(formaPago.getTipoCarteiraDigital().toString());
|
||||
}
|
||||
|
||||
if(formaPago.getTipoFormapago() != null) {
|
||||
cmbTipoFormapago.setValue(formaPago.getTipoFormapago().toString());
|
||||
}
|
||||
|
||||
|
||||
if(Boolean.TRUE.equals(formaPago.getIndPercentualDesconto()) || formaPago.getIndPercentualDesconto()==null ) {
|
||||
rowPercentualDesconto.setVisible(true);
|
||||
radioPor.setChecked(true);
|
||||
rowValorDesconto.setVisible(false);
|
||||
percentualDescontoBox.setDisabled(false);
|
||||
valorDescontoBox.setDisabled(true);
|
||||
percentualDescontoBox.setConstraint("");
|
||||
percentualDescontoBox.setValue(BigDecimal.ZERO);
|
||||
valorDescontoBox.setConstraint("");
|
||||
valorDescontoBox.setValue(BigDecimal.ZERO);
|
||||
valorDescontoBox.setConstraint("no empty, no negative");
|
||||
}else {
|
||||
rowPercentualDesconto.setVisible(false);
|
||||
rowValorDesconto.setVisible(true);
|
||||
radioImp.setChecked(true);
|
||||
percentualDescontoBox.setDisabled(true);
|
||||
valorDescontoBox.setDisabled(false);
|
||||
percentualDescontoBox.setConstraint("");
|
||||
percentualDescontoBox.setValue(BigDecimal.ZERO);
|
||||
valorDescontoBox.setConstraint("");
|
||||
valorDescontoBox.setValue(BigDecimal.ZERO);
|
||||
valorDescontoBox.setConstraint("no empty, no negative");
|
||||
}
|
||||
|
||||
|
||||
exibirOcultarCampos();
|
||||
txtNome.focus();
|
||||
}
|
||||
|
@ -208,7 +247,7 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
lblTipoCarteiraDigital.setVisible(false);
|
||||
rowIdEventoExtra.setVisible(chkIndEstorno.isChecked());
|
||||
|
||||
if(cmbTipoFormapago.getSelectedItem() != null) {
|
||||
if(cmbTipoFormapago!=null && cmbTipoFormapago.getSelectedItem() != null) {
|
||||
TipoFormapago tipoFormaPagoEscolhido = ((TipoFormapago) cmbTipoFormapago.getSelectedItem().getValue());
|
||||
|
||||
if(TipoFormapago.CARTEIRA_DIGITAL.equals(tipoFormaPagoEscolhido)) {
|
||||
|
@ -280,6 +319,9 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
formaPago.setIndVoucherRodoviaria(chkIndVoucherRodoviaria.isChecked());
|
||||
formaPago.setIndTransferenciaReativacao(chkIndTransferenciaReativacao.isChecked());
|
||||
|
||||
formaPago.setValorDesconto(valorDescontoBox.getValue());
|
||||
formaPago.setPercentualDesconto(percentualDescontoBox.getValue());
|
||||
|
||||
if (formaPago.getFormapagoId() == null) {
|
||||
List<FormaPago> lsFP =
|
||||
formaPagoService.buscarPorDescricao(formaPago.getDescpago());
|
||||
|
@ -482,4 +524,27 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
|||
public void onClick$chkIndEstorno(Event event) {
|
||||
rowIdEventoExtra.setVisible(chkIndEstorno.isChecked());
|
||||
}
|
||||
|
||||
public void onClick$radioPor(Event ev) {
|
||||
rowPercentualDesconto.setVisible(true);
|
||||
rowValorDesconto.setVisible(false);
|
||||
valorDescontoBox.setDisabled(true);
|
||||
percentualDescontoBox.setDisabled(false);
|
||||
|
||||
valorDescontoBox.setConstraint("");
|
||||
valorDescontoBox.setValue(BigDecimal.ZERO);
|
||||
percentualDescontoBox.setConstraint("");
|
||||
percentualDescontoBox.setConstraint("no empty, no zero, no negative");
|
||||
}
|
||||
|
||||
public void onClick$radioImp(Event ev) {
|
||||
rowPercentualDesconto.setVisible(false);
|
||||
rowValorDesconto.setVisible(true);
|
||||
percentualDescontoBox.setDisabled(true);
|
||||
valorDescontoBox.setDisabled(false);
|
||||
percentualDescontoBox.setConstraint("");
|
||||
percentualDescontoBox.setValue(BigDecimal.ZERO);
|
||||
valorDescontoBox.setConstraint("");
|
||||
valorDescontoBox.setConstraint("no empty, no negative");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1403,6 +1403,13 @@ editarFormaPagoController.lblCateiraDigitalTef.label = TEF
|
|||
editarFormaPagoController.lblCateiraDigitalTpi.label = TPI
|
||||
editarFormaPagoController.lblCateiraDigitalCielo.label = Cielo Link
|
||||
editarFormaPagoController.lblETicket.label=E_Ticket
|
||||
editarFormaPagoController.lblIndPercentualDesconto.value= Desconto Forma Pagamento
|
||||
editarFormaPagoController.lblDescuentoImporte.value=Absoluto
|
||||
editarFormaPagoController.lblDescuentoPorc.value=Percentual
|
||||
editarFormaPagoController.percentualDescontoFormaPagamento.label= Percentual desconto
|
||||
editarFormaPagoController.valorDescontoFormaPagamento.label= Valor desconto
|
||||
|
||||
|
||||
|
||||
# Muestra o tipo de Pesquisa Ponto Venda
|
||||
busquedaTipoPuntoVentaController.window.title = Canal de Venda
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarFormaPago" border="normal"
|
||||
apply="${editarFormaPagoController}" width="400px"
|
||||
apply="${editarFormaPagoController}" width="450px"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarFormaPagoController.window.title')}">
|
||||
<toolbar>
|
||||
|
@ -128,6 +128,33 @@
|
|||
value="${c:l('editarFormaPagoController.lblSomenteTarifa.label')}" />
|
||||
<checkbox id="chkCompoeTarifa" checked="false"/>
|
||||
</row>
|
||||
|
||||
<row id="rowIndPercentualDesconto" spans="1,3" >
|
||||
<label
|
||||
value="${c:l('editarFormaPagoController.lblIndPercentualDesconto.value')}" />
|
||||
<radiogroup id="desconto">
|
||||
<radio id="radioImp"
|
||||
label="${c:l('editarFormaPagoController.lblDescuentoImporte.value')}" />
|
||||
<radio id="radioPor"
|
||||
label="${c:l('editarFormaPagoController.lblDescuentoPorc.value')}" />
|
||||
</radiogroup>
|
||||
|
||||
</row>
|
||||
<row id="rowPercentualDesconto">
|
||||
<label
|
||||
value="${c:l('editarFormaPagoController.percentualDescontoFormaPagamento.label')}" />
|
||||
<decimalbox id="percentualDescontoBox"
|
||||
format="##,##%" constraint="no negative" maxlength="5" width="98%"
|
||||
value="@{winEditarFormaPago$composer.formaPago.percentualDesconto}" />
|
||||
|
||||
</row>
|
||||
<row id="rowValorDesconto">
|
||||
<label value="${c:l('editarFormaPagoController.valorDescontoFormaPagamento.label')}" />
|
||||
<decimalbox id="valorDescontoBox"
|
||||
width="98%" constraint="no negative" maxlength="5" format="#,##0.00"
|
||||
value="@{winEditarFormaPago$composer.formaPago.valorDesconto}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
|
|
Loading…
Reference in New Issue