fixed bug #10663
dev:Wilian qas:Wallysson git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@80069 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9ab14fad9d
commit
9b2b090ef7
|
@ -18,11 +18,13 @@ import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.Executions;
|
import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Button;
|
import org.zkoss.zul.Button;
|
||||||
|
import org.zkoss.zul.Checkbox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Row;
|
import org.zkoss.zul.Row;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||||
|
import com.rjconsultores.ventaboletos.enums.IndRestricaoFormaPago;
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
||||||
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||||
|
@ -50,12 +52,19 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
private BusquedaFormaPagoController busquedaFormaPagoController;
|
private BusquedaFormaPagoController busquedaFormaPagoController;
|
||||||
private Button btnSalvar;
|
private Button btnSalvar;
|
||||||
|
private Checkbox chkIndRestricaoFormaPago;
|
||||||
|
private Checkbox chkCompoeTarifaETaxa;
|
||||||
|
private Checkbox chkCompoeTarifa;
|
||||||
private Radio rd1;
|
private Radio rd1;
|
||||||
private Radio rd2;
|
private Radio rd2;
|
||||||
private Radio rd3;
|
private Radio rd3;
|
||||||
private Radio rd4;
|
private Radio rd4;
|
||||||
private static Logger log = Logger.getLogger(EditarFormaPagoController.class);
|
private static Logger log = Logger.getLogger(EditarFormaPagoController.class);
|
||||||
private Row rowEquivalencia;
|
private Row rowEquivalencia;
|
||||||
|
private Row rowRestricaoFormaPago;
|
||||||
|
private Row rowTarifaTaxa;
|
||||||
|
private Row rowSomenteTarifa;
|
||||||
|
private boolean exibeTipoRestricaoFormaPago;
|
||||||
|
|
||||||
private MyComboboxEstandar cmbTipoFormapago;
|
private MyComboboxEstandar cmbTipoFormapago;
|
||||||
|
|
||||||
|
@ -75,6 +84,29 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
||||||
formaPago = (FormaPago) Executions.getCurrent().getArg().get("formaPago");
|
formaPago = (FormaPago) Executions.getCurrent().getArg().get("formaPago");
|
||||||
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
|
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
|
||||||
popularCombobox();
|
popularCombobox();
|
||||||
|
/*
|
||||||
|
* Somente exibe se vai ter restrição de forma de pagamento na hora da venda se não houver cvesistema.
|
||||||
|
* Pode ser alterado para respeitar somente as formas de pagamento especiais.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (formaPago.getCveSistema() != null) {
|
||||||
|
rowRestricaoFormaPago.setVisible(false);
|
||||||
|
rowTarifaTaxa.setVisible(false);
|
||||||
|
rowSomenteTarifa.setVisible(false);
|
||||||
|
}else if(formaPago.getIndRestricaoFormaPago() == null ||
|
||||||
|
formaPago.getIndRestricaoFormaPago().equals(IndRestricaoFormaPago.NORMAL.getSigla())){
|
||||||
|
rowTarifaTaxa.setVisible(false);
|
||||||
|
rowSomenteTarifa.setVisible(false);
|
||||||
|
}else{
|
||||||
|
rowTarifaTaxa.setVisible(true);
|
||||||
|
rowSomenteTarifa.setVisible(true);
|
||||||
|
chkIndRestricaoFormaPago.setChecked(true);
|
||||||
|
if(formaPago.getIndRestricaoFormaPago().equals(IndRestricaoFormaPago.TARIFA_E_TAXAS.getSigla())){
|
||||||
|
chkCompoeTarifaETaxa.setChecked(true);
|
||||||
|
}else{
|
||||||
|
chkCompoeTarifa.setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (formaPago.getFormapagoId() == null) {
|
if (formaPago.getFormapagoId() == null) {
|
||||||
btnApagar.setVisible(Boolean.FALSE);
|
btnApagar.setVisible(Boolean.FALSE);
|
||||||
|
@ -125,6 +157,21 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onCheck$chkIndRestricaoFormaPago(Event event) {
|
||||||
|
rowTarifaTaxa.setVisible(getChkIndRestricaoFormaPago().isChecked());
|
||||||
|
rowSomenteTarifa.setVisible(getChkIndRestricaoFormaPago().isChecked());
|
||||||
|
chkCompoeTarifaETaxa.setChecked(true);
|
||||||
|
chkCompoeTarifa.setChecked(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onCheck$chkCompoeTarifaETaxa(Event event) {
|
||||||
|
chkCompoeTarifa.setChecked(!chkCompoeTarifaETaxa.isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onCheck$chkCompoeTarifa(Event event) {
|
||||||
|
chkCompoeTarifaETaxa.setChecked(!chkCompoeTarifa.isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
txtNome.getValue();
|
txtNome.getValue();
|
||||||
txtCvePago.getValue();
|
txtCvePago.getValue();
|
||||||
|
@ -149,6 +196,16 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
||||||
formaPago.setIndoperacion(new Short("3"));
|
formaPago.setIndoperacion(new Short("3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!chkIndRestricaoFormaPago.isChecked()){
|
||||||
|
formaPago.setIndRestricaoFormaPago(IndRestricaoFormaPago.NORMAL.getSigla());
|
||||||
|
}else{
|
||||||
|
if(chkCompoeTarifaETaxa.isChecked()){
|
||||||
|
formaPago.setIndRestricaoFormaPago(IndRestricaoFormaPago.TARIFA_E_TAXAS.getSigla());
|
||||||
|
}else if(chkCompoeTarifa.isChecked()){
|
||||||
|
formaPago.setIndRestricaoFormaPago(IndRestricaoFormaPago.SOMENTE_TARIFA.getSigla());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (formaPago.getFormapagoId() == null) {
|
if (formaPago.getFormapagoId() == null) {
|
||||||
List<FormaPago> lsFP =
|
List<FormaPago> lsFP =
|
||||||
formaPagoService.buscarPorDescricao(formaPago.getDescpago());
|
formaPagoService.buscarPorDescricao(formaPago.getDescpago());
|
||||||
|
@ -219,4 +276,91 @@ public class EditarFormaPagoController extends MyGenericForwardComposer {
|
||||||
this.cmbTipoFormapago = cmbTipoFormapago;
|
this.cmbTipoFormapago = cmbTipoFormapago;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the chkIndRestricaoFormaPago
|
||||||
|
*/
|
||||||
|
public Checkbox getChkIndRestricaoFormaPago() {
|
||||||
|
return chkIndRestricaoFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the chkCompoeTarifaETaxa
|
||||||
|
*/
|
||||||
|
public Checkbox getChkCompoeTarifaETaxa() {
|
||||||
|
return chkCompoeTarifaETaxa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the chkCompoeTarifa
|
||||||
|
*/
|
||||||
|
public Checkbox getChkCompoeTarifa() {
|
||||||
|
return chkCompoeTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param chkIndRestricaoFormaPago
|
||||||
|
* the chkIndRestricaoFormaPago to set
|
||||||
|
*/
|
||||||
|
public void setChkIndRestricaoFormaPago(Checkbox chkIndRestricaoFormaPago) {
|
||||||
|
this.chkIndRestricaoFormaPago = chkIndRestricaoFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param chkCompoeTarifaETaxa
|
||||||
|
* the chkCompoeTarifaETaxa to set
|
||||||
|
*/
|
||||||
|
public void setChkCompoeTarifaETaxa(Checkbox chkCompoeTarifaETaxa) {
|
||||||
|
this.chkCompoeTarifaETaxa = chkCompoeTarifaETaxa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param chkCompoeTarifa
|
||||||
|
* the chkCompoeTarifa to set
|
||||||
|
*/
|
||||||
|
public void setChkCompoeTarifa(Checkbox chkCompoeTarifa) {
|
||||||
|
this.chkCompoeTarifa = chkCompoeTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the exibeTipoRestricaoFormaPago
|
||||||
|
*/
|
||||||
|
public boolean isExibeTipoRestricaoFormaPago() {
|
||||||
|
return exibeTipoRestricaoFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param exibeTipoRestricaoFormaPago the exibeTipoRestricaoFormaPago to set
|
||||||
|
*/
|
||||||
|
public void setExibeTipoRestricaoFormaPago(boolean exibeTipoRestricaoFormaPago) {
|
||||||
|
this.exibeTipoRestricaoFormaPago = exibeTipoRestricaoFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the rowTarifaTaxa
|
||||||
|
*/
|
||||||
|
public Row getRowTarifaTaxa() {
|
||||||
|
return rowTarifaTaxa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the rowSomenteTarifa
|
||||||
|
*/
|
||||||
|
public Row getRowSomenteTarifa() {
|
||||||
|
return rowSomenteTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param rowTarifaTaxa the rowTarifaTaxa to set
|
||||||
|
*/
|
||||||
|
public void setRowTarifaTaxa(Row rowTarifaTaxa) {
|
||||||
|
this.rowTarifaTaxa = rowTarifaTaxa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param rowSomenteTarifa the rowSomenteTarifa to set
|
||||||
|
*/
|
||||||
|
public void setRowSomenteTarifa(Row rowSomenteTarifa) {
|
||||||
|
this.rowSomenteTarifa = rowSomenteTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -860,6 +860,9 @@ editarFormaPagoController.lblReserva.label = Reservación
|
||||||
editarFormaPagoController.lblTipoFormapago.label = Tipo
|
editarFormaPagoController.lblTipoFormapago.label = Tipo
|
||||||
editarFormaPagoController.lblCheque.label = Cheque
|
editarFormaPagoController.lblCheque.label = Cheque
|
||||||
editarFormaPagoController.lblDeposito.label = Deposito
|
editarFormaPagoController.lblDeposito.label = Deposito
|
||||||
|
editarFormaPagoController.lblRestricaoFormaPago.label=Ativa Restricción de Forma de Pagamiento
|
||||||
|
editarFormaPagoController.lblTarifaTaxa.label=Compone Tarifa y Taxas
|
||||||
|
editarFormaPagoController.lblSomenteTarifa.label=Compone Tarifa
|
||||||
|
|
||||||
# Muestra o tipo de Búsqueda Punto de venta
|
# Muestra o tipo de Búsqueda Punto de venta
|
||||||
busquedaTipoPuntoVentaController.window.title = Canal de venta
|
busquedaTipoPuntoVentaController.window.title = Canal de venta
|
||||||
|
|
|
@ -918,6 +918,9 @@ editarFormaPagoController.lblReserva.label = Reserva
|
||||||
editarFormaPagoController.lblTipoFormapago.label = Tipo
|
editarFormaPagoController.lblTipoFormapago.label = Tipo
|
||||||
editarFormaPagoController.lblCheque.label = Cheque
|
editarFormaPagoController.lblCheque.label = Cheque
|
||||||
editarFormaPagoController.lblDeposito.label = Deposito
|
editarFormaPagoController.lblDeposito.label = Deposito
|
||||||
|
editarFormaPagoController.lblRestricaoFormaPago.label=Ativa Restrição de Forma de Pagamento
|
||||||
|
editarFormaPagoController.lblTarifaTaxa.label=Compõe Tarifa e Taxas
|
||||||
|
editarFormaPagoController.lblSomenteTarifa.label=Compõe Tarifa
|
||||||
|
|
||||||
# Muestra o tipo de Pesquisa Ponto Venda
|
# Muestra o tipo de Pesquisa Ponto Venda
|
||||||
busquedaTipoPuntoVentaController.window.title = Canal de Venda
|
busquedaTipoPuntoVentaController.window.title = Canal de Venda
|
||||||
|
|
|
@ -79,6 +79,21 @@
|
||||||
mold="rounded"
|
mold="rounded"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
</row>
|
</row>
|
||||||
|
<row id="rowRestricaoFormaPago">
|
||||||
|
<label
|
||||||
|
value="${c:l('editarFormaPagoController.lblRestricaoFormaPago.label')}" />
|
||||||
|
<checkbox id="chkIndRestricaoFormaPago" checked="false"/>
|
||||||
|
</row>
|
||||||
|
<row id="rowTarifaTaxa">
|
||||||
|
<label
|
||||||
|
value="${c:l('editarFormaPagoController.lblTarifaTaxa.label')}" />
|
||||||
|
<checkbox id="chkCompoeTarifaETaxa" checked="false"/>
|
||||||
|
</row>
|
||||||
|
<row id="rowSomenteTarifa" >
|
||||||
|
<label
|
||||||
|
value="${c:l('editarFormaPagoController.lblSomenteTarifa.label')}" />
|
||||||
|
<checkbox id="chkCompoeTarifa" checked="false"/>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue