fixed bug#13109
qua:Renato dev:Thiago git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@88896 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8cdf760ccf
commit
bce3dc0d47
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Observable;
|
import java.util.Observable;
|
||||||
import java.util.Observer;
|
import java.util.Observer;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
|
@ -65,6 +66,7 @@ import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Row;
|
import org.zkoss.zul.Row;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
import org.zkoss.zul.api.Listitem;
|
||||||
import org.zkoss.zul.api.Timebox;
|
import org.zkoss.zul.api.Timebox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
|
@ -230,6 +232,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private PuntoVenta puntoVenta;
|
private PuntoVenta puntoVenta;
|
||||||
private Textbox txtCP;
|
private Textbox txtCP;
|
||||||
|
private MyListbox categoriaList;
|
||||||
private MyListbox puntoVentaList;
|
private MyListbox puntoVentaList;
|
||||||
private MyListbox paramRecoleccionList;
|
private MyListbox paramRecoleccionList;
|
||||||
private MyListbox formaPagoList;
|
private MyListbox formaPagoList;
|
||||||
|
@ -325,7 +328,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
private Combobox cmbEmpresaComissao;
|
private Combobox cmbEmpresaComissao;
|
||||||
private Combobox cmbEmpresas;
|
private Combobox cmbEmpresas;
|
||||||
private MyComboboxEstandar cmbEmpresasContaBancarias;
|
private MyComboboxEstandar cmbEmpresasContaBancarias;
|
||||||
private Combobox cmbCategorias;
|
|
||||||
private Combobox cmbUsuarioEmpresa;
|
private Combobox cmbUsuarioEmpresa;
|
||||||
private Combobox cmbEmpresaFechamentoParamptovta;
|
private Combobox cmbEmpresaFechamentoParamptovta;
|
||||||
private Combobox cmbLogFiles;
|
private Combobox cmbLogFiles;
|
||||||
|
@ -499,6 +501,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
|
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
|
||||||
|
for (Categoria c : lsCategoriaBloquear) {
|
||||||
|
categoriaList.addItemNovo(c);
|
||||||
|
}
|
||||||
|
|
||||||
getTxtTaxaConvenienciaPorc().setConstraint(getCt());
|
getTxtTaxaConvenienciaPorc().setConstraint(getCt());
|
||||||
cmbBanco.addEventListener("onAfterRender", new org.zkoss.zk.ui.event.EventListener() {
|
cmbBanco.addEventListener("onAfterRender", new org.zkoss.zk.ui.event.EventListener() {
|
||||||
|
@ -510,7 +517,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
aplicarMascara();
|
aplicarMascara();
|
||||||
|
|
||||||
popularCombobox(cmbTipoConta, cmbPessoa, cmbForm, cmbLote, cmbPosicao, cmbReceita, cmbEmpresas, cmbCategorias, cmbUsuarioEmpresa);
|
popularCombobox(cmbTipoConta, cmbPessoa, cmbForm, cmbLote, cmbPosicao, cmbReceita, cmbEmpresas, cmbUsuarioEmpresa);
|
||||||
|
|
||||||
ptovtaEmpresasBloqueadasList.setItemRenderer(new RenderEmpresaBloquear());
|
ptovtaEmpresasBloqueadasList.setItemRenderer(new RenderEmpresaBloquear());
|
||||||
ptovtaPtoVtaCheckinList.setItemRenderer(new RenderParadaPtoVtaCheckin());
|
ptovtaPtoVtaCheckinList.setItemRenderer(new RenderParadaPtoVtaCheckin());
|
||||||
|
@ -953,7 +960,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void popularCombobox(Combobox cmbConta, Combobox cmbPessoa, Combobox cmbForm, Combobox cmbLote, Combobox cmbPosicao, Combobox cmbReceita, Combobox cmbEmpresas, Combobox cmbCategorias, Combobox cmbUsuarioEmpresa) throws Exception {
|
public void popularCombobox(Combobox cmbConta, Combobox cmbPessoa, Combobox cmbForm, Combobox cmbLote, Combobox cmbPosicao, Combobox cmbReceita, Combobox cmbEmpresas, Combobox cmbUsuarioEmpresa) throws Exception {
|
||||||
|
|
||||||
clearCombobox(cmbConta);
|
clearCombobox(cmbConta);
|
||||||
clearCombobox(cmbPessoa);
|
clearCombobox(cmbPessoa);
|
||||||
|
@ -962,7 +969,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
clearCombobox(cmbPosicao);
|
clearCombobox(cmbPosicao);
|
||||||
clearCombobox(cmbEmpresas);
|
clearCombobox(cmbEmpresas);
|
||||||
clearCombobox(cmbEmpresas);
|
clearCombobox(cmbEmpresas);
|
||||||
clearCombobox(cmbCategorias);
|
|
||||||
clearCombobox(cmbUsuarioEmpresa);
|
clearCombobox(cmbUsuarioEmpresa);
|
||||||
|
|
||||||
for (Empresa e : lsEmpresasBloquear) {
|
for (Empresa e : lsEmpresasBloquear) {
|
||||||
|
@ -1007,12 +1013,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
comboItem.setParent(cmbReceita);
|
comboItem.setParent(cmbReceita);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Categoria c : lsCategoriaBloquear) {
|
|
||||||
Comboitem comboItem = new Comboitem(c.getDesccategoria());
|
|
||||||
comboItem.setValue(c);
|
|
||||||
comboItem.setParent(cmbCategorias);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lsEmpresas != null && !lsEmpresas.isEmpty()) {
|
if (lsEmpresas != null && !lsEmpresas.isEmpty()) {
|
||||||
Empresa empresaTodos = new Empresa(-1, "TODAS");
|
Empresa empresaTodos = new Empresa(-1, "TODAS");
|
||||||
lsEmpresas.add(empresaTodos);
|
lsEmpresas.add(empresaTodos);
|
||||||
|
@ -1024,7 +1024,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelect$cmbBanco() {
|
public void onSelect$cmbBanco() {
|
||||||
InstiFinanceira banco = (InstiFinanceira) cmbBanco.getSelectedItem().getValue();
|
InstiFinanceira banco = (InstiFinanceira) cmbBanco.getSelectedItem().getValue();
|
||||||
txtNomeBanco.setValue(banco.getCodigo());
|
txtNomeBanco.setValue(banco.getCodigo());
|
||||||
|
@ -1405,21 +1405,46 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void onClick$btnAdicionarPtovtaCatInd(Event ev) {
|
public void onClick$btnAdicionarPtovtaCatInd(Event ev) {
|
||||||
if (cmbCategorias.getSelectedItem() != null) {
|
if (!categoriaList.getSelectedItems().isEmpty()) {
|
||||||
Categoria categoria = (Categoria) cmbCategorias.getSelectedItem().getValue();
|
|
||||||
|
|
||||||
PtovtaCatInd pto = new PtovtaCatInd();
|
for (Listitem item : (Set<Listitem>) categoriaList.getSelectedItems()) {
|
||||||
pto.setCategoria(categoria);
|
Categoria categoria = (Categoria) item.getValue();
|
||||||
pto.setPuntoVenta(puntoVenta);
|
|
||||||
pto.setUsuarioBloqueado((Usuario) cmbUsuarioBloq.getSelectedItem().getValue());
|
|
||||||
pto.setEmpresa((Empresa) cmbUsuarioEmpresa.getSelectedItem().getValue());
|
PtovtaCatInd pto = new PtovtaCatInd();
|
||||||
puntoVenta.addPtovtaCatInd(pto);
|
pto.setCategoria(categoria);
|
||||||
|
pto.setPuntoVenta(puntoVenta);
|
||||||
|
pto.setUsuarioBloqueado((Usuario) cmbUsuarioBloq.getSelectedItem().getValue());
|
||||||
|
pto.setEmpresa((Empresa) cmbUsuarioEmpresa.getSelectedItem().getValue());
|
||||||
|
|
||||||
|
if(existePtoVtaCat(pto)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
puntoVenta.addPtovtaCatInd(pto);
|
||||||
|
|
||||||
ptovtaCatIndList.setData(puntoVenta.getPtovtaCatIndList());
|
|
||||||
|
ptovtaCatIndList.setData(puntoVenta.getPtovtaCatIndList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean existePtoVtaCat(PtovtaCatInd ptoVtaCat) {
|
||||||
|
|
||||||
|
for (PtovtaCatInd p : puntoVenta.getPtovtaCatIndList()) {
|
||||||
|
if (p.getActivo()
|
||||||
|
&& p.getCategoria().equals(ptoVtaCat.getCategoria())
|
||||||
|
&& p.getEmpresa().equals(ptoVtaCat.getEmpresa())
|
||||||
|
&& p.getUsuarioBloqueado().equals(ptoVtaCat.getUsuarioBloqueado())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnApagarPtovtaCatInd(Event ev) {
|
public void onClick$btnApagarPtovtaCatInd(Event ev) {
|
||||||
try {
|
try {
|
||||||
if (ptovtaCatIndList.getSelected() != null) {
|
if (ptovtaCatIndList.getSelected() != null) {
|
||||||
|
@ -3691,4 +3716,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
return lsEmpresasSemTodos;
|
return lsEmpresasSemTodos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MyListbox getCategoriaList() {
|
||||||
|
return categoriaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoriaList(MyListbox categoriaList) {
|
||||||
|
this.categoriaList = categoriaList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1581,15 +1581,20 @@
|
||||||
<column width="70%" />
|
<column width="70%" />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
|
||||||
<label
|
<row>
|
||||||
value="${c:l('editarPuntoVentaController.label.tipoPassagem')}" />
|
<label
|
||||||
<combobox id="cmbCategorias"
|
value="${c:l('editarPuntoVentaController.label.tipoPassagem')}" />
|
||||||
constraint="no empty"
|
<bandbox id="bdCategoria">
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
<bandpopup width="200px">
|
||||||
width="70%" mold="rounded" buttonVisible="true" />
|
<listbox id="categoriaList"
|
||||||
</row>
|
checkmark="true" multiple="true"
|
||||||
<row>
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox">
|
||||||
|
</listbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
<label
|
<label
|
||||||
value="${c:l('editarPuntoVentaController.label.usuario')}" />
|
value="${c:l('editarPuntoVentaController.label.usuario')}" />
|
||||||
<combobox id="cmbUsuarioBloq"
|
<combobox id="cmbUsuarioBloq"
|
||||||
|
|
Loading…
Reference in New Issue