git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@76854 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a47b96303c
commit
8819fbec65
|
@ -739,6 +739,12 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if(categoria != null) {
|
if(categoria != null) {
|
||||||
|
|
||||||
|
for (ComEmpCategoria c : empresa.getComEmpCategorias()) {
|
||||||
|
if (c.getCategoria().getCategoriaId().equals(categoria.getCategoriaId())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ComEmpCategoria comEmpCategoria = new ComEmpCategoria();
|
ComEmpCategoria comEmpCategoria = new ComEmpCategoria();
|
||||||
comEmpCategoria.setCategoria(categoria);
|
comEmpCategoria.setCategoria(categoria);
|
||||||
comEmpCategoria.setEmpresa(getEmpresa());
|
comEmpCategoria.setEmpresa(getEmpresa());
|
||||||
|
@ -746,6 +752,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
comEmpCategoria = empresaService.adicionarComissaoCategoria(comEmpCategoria);
|
comEmpCategoria = empresaService.adicionarComissaoCategoria(comEmpCategoria);
|
||||||
|
|
||||||
comEmpCategoriaList.updateItem(comEmpCategoria);
|
comEmpCategoriaList.updateItem(comEmpCategoria);
|
||||||
|
empresa.getComEmpCategorias().add(comEmpCategoria);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoCategoria"),
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoCategoria"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
@ -773,6 +780,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
ComEmpCategoria comEmpCategoria = (ComEmpCategoria) comEmpCategoriaList.getSelected();
|
ComEmpCategoria comEmpCategoria = (ComEmpCategoria) comEmpCategoriaList.getSelected();
|
||||||
empresaService.removerComissaoCategoria(comEmpCategoria);
|
empresaService.removerComissaoCategoria(comEmpCategoria);
|
||||||
comEmpCategoriaList.removeItem(comEmpCategoria);
|
comEmpCategoriaList.removeItem(comEmpCategoria);
|
||||||
|
empresa.getComEmpCategorias().remove(comEmpCategoria);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoCategoria"),
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoCategoria"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
@ -795,6 +803,12 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if(formapago != null) {
|
if(formapago != null) {
|
||||||
|
|
||||||
|
for(ComEmpFormapago f : empresa.getComEmpFormapagos()){
|
||||||
|
if(f.getFormaPago().getFormapagoId().equals(formapago.getFormapagoId())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ComEmpFormapago comEmpFormapago = new ComEmpFormapago();
|
ComEmpFormapago comEmpFormapago = new ComEmpFormapago();
|
||||||
comEmpFormapago.setFormaPago(formapago);
|
comEmpFormapago.setFormaPago(formapago);
|
||||||
comEmpFormapago.setEmpresa(getEmpresa());
|
comEmpFormapago.setEmpresa(getEmpresa());
|
||||||
|
@ -802,6 +816,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
comEmpFormapago = empresaService.adicionarComissaoFormapago(comEmpFormapago);
|
comEmpFormapago = empresaService.adicionarComissaoFormapago(comEmpFormapago);
|
||||||
|
|
||||||
comEmpFormapagoList.updateItem(comEmpFormapago);
|
comEmpFormapagoList.updateItem(comEmpFormapago);
|
||||||
|
empresa.getComEmpFormapagos().add(comEmpFormapago);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoFormapago"),
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoFormapago"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
@ -829,6 +844,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
ComEmpFormapago comEmpFormapago = (ComEmpFormapago) comEmpFormapagoList.getSelected();
|
ComEmpFormapago comEmpFormapago = (ComEmpFormapago) comEmpFormapagoList.getSelected();
|
||||||
empresaService.removerComissaoFormapago(comEmpFormapago);
|
empresaService.removerComissaoFormapago(comEmpFormapago);
|
||||||
comEmpFormapagoList.removeItem(comEmpFormapago);
|
comEmpFormapagoList.removeItem(comEmpFormapago);
|
||||||
|
empresa.getComEmpFormapagos().remove(comEmpFormapago);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoFormapago"),
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoFormapago"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
@ -856,6 +872,12 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if(tipoEventoExtra != null) {
|
if(tipoEventoExtra != null) {
|
||||||
|
|
||||||
|
for(ComEmpTipoEventoExtra e : empresa.getComEmpTipoEventoExtras()){
|
||||||
|
if(e.getTipoEventoExtra().getTipoeventoextraId().equals(tipoEventoExtra.getTipoeventoextraId())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ComEmpTipoEventoExtra comEmpTipoEventoExtra = new ComEmpTipoEventoExtra();
|
ComEmpTipoEventoExtra comEmpTipoEventoExtra = new ComEmpTipoEventoExtra();
|
||||||
comEmpTipoEventoExtra.setTipoEventoExtra(tipoEventoExtra);
|
comEmpTipoEventoExtra.setTipoEventoExtra(tipoEventoExtra);
|
||||||
comEmpTipoEventoExtra.setEmpresa(getEmpresa());
|
comEmpTipoEventoExtra.setEmpresa(getEmpresa());
|
||||||
|
@ -863,6 +885,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
comEmpTipoEventoExtra = empresaService.adicionarComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
comEmpTipoEventoExtra = empresaService.adicionarComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
||||||
|
|
||||||
comEmpTipoEventoExtraList.updateItem(comEmpTipoEventoExtra);
|
comEmpTipoEventoExtraList.updateItem(comEmpTipoEventoExtra);
|
||||||
|
empresa.getComEmpTipoEventoExtras().add(comEmpTipoEventoExtra);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoTipoEventoExtra"),
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoTipoEventoExtra"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
@ -888,6 +911,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
ComEmpTipoEventoExtra comEmpTipoEventoExtra = (ComEmpTipoEventoExtra) comEmpTipoEventoExtraList.getSelected();
|
ComEmpTipoEventoExtra comEmpTipoEventoExtra = (ComEmpTipoEventoExtra) comEmpTipoEventoExtraList.getSelected();
|
||||||
|
empresa.getComEmpTipoEventoExtras().remove(comEmpTipoEventoExtra);
|
||||||
empresaService.removerComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
empresaService.removerComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
||||||
comEmpTipoEventoExtraList.removeItem(comEmpTipoEventoExtra);
|
comEmpTipoEventoExtraList.removeItem(comEmpTipoEventoExtra);
|
||||||
|
|
||||||
|
@ -904,7 +928,6 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK,Messagebox.ERROR);
|
Messagebox.OK,Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Combobox getCmbEstadoInscEstadual() {
|
public Combobox getCmbEstadoInscEstadual() {
|
||||||
return cmbEstadoInscEstadual;
|
return cmbEstadoInscEstadual;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue