fixes bug #7975
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@60460 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3b2cc2f1a3
commit
967e33e4fb
|
@ -16,6 +16,7 @@ import java.io.IOException;
|
|||
import java.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
@ -111,7 +112,6 @@ import com.rjconsultores.ventaboletos.service.PtovtaCatIndService;
|
|||
import com.rjconsultores.ventaboletos.service.PtovtaComissaoService;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaEmpresaBloqueadaService;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaEmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaHorarioService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
|
||||
|
@ -1337,6 +1337,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
lsPto2.add(pto2);
|
||||
}
|
||||
}
|
||||
if (!validaCadastroFechamentoContaCorrente(lsEmpresas)) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPuntoVentaController.ParamPtoVtaObrigatorio"),
|
||||
Labels.getLabel("editarPuntoVentaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
puntoVenta.setLsPtovtaUsuarioBancario(lsPto2);
|
||||
|
||||
if (radAprobacionAutorizado.isChecked()) {
|
||||
|
@ -1394,6 +1401,20 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean validaCadastroFechamentoContaCorrente(List<Empresa> empresas) {
|
||||
List<Object> list = Arrays.asList(fechamentoParamptovtaList.getData());
|
||||
try {
|
||||
for (int i = 0; i < empresas.size(); i++) {
|
||||
if (empresas.equals(((FechamentoParamptovta) list.get(i)).getEmpresa())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void validarDiversos() {
|
||||
if (!txtResponEnergia.getValue().isEmpty()
|
||||
|| cmbPosicao.getSelectedItem() != null
|
||||
|
|
|
@ -1080,6 +1080,7 @@ editarPuntoVentaController.tab.label.fechamentocntcorrente = Fechamento Conta Co
|
|||
editarPuntoVentaController.lbCP.value = Cod. Postal
|
||||
editarPuntoVentaController.lblNumPuntoVenda=Numero punto de venta
|
||||
editarPuntoVentaController.registroNumPtoVtaExiste = Ya existe un punto de venta con este numero
|
||||
editarPuntoVentaController.ParamPtoVtaObrigatorio = Es obligatório informar el Cierre de Cuenta Contábil para todas las empresas cadastradas.
|
||||
editarPuntoVentaController.lbStock.value = Estoque
|
||||
editarPuntoVentaController.lbCheckStock.value = Validar estoque Receta/Gasto
|
||||
editarPuntoVentaController.lbVendeSegOpcional.value = Vende seguro opcional
|
||||
|
|
|
@ -1115,6 +1115,7 @@ editarPuntoVentaController.tab.label.fechamentocntcorrente = Fechamento Conta Co
|
|||
editarPuntoVentaController.lbCP.value = Cod. Postal
|
||||
editarPuntoVentaController.lblNumPuntoVenda=Número Agência
|
||||
editarPuntoVentaController.registroNumPtoVtaExiste = Já existe uma agência com este número
|
||||
editarPuntoVentaController.ParamPtoVtaObrigatorio = É obrigatório informar Fechamento de Conta Corrente para todas as empresas cadastradas.
|
||||
editarPuntoVentaController.lbStock.value = Estoque
|
||||
editarPuntoVentaController.lbCheckStock.value = Validar Estoque Receita/Despesa
|
||||
editarPuntoVentaController.lbVendeSegOpcional.value = Vende Seguro Opcional
|
||||
|
|
Loading…
Reference in New Issue