bug #8153
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@62065 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2fef86581f
commit
bfb659724b
|
@ -342,6 +342,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private Checkbox checkPtoVtaEmpresaIndTerceirizada;
|
||||
private Checkbox checkPtoVtaEmpresaIndBloqueada;
|
||||
private Checkbox checkPtoVtaEmpresaIndMostrarCaja;
|
||||
private Checkbox checkPtoVtaEmpresaIndImpCompCartao;
|
||||
private Textbox txtNumeroSitef;
|
||||
private Checkbox ckIsento;
|
||||
private Checkbox checkSimulaIntegracion;
|
||||
|
@ -368,6 +369,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
|
||||
private static final int TAMANHO_BUFFER = 4096; // 4kb
|
||||
|
||||
PtovtaEmpresa ptovtaEmpresa;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
|
@ -674,6 +677,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
paramRecoleccionList.setData(lsParamRecoleccion);
|
||||
|
||||
ptovtaEmpresaList.setItemRenderer(new PtovtaEmpresaRender());
|
||||
ptovtaEmpresaList.addEventListener("onDoubleClick", new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
PtovtaEmpresa ptovtaEmpresa = (PtovtaEmpresa) ptovtaEmpresaList.getSelected();
|
||||
editarPtovtaEmpresa(ptovtaEmpresa);
|
||||
}
|
||||
});
|
||||
|
||||
if (puntoVenta.getLsPtovtaEmpresa() == null) {
|
||||
puntoVenta.setLsPtovtaEmpresa(new ArrayList<PtovtaEmpresa>());
|
||||
|
@ -1850,19 +1860,24 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
public void onClick$btnSalvarPtovtaEmpresa(Event ev) throws InterruptedException {
|
||||
cmbEmpresaPtoVta.getValue();
|
||||
try {
|
||||
PtovtaEmpresa ptovtaEmpresa = new PtovtaEmpresa();
|
||||
PtovtaEmpresa ptovtaEmpresa = null;
|
||||
if(this.ptovtaEmpresa != null) {
|
||||
ptovtaEmpresa = new PtovtaEmpresa(this.ptovtaEmpresa.getPtovtaempresaId());
|
||||
} else {
|
||||
ptovtaEmpresa = new PtovtaEmpresa();
|
||||
}
|
||||
|
||||
Boolean achou = Boolean.FALSE;
|
||||
|
||||
ptovtaEmpresa.setEmpresa((Empresa) cmbEmpresaPtoVta.getSelectedItem().getValue());
|
||||
|
||||
for (PtovtaEmpresa fpd : lsPtovtaEmpresa) {
|
||||
if (fpd.getEmpresa().equals(ptovtaEmpresa.getEmpresa()) && fpd.getActivo()) {
|
||||
if ((ptovtaEmpresa.getPtovtaempresaId() == null || !ptovtaEmpresa.getPtovtaempresaId().equals(fpd.getPtovtaempresaId())) &&
|
||||
fpd.getEmpresa().equals(ptovtaEmpresa.getEmpresa()) && fpd.getActivo()) {
|
||||
achou = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
if (!achou) {
|
||||
|
||||
ptovtaEmpresa.setPuntoVenta(puntoVenta);
|
||||
ptovtaEmpresa.setActivo(Boolean.TRUE);
|
||||
ptovtaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
@ -1870,21 +1885,22 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
ptovtaEmpresa.setIndTerceirizada(checkPtoVtaEmpresaIndTerceirizada.isChecked());
|
||||
ptovtaEmpresa.setIndBloqueada(checkPtoVtaEmpresaIndBloqueada.isChecked());
|
||||
ptovtaEmpresa.setIndMostrarCaja(checkPtoVtaEmpresaIndMostrarCaja.isChecked());
|
||||
ptovtaEmpresa.setIndImpCompCartao(checkPtoVtaEmpresaIndImpCompCartao.isChecked());
|
||||
ptovtaEmpresa.setNumeroSitef(txtNumeroSitef.getText());
|
||||
|
||||
if (cmbEmpresasContaBancarias.getSelectedItem() != null) {
|
||||
ptovtaEmpresa.setEmpresaContaBancaria((EmpresaContaBancaria) cmbEmpresasContaBancarias.getSelectedItem().getValue());
|
||||
}
|
||||
lsPtovtaEmpresa.add(ptovtaEmpresa);
|
||||
|
||||
List<PtovtaEmpresa> lsP = new ArrayList<PtovtaEmpresa>();
|
||||
for (PtovtaEmpresa p : lsPtovtaEmpresa) {
|
||||
if (p.getActivo()) {
|
||||
lsP.add(p);
|
||||
int index = lsPtovtaEmpresa.indexOf(ptovtaEmpresa);
|
||||
if(index >= -1) {
|
||||
lsPtovtaEmpresa.add(ptovtaEmpresa);
|
||||
} else {
|
||||
lsPtovtaEmpresa.set(index, ptovtaEmpresa);
|
||||
}
|
||||
}
|
||||
ptovtaEmpresaList.setData(lsP);
|
||||
// ptovtaEmpresaList.addItem(ptovtaEmpresa);
|
||||
ptovtaEmpresaList.updateItem(ptovtaEmpresa);
|
||||
|
||||
novoPtovtaEmpresa();
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPuntoVentaController.MSG.Achou.PtovtaEmpresa"),
|
||||
|
@ -1921,6 +1937,41 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnNovoPtovtaEmpresa(Event ev) throws InterruptedException {
|
||||
novoPtovtaEmpresa();
|
||||
}
|
||||
|
||||
private void novoPtovtaEmpresa() {
|
||||
cmbEmpresaPtoVta.setSelectedIndex(-1);
|
||||
cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
||||
checkPtoVtaEmpresaIndTerceirizada.setChecked(false);
|
||||
checkPtoVtaEmpresaIndBloqueada.setChecked(false);
|
||||
checkPtoVtaEmpresaIndMostrarCaja.setChecked(false);
|
||||
checkPtoVtaEmpresaIndImpCompCartao.setChecked(false);
|
||||
txtNumeroSitef.setValue("");
|
||||
this.ptovtaEmpresa = null;
|
||||
}
|
||||
|
||||
private void editarPtovtaEmpresa(PtovtaEmpresa ptovtaEmpresa) {
|
||||
this.ptovtaEmpresa = new PtovtaEmpresa(ptovtaEmpresa.getPtovtaempresaId());
|
||||
cmbEmpresaPtoVta.setSelectedIndex(-1);
|
||||
cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
||||
|
||||
if(lsEmpresas != null) {
|
||||
cmbEmpresaPtoVta.setSelectedIndex(lsEmpresas.indexOf(ptovtaEmpresa.getEmpresa()));
|
||||
}
|
||||
|
||||
if(lsEmpresaContaBancarias != null) {
|
||||
cmbEmpresasContaBancarias.setSelectedIndex(lsEmpresaContaBancarias.indexOf(ptovtaEmpresa.getEmpresaContaBancaria()));
|
||||
}
|
||||
|
||||
checkPtoVtaEmpresaIndTerceirizada.setChecked(ptovtaEmpresa.getIndTerceirizada());
|
||||
checkPtoVtaEmpresaIndBloqueada.setChecked(ptovtaEmpresa.getIndBloqueada());
|
||||
checkPtoVtaEmpresaIndMostrarCaja.setChecked(ptovtaEmpresa.getIndMostrarCaja());
|
||||
checkPtoVtaEmpresaIndImpCompCartao.setChecked(ptovtaEmpresa.getIndImpCompCartao());
|
||||
txtNumeroSitef.setValue(ptovtaEmpresa.getNumeroSitef());
|
||||
}
|
||||
|
||||
public void onChange$cmbConexion(Event ev) {
|
||||
habilitarCombo();
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@ public class PtovtaEmpresaRender implements ListitemRenderer {
|
|||
lc = new Listcell(ptoVta.getIndMostrarCaja() != null && ptoVta.getIndMostrarCaja() ? Labels.getLabel("MSG.SI") : Labels.getLabel("MSG.NO"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ptoVta.getIndImpCompCartao() != null && ptoVta.getIndImpCompCartao() ? Labels.getLabel("MSG.SI") : Labels.getLabel("MSG.NO"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", ptoVta);
|
||||
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ tooltiptext.btnActualizar = Actualizar
|
|||
tooltiptext.btnAgregar = Incluir
|
||||
tooltiptext.btnGuardar = Guardar
|
||||
tooltiptext.btnPesquisa = Búsqueda
|
||||
tooltiptext.btnNuevo = Nuevo
|
||||
|
||||
|
||||
# Pantalla de início de sesión:
|
||||
|
@ -1045,6 +1046,7 @@ editarPuntoVentaController.lbCiudad.value = Ciudad
|
|||
editarPuntoVentaController.lblInicial.value = Inicial
|
||||
editarPuntoVentaController.lblMaxCancelacion = Tiempo max. cancelación pos venta(min)
|
||||
editarPuntoVentaController.lblAdicional.value = Adicional
|
||||
editarPuntoVentaController.lbImpCompCartao.value = Imprimir el Comprobante de la Tarjeta
|
||||
editarPuntoVentaController.RadSi.value.value = Si
|
||||
editarPuntoVentaController.RadNo.value = No
|
||||
editarPuntoVentaController.MSG.suscribirOK = Punto de venta se registró exitosamente
|
||||
|
|
|
@ -76,6 +76,7 @@ tooltiptext.btnActualizar = Atualizar
|
|||
tooltiptext.btnAgregar = Incluir
|
||||
tooltiptext.btnGuardar = Salvar
|
||||
tooltiptext.btnPesquisa = Pesquisa
|
||||
tooltiptext.btnNuevo = Novo
|
||||
|
||||
|
||||
# Pantalla de início de sesión:
|
||||
|
@ -1086,6 +1087,7 @@ editarPuntoVentaController.lbCiudad.value = Cidade
|
|||
editarPuntoVentaController.lblInicial.value = Inicial
|
||||
editarPuntoVentaController.lblMaxCancelacion = Tempo Max. Cancelamento após venda(min)
|
||||
editarPuntoVentaController.lblAdicional.value = Adicional
|
||||
editarPuntoVentaController.lbImpCompCartao.value = Imprimir Comprovante do Cartão
|
||||
editarPuntoVentaController.RadSi.value.value = Sim
|
||||
editarPuntoVentaController.RadNo.value = Não
|
||||
editarPuntoVentaController.MSG.suscribirOK = Ponto de Venda Registrado com Sucesso.
|
||||
|
|
|
@ -991,7 +991,7 @@
|
|||
|
||||
|
||||
<!-- Empresas para venta -->
|
||||
<tabpanel height="300px">
|
||||
<tabpanel height="470px">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
|
@ -1031,6 +1031,12 @@
|
|||
<checkbox id="checkPtoVtaEmpresaIndMostrarCaja"
|
||||
checked="false" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPuntoVentaController.lbImpCompCartao.value')}" />
|
||||
<checkbox id="checkPtoVtaEmpresaIndImpCompCartao"
|
||||
checked="false" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPuntoVentaController.lbNumeroSitef.value')}" />
|
||||
|
@ -1044,6 +1050,10 @@
|
|||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px"
|
||||
align="right">
|
||||
<button id="btnNovoPtovtaEmpresa"
|
||||
height="20" image="/gui/img/create_doc.gif" width="35px"
|
||||
tooltiptext="${c:l('tooltiptext.btnNuevo')}" />
|
||||
|
||||
<button id="btnSalvarPtovtaEmpresa"
|
||||
height="20" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('tooltiptext.btnAgregar')}" />
|
||||
|
@ -1064,6 +1074,7 @@
|
|||
<listheader image="/gui/img/builder.gif" label="${c:l('editarPuntoVentaController.lbNumeroSitef.value')}" width="20%" />
|
||||
<listheader image="/gui/img/builder.gif" label="${c:l('editarPuntoVentaController.lbEmpresaContaBancaria.value')}" width="20%" />
|
||||
<listheader image="/gui/img/builder.gif" label="${c:l('editarPuntoVentaController.lbMostrarCaja.value')}" width="20%" />
|
||||
<listheader image="/gui/img/builder.gif" label="${c:l('editarPuntoVentaController.lbImpCompCartao.value')}" width="20%" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</tabpanel>
|
||||
|
|
Loading…
Reference in New Issue