|
|
|
@ -94,6 +94,7 @@ import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresa;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresaBloqueada;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresaContaBancaria;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
|
|
|
|
|
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
|
|
|
@ -120,6 +121,7 @@ import com.rjconsultores.ventaboletos.service.PtoVtaUsuarioBancarioService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PtovtaCatIndService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PtovtaComissaoService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PtovtaEmpresaBloqueadaService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PtovtaEmpresaContaBancariaService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PtovtaEmpresaService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
|
|
|
|
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
|
|
|
@ -163,9 +165,10 @@ import com.rjconsultores.wsag.WSAGLog;
|
|
|
|
|
@Controller("editarPuntoVentaController")
|
|
|
|
|
@Scope("prototype")
|
|
|
|
|
public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
private static Logger log = Logger.getLogger(EditarPuntoVentaController.class);
|
|
|
|
|
|
|
|
|
|
public static final String FUNCION_TIPO_BOLETO_BLOQUEADO = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.TIPOBOLETOBLOQUEADO";
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -187,6 +190,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
@Autowired
|
|
|
|
|
private PtovtaEmpresaService ptovtaEmpresaService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PtovtaEmpresaContaBancariaService ptovtaEmpresaContaBancariaService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PtoVtaUsuarioBancarioService ptoVtaUsuarioBancarioService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UsuarioBancarioService usuarioBancarioService;
|
|
|
|
@ -228,7 +233,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
private MyTextbox txtDiasemtransito;
|
|
|
|
|
private MyListbox ptovtaHistoricoList;
|
|
|
|
|
private MyListbox categoriasBloqImpPosteriorList;
|
|
|
|
|
|
|
|
|
|
private MyListbox empresaContaBancariaList;
|
|
|
|
|
|
|
|
|
|
private List<Categoria> lsCategoriaBloquear;
|
|
|
|
|
|
|
|
|
|
private List<Empresa> lsEmpresasBloquear;
|
|
|
|
@ -458,7 +464,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
lsLogFiles = getLogFiles();
|
|
|
|
|
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.doAfterCompose(comp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -489,10 +494,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
fechamentoParamptovtaList.setItemRenderer(new FechamentoParamptovtaListItemRenderer());
|
|
|
|
|
if (puntoVenta.getPuntoventaId() != null) {
|
|
|
|
|
|
|
|
|
|
if (puntoVenta.getPuntoventaId() != null) {
|
|
|
|
|
puntoVenta = puntoVentaService.obtenerID(puntoVenta.getPuntoventaId());
|
|
|
|
|
lsEmpresaComissao = empresaService.buscarNotInPuntoVtaComissao(puntoVenta);
|
|
|
|
|
|
|
|
|
@ -779,6 +783,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
cmbParada.setText(puntoVenta.getParada().getDescparada());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
empresaContaBancariaList.setMultiple(true);
|
|
|
|
|
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("Punto de Venta: ", e);
|
|
|
|
|
Messagebox.show(
|
|
|
|
@ -967,15 +975,17 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("rawtypes")
|
|
|
|
|
public void onSelect$cmbEmpresaPtoVta() {
|
|
|
|
|
|
|
|
|
|
Empresa empresa = (Empresa) cmbEmpresaPtoVta.getSelectedItem().getValue();
|
|
|
|
|
lsEmpresaContaBancarias = ptovtaBancoService.buscarContasBancariasPorIdEmpresa(empresa.getEmpresaId());
|
|
|
|
|
|
|
|
|
|
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
|
|
|
|
|
|
|
|
|
|
if (lsEmpresaContaBancarias != null && !lsEmpresaContaBancarias.isEmpty()) {
|
|
|
|
|
cmbEmpresasContaBancarias.setModel(new BindingListModelList(lsEmpresaContaBancarias, true));
|
|
|
|
|
empresaContaBancariaList.setData(lsEmpresaContaBancarias);
|
|
|
|
|
// cmbEmpresasContaBancarias.setModel(new BindingListModelList(lsEmpresaContaBancarias, true));
|
|
|
|
|
} else {
|
|
|
|
|
cmbEmpresasContaBancarias.setModel(new BindingListModelList(new ArrayList(), true));
|
|
|
|
|
cmbEmpresasContaBancarias.setSelectedItem(null);
|
|
|
|
|
// cmbEmpresasContaBancarias.setModel(new BindingListModelList(new ArrayList(), true));
|
|
|
|
|
// cmbEmpresasContaBancarias.setSelectedItem(null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1428,6 +1438,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
if (cmbPuntoVentaPadre.getValue().isEmpty()) {
|
|
|
|
|
puntoVenta.setPuntoVentaPadre(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<PuntoVenta> lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue());
|
|
|
|
|
|
|
|
|
|
if (!lsPuntoVenta.isEmpty()) {
|
|
|
|
@ -1453,6 +1464,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.informarTempoMinimo.value"), Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
txtTempoParaImpressao.focus();
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1460,20 +1472,23 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
if (puntoVenta.getEmpresa() == null) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.empresa"), Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
|
|
|
|
|
} else if (puntoVenta.getTipoPuntoVenta() == null) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.punto"), Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
|
|
|
|
|
} else if (puntoVenta.getMoneda() == null) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.moneda"), Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* } else if (puntoVenta.getNodo() == null) { Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.nodo"), Labels.getLabel("editarPuntoVentaController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
*/
|
|
|
|
|
} else if (lsFormaPagoDet.isEmpty()) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarPuntoVentaController.MSG.formaDePago"), Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if (cmbConexion.getValue().equals("")) {
|
|
|
|
|
puntoVenta.setConexionBancaria(null);
|
|
|
|
|
puntoVenta.setUsuarioBancario(null);
|
|
|
|
@ -1491,6 +1506,63 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
puntoVenta.setComissaoId(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Empresas para Venda
|
|
|
|
|
List<PtovtaEmpresaContaBancaria> contasBancariasExcluidas = new ArrayList<PtovtaEmpresaContaBancaria>(0);
|
|
|
|
|
|
|
|
|
|
for (PtovtaEmpresa emp : lsPtovtaEmpresa) {
|
|
|
|
|
if (emp.getActivo()) {
|
|
|
|
|
// Contas bancarias (Temporária)
|
|
|
|
|
for (EmpresaContaBancaria ecc : emp.getContasBancaria()) {
|
|
|
|
|
if (ecc.getEmpresaContaBancariaId() == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Verificando os bancos adicionados/atualizados
|
|
|
|
|
boolean existe = false;
|
|
|
|
|
|
|
|
|
|
for (PtovtaEmpresaContaBancaria pto : emp.getLsPtovtaEmpresaContaBancaria()) {
|
|
|
|
|
if (pto.getEmpresaContaBancaria() != null && pto.getEmpresaContaBancaria().getEmpresaContaBancariaId().equals(ecc.getEmpresaContaBancariaId())) {
|
|
|
|
|
existe = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!existe) {
|
|
|
|
|
PtovtaEmpresaContaBancaria pto = new PtovtaEmpresaContaBancaria();
|
|
|
|
|
pto.setPtovtaEmpresa(emp);
|
|
|
|
|
pto.setEmpresaContaBancaria(ecc);
|
|
|
|
|
pto.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
|
|
|
pto.setFecmodif(new Date());
|
|
|
|
|
pto.setActivo(true);
|
|
|
|
|
|
|
|
|
|
emp.getLsPtovtaEmpresaContaBancaria().add(pto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Contas bancárias removidas
|
|
|
|
|
List<PtovtaEmpresaContaBancaria> excluir = new ArrayList<PtovtaEmpresaContaBancaria>(0);
|
|
|
|
|
|
|
|
|
|
for (PtovtaEmpresaContaBancaria pto : emp.getLsPtovtaEmpresaContaBancaria()) {
|
|
|
|
|
boolean existe = false;
|
|
|
|
|
|
|
|
|
|
for (EmpresaContaBancaria ecc : emp.getContasBancaria()) {
|
|
|
|
|
if (pto.getEmpresaContaBancaria().getEmpresaContaBancariaId().equals(ecc.getEmpresaContaBancariaId())) {
|
|
|
|
|
existe = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!existe) {
|
|
|
|
|
excluir.add(pto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
emp.getLsPtovtaEmpresaContaBancaria().removeAll(excluir);
|
|
|
|
|
|
|
|
|
|
contasBancariasExcluidas.addAll(excluir);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
puntoVenta.setActivo(Boolean.TRUE);
|
|
|
|
|
puntoVenta.setFecmodif(Calendar.getInstance().getTime());
|
|
|
|
|
puntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
|
|
@ -1505,6 +1577,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
puntoVenta.setTempoMinimoParaImpressao(txtTempoParaImpressao.getValue());
|
|
|
|
|
puntoVenta.setNodo(nodoService.obtenerId(1));
|
|
|
|
|
puntoVenta.setDateAbertura(dateAbertura.getValue());
|
|
|
|
|
|
|
|
|
|
if (dateFechamento.getValue() != null && dateFechamento.getValue().compareTo(dateAbertura.getValue()) < 0) {
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.DatFechMenorDataAbertura"),
|
|
|
|
@ -1557,6 +1630,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
List<PtovtaEmpresa> lsPto = new ArrayList<PtovtaEmpresa>();
|
|
|
|
|
for (PtovtaEmpresa pto : lsPtovtaEmpresa) {
|
|
|
|
|
if (!pto.getActivo()) {
|
|
|
|
|
for (PtovtaEmpresaContaBancaria ecc : pto.getLsPtovtaEmpresaContaBancaria()) {
|
|
|
|
|
ptovtaEmpresaContaBancariaService.borrarFisico(ecc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ptovtaEmpresaService.borrarFisico(pto);
|
|
|
|
|
} else {
|
|
|
|
|
pto.setPuntoVenta(puntoVenta);
|
|
|
|
@ -1565,6 +1642,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
puntoVenta.setLsPtovtaEmpresa(lsPto);
|
|
|
|
|
|
|
|
|
|
for (PtovtaEmpresaContaBancaria ecc : contasBancariasExcluidas) {
|
|
|
|
|
ptovtaEmpresaContaBancariaService.borrarFisico(ecc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<PtoVtaUsuarioBancario> lsPto2 = new ArrayList<PtoVtaUsuarioBancario>();
|
|
|
|
|
for (PtoVtaUsuarioBancario pto2 : lsPtovtaUsuarioBancario) {
|
|
|
|
|
if (!pto2.getActivo()) {
|
|
|
|
@ -1614,7 +1695,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
puntoVentaService.actualizacion(puntoVenta);
|
|
|
|
|
puntoVentaList.updateItem(puntoVenta);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gravaFechamentoCtaCorrente();
|
|
|
|
|
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.MSG.suscribirOK"),
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
@ -1626,6 +1709,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
} catch (ValidacionCampoException ve) {
|
|
|
|
|
log.error("editarPuntoVentaController: ", ve);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
ve.getMessage(),
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
@ -1633,15 +1717,19 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
} catch (IntegracionException ex) {
|
|
|
|
|
gravaFechamentoCtaCorrente();
|
|
|
|
|
|
|
|
|
|
log.error("editarPuntoVentaController: ", ex);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
ex.getMessage(),
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
|
|
|
|
|
closeWindow();
|
|
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
log.error("editarPuntoVentaController: ", ex);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
|
|
@ -2111,6 +2199,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
PtovtaEmpresa ptovtaEmpresa = null;
|
|
|
|
|
if(this.ptovtaEmpresa != null) {
|
|
|
|
|
ptovtaEmpresa = new PtovtaEmpresa(this.ptovtaEmpresa.getPtovtaempresaId());
|
|
|
|
|
ptovtaEmpresa.setLsPtovtaEmpresaContaBancaria(this.ptovtaEmpresa.getLsPtovtaEmpresaContaBancaria());
|
|
|
|
|
} else {
|
|
|
|
|
ptovtaEmpresa = new PtovtaEmpresa();
|
|
|
|
|
}
|
|
|
|
@ -2136,23 +2225,37 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
ptovtaEmpresa.setIndImpCompCartao(checkPtoVtaEmpresaIndImpCompCartao.isChecked());
|
|
|
|
|
ptovtaEmpresa.setNumeroSitef(txtNumeroSitef.getText());
|
|
|
|
|
|
|
|
|
|
if (cmbEmpresasContaBancarias.getSelectedItem() != null) {
|
|
|
|
|
ptovtaEmpresa.setEmpresaContaBancaria((EmpresaContaBancaria) cmbEmpresasContaBancarias.getSelectedItem().getValue());
|
|
|
|
|
// if (cmbEmpresasContaBancarias.getSelectedItem() != null) {
|
|
|
|
|
// ptovtaEmpresa.setEmpresaContaBancaria((EmpresaContaBancaria) cmbEmpresasContaBancarias.getSelectedItem().getValue());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (empresaContaBancariaList.getSelectedCount() > 0){
|
|
|
|
|
ptovtaEmpresa.getContasBancaria().clear();
|
|
|
|
|
|
|
|
|
|
for (Object o : empresaContaBancariaList.getSelectedModelItems()) {
|
|
|
|
|
EmpresaContaBancaria ecb = (EmpresaContaBancaria) o;
|
|
|
|
|
ptovtaEmpresa.getContasBancaria().add(ecb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ptovtaEmpresa.getPtovtaempresaId() == null){
|
|
|
|
|
lsPtovtaEmpresa.add(ptovtaEmpresa);
|
|
|
|
|
ptovtaEmpresaList.addItemNovo(ptovtaEmpresa);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
int index = lsPtovtaEmpresa.indexOf(ptovtaEmpresa);
|
|
|
|
|
|
|
|
|
|
if(index >= -1) {
|
|
|
|
|
lsPtovtaEmpresa.add(ptovtaEmpresa);
|
|
|
|
|
} else {
|
|
|
|
|
lsPtovtaEmpresa.set(index, ptovtaEmpresa);
|
|
|
|
|
} else {
|
|
|
|
|
lsPtovtaEmpresa.add(ptovtaEmpresa);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ptovtaEmpresaList.updateItem(ptovtaEmpresa);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
novoPtovtaEmpresa();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Messagebox.show(
|
|
|
|
|
Labels.getLabel("editarPuntoVentaController.MSG.Achou.PtovtaEmpresa"),
|
|
|
|
@ -2195,28 +2298,42 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
private void novoPtovtaEmpresa() {
|
|
|
|
|
cmbEmpresaPtoVta.setSelectedIndex(-1);
|
|
|
|
|
cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
|
|
|
|
// cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
|
|
|
|
checkPtoVtaEmpresaIndTerceirizada.setChecked(false);
|
|
|
|
|
checkPtoVtaEmpresaIndBloqueada.setChecked(false);
|
|
|
|
|
checkPtoVtaEmpresaIndMostrarCaja.setChecked(false);
|
|
|
|
|
checkPtoVtaEmpresaIndImpCompCartao.setChecked(false);
|
|
|
|
|
txtNumeroSitef.setValue("");
|
|
|
|
|
this.ptovtaEmpresa = null;
|
|
|
|
|
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void editarPtovtaEmpresa(PtovtaEmpresa ptovtaEmpresa) {
|
|
|
|
|
this.ptovtaEmpresa = new PtovtaEmpresa(ptovtaEmpresa.getPtovtaempresaId());
|
|
|
|
|
this.ptovtaEmpresa.setLsPtovtaEmpresaContaBancaria(ptovtaEmpresa.getLsPtovtaEmpresaContaBancaria());
|
|
|
|
|
|
|
|
|
|
cmbEmpresaPtoVta.setSelectedIndex(-1);
|
|
|
|
|
cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
|
|
|
|
// cmbEmpresasContaBancarias.setSelectedIndex(-1);
|
|
|
|
|
|
|
|
|
|
if(lsEmpresas != null) {
|
|
|
|
|
cmbEmpresaPtoVta.setSelectedIndex(lsEmpresas.indexOf(ptovtaEmpresa.getEmpresa()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(lsEmpresaContaBancarias != null) {
|
|
|
|
|
cmbEmpresasContaBancarias.setSelectedIndex(lsEmpresaContaBancarias.indexOf(ptovtaEmpresa.getEmpresaContaBancaria()));
|
|
|
|
|
// cmbEmpresasContaBancarias.setSelectedIndex(lsEmpresaContaBancarias.indexOf(ptovtaEmpresa.getEmpresaContaBancaria()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lsEmpresaContaBancarias = ptovtaBancoService.buscarContasBancariasPorIdEmpresa(ptovtaEmpresa.getEmpresa().getEmpresaId());
|
|
|
|
|
|
|
|
|
|
empresaContaBancariaList.setData(new ArrayList<EmpresaContaBancaria>(0));
|
|
|
|
|
|
|
|
|
|
if (lsEmpresaContaBancarias != null && !lsEmpresaContaBancarias.isEmpty()) {
|
|
|
|
|
empresaContaBancariaList.setData(lsEmpresaContaBancarias);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
empresaContaBancariaList.selectItems(ptovtaEmpresa.getContasBancaria());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkPtoVtaEmpresaIndTerceirizada.setChecked(ptovtaEmpresa.getIndTerceirizada());
|
|
|
|
|
checkPtoVtaEmpresaIndBloqueada.setChecked(ptovtaEmpresa.getIndBloqueada());
|
|
|
|
|
checkPtoVtaEmpresaIndMostrarCaja.setChecked(ptovtaEmpresa.getIndMostrarCaja());
|
|
|
|
|