|
|
|
@ -73,7 +73,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaContaBan
|
|
|
|
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaImposto;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author Rafius
|
|
|
|
|
*/
|
|
|
|
|
@Controller("editarEmpresaController")
|
|
|
|
@ -98,7 +98,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
private FormaPagoService formaPagoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private TipoEventoExtraService tipoEventoExtraService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Empresa empresa;
|
|
|
|
|
private MyListbox empresaList;
|
|
|
|
|
private MyTextbox txtNome;
|
|
|
|
@ -123,6 +123,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
private Checkbox chkIndBoletoAgrupado;
|
|
|
|
|
private Checkbox chkIndEnviarEmailComissao;
|
|
|
|
|
private Checkbox chkIndnaopermiteconfsemmalote;
|
|
|
|
|
private Checkbox chkIndValidaDescontoTarifa;
|
|
|
|
|
|
|
|
|
|
private MyListbox inscEstadualList;
|
|
|
|
|
private Combobox cmbEstadoInscEstadual;
|
|
|
|
@ -138,26 +139,26 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
private List<EmpresaContaBancaria> lsEmpresaContaBancaria;
|
|
|
|
|
private Textbox txtInscEstLogradouro;
|
|
|
|
|
private Textbox txtInscEstNumero;
|
|
|
|
|
private Textbox txtInscEstComplemento;
|
|
|
|
|
private Textbox txtInscEstCEP;
|
|
|
|
|
private Textbox txtInscEstComplemento;
|
|
|
|
|
private Textbox txtInscEstCEP;
|
|
|
|
|
private Textbox txtInscEstBairro;
|
|
|
|
|
private Combobox cmbInscEstCidade;
|
|
|
|
|
private Textbox txtInscEstCNPJ;
|
|
|
|
|
private Textbox txtEquivalenciaAG;
|
|
|
|
|
private Checkbox chkIndgennumfoliovtaintimpost;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<Categoria> lsCategorias;
|
|
|
|
|
private List<FormaPago> lsFormaPagos;
|
|
|
|
|
private List<TipoEventoExtra> lsTipoEventoExtras;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private MyListbox comEmpCategoriaList;
|
|
|
|
|
private MyListbox comEmpFormapagoList;
|
|
|
|
|
private MyListbox comEmpTipoEventoExtraList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private MyComboboxEstandar cmbCategorias;
|
|
|
|
|
private MyComboboxEstandar cmbFormaPagos;
|
|
|
|
|
private MyComboboxEstandar cmbTipoEventoExtras;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ComEmpConferencia comEmpConferencia;
|
|
|
|
|
private Checkbox chkIndbilhetemanual;
|
|
|
|
|
private Checkbox chkIndbilhetevendido;
|
|
|
|
@ -167,20 +168,20 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
private Checkbox chkIndgapcancelado;
|
|
|
|
|
private Checkbox chkIndgapdevolvido;
|
|
|
|
|
private Checkbox chkIndeventosfinanceiros;
|
|
|
|
|
private Checkbox chkIndocd;
|
|
|
|
|
private Checkbox chkIndocd;
|
|
|
|
|
private Checkbox chkObrigarInfNomePassageiro;
|
|
|
|
|
private Checkbox chkPermitirImpressaoGratuidade;
|
|
|
|
|
private Textbox txtEmail;
|
|
|
|
|
private Checkbox chkHabilitarFidelidade;
|
|
|
|
|
private Intbox intPontuacaoFraudeIni;
|
|
|
|
|
private Intbox intPontuacaoFraudeFim;
|
|
|
|
|
|
|
|
|
|
private static final String EMAIL_PATTERN =
|
|
|
|
|
|
|
|
|
|
private static final String EMAIL_PATTERN =
|
|
|
|
|
"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
|
|
|
|
|
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
|
|
|
|
|
|
|
|
|
|
private static final Pattern pattern = Pattern.compile(EMAIL_PATTERN, Pattern.CASE_INSENSITIVE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Empresa getEmpresa() {
|
|
|
|
|
return empresa;
|
|
|
|
|
}
|
|
|
|
@ -236,7 +237,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
lsBanco = instFinanceiraService.obtenerTodos();
|
|
|
|
|
|
|
|
|
|
super.doAfterCompose(comp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(empresa.getIndfechatarifa() == null){
|
|
|
|
|
rdgFechaSalida.setChecked(Boolean.TRUE);
|
|
|
|
|
}else if(empresa.getIndfechatarifa()){
|
|
|
|
@ -244,7 +245,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
}else{
|
|
|
|
|
rdgFechaSalida.setChecked(Boolean.TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(empresa.getIndvalidabloqueioecf() == null){
|
|
|
|
|
rdgRestringeZSim.setChecked(Boolean.FALSE);
|
|
|
|
|
}else if(empresa.getIndvalidabloqueioecf()){
|
|
|
|
@ -252,7 +253,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
}else{
|
|
|
|
|
rdgRestringeZSim.setChecked(Boolean.FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chkIndgennumfoliovtaintimpost.setChecked(empresa.getIndgennumfoliovtaintimpost() != null ? empresa.getIndgennumfoliovtaintimpost() : Boolean.FALSE);
|
|
|
|
|
chkHabilitarFidelidade.setChecked(empresa.getIndFidelidade() != null ? empresa.getIndFidelidade() : Boolean.FALSE);
|
|
|
|
|
|
|
|
|
@ -296,8 +297,8 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
new Listcell(inscricaoEstadual.getCep()).setParent(listItem);
|
|
|
|
|
new Listcell(inscricaoEstadual.getBairro()).setParent(listItem);
|
|
|
|
|
new Listcell(inscricaoEstadual.getEquivalenciaAG()).setParent(listItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
listItem.setAttribute("data", inscricaoEstadual);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -312,7 +313,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
lsEmpresaContaBancaria = empresa.getEmpresaContaBancaria();
|
|
|
|
|
empresaContaBancariaList.setData(lsEmpresaContaBancaria);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
txtNome.focus();
|
|
|
|
|
|
|
|
|
|
if (empresa.getEmpresaId() == null) {
|
|
|
|
@ -332,28 +333,28 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
|
|
|
|
|
rowEquivalencia.setVisible(Boolean.FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comEmpCategoriaList.setItemRenderer(new RenderComEmpCategoria());
|
|
|
|
|
if(empresa.getComEmpCategorias() != null) {
|
|
|
|
|
comEmpCategoriaList.setData(empresa.getComEmpCategorias());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comEmpFormapagoList.setItemRenderer(new RenderComEmpFormapago());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(empresa.getComEmpFormapagos() != null) {
|
|
|
|
|
comEmpFormapagoList.setData(empresa.getComEmpFormapagos());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comEmpTipoEventoExtraList.setItemRenderer(new RenderComEmpTipoEventoExtra());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(empresa.getComEmpTipoEventoExtras() != null) {
|
|
|
|
|
comEmpTipoEventoExtraList.setData(empresa.getComEmpTipoEventoExtras());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
carrergarParametrosComissao();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void carrergarParametrosComissao() {
|
|
|
|
|
if(empresa.getComEmpConferencias() != null && !empresa.getComEmpConferencias().isEmpty()) {
|
|
|
|
|
comEmpConferencia = empresa.getComEmpConferencias().iterator().next();
|
|
|
|
@ -370,6 +371,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
chkIndBoletoAgrupado.setChecked(empresa.getIndBoletoAgrupado() == null? false: empresa.getIndBoletoAgrupado());
|
|
|
|
|
chkIndEnviarEmailComissao.setChecked(empresa.getIndenviaemailcomissao() == null ? false : empresa.getIndenviaemailcomissao());
|
|
|
|
|
chkIndnaopermiteconfsemmalote.setChecked(empresa.getIndnaopermiteconfsemmalote() == null ? false : empresa.getIndnaopermiteconfsemmalote());
|
|
|
|
|
chkIndValidaDescontoTarifa.setChecked(empresa.getIndValidaDescontoTarifa() == null ? false : empresa.getIndValidaDescontoTarifa());
|
|
|
|
|
chkObrigarInfNomePassageiro.setChecked(empresa.getIndobrigarinformarnomepassageiro() == null ? false : empresa.getIndobrigarinformarnomepassageiro());
|
|
|
|
|
chkPermitirImpressaoGratuidade.setChecked(empresa.getIndImprimeGratuidade() == null ? false : empresa.getIndImprimeGratuidade());
|
|
|
|
|
} else {
|
|
|
|
@ -400,8 +402,8 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
chkIndcarboletosdevolvidosconf.getValue();
|
|
|
|
|
chkIndBoletoAgrupado.getValue();
|
|
|
|
|
chkIndgennumfoliovtaintimpost.getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!validarEmail()) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarTipoPuntoVentaController.MSG.emailInvalido"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
@ -424,19 +426,20 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
empresa.setIndvalidabloqueioecf(rdgRestringeZSim.isChecked());
|
|
|
|
|
empresa.setIndcarboletosdevolvidosconf(chkIndcarboletosdevolvidosconf.isChecked());
|
|
|
|
|
empresa.setIndgennumfoliovtaintimpost(chkIndgennumfoliovtaintimpost.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
empresa.setIndBoletoAgrupado(chkIndBoletoAgrupado.isChecked());
|
|
|
|
|
empresa.setIndenviaemailcomissao(chkIndEnviarEmailComissao.isChecked());
|
|
|
|
|
empresa.setIndnaopermiteconfsemmalote(chkIndnaopermiteconfsemmalote.isChecked());
|
|
|
|
|
empresa.setIndValidaDescontoTarifa(chkIndValidaDescontoTarifa.isChecked());
|
|
|
|
|
empresa.setIndobrigarinformarnomepassageiro(chkObrigarInfNomePassageiro.isChecked());
|
|
|
|
|
empresa.setIndImprimeGratuidade(chkPermitirImpressaoGratuidade.isChecked());
|
|
|
|
|
empresa.setIndFidelidade(chkHabilitarFidelidade.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
carregarComEmpConferencia();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
empresaService.suscribirActualizacion(empresa);
|
|
|
|
|
empresaList.updateItem(empresa);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.MSG.suscribirOK"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
@ -450,7 +453,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean validarEmail() {
|
|
|
|
|
if(txtEmail.getText() == null || txtEmail.getText().isEmpty()){
|
|
|
|
|
return true;
|
|
|
|
@ -463,7 +466,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void carregarComEmpConferencia() {
|
|
|
|
|
getComEmpConferencia().setIndbilhetemanual(chkIndbilhetemanual.isChecked());
|
|
|
|
|
getComEmpConferencia().setIndbilhetevendido(chkIndbilhetevendido.isChecked());
|
|
|
|
@ -474,7 +477,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
getComEmpConferencia().setIndgapdevolvido(chkIndgapdevolvido.isChecked());
|
|
|
|
|
getComEmpConferencia().setIndeventosfinanceiros(chkIndeventosfinanceiros.isChecked());
|
|
|
|
|
getComEmpConferencia().setIndocd(chkIndocd.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
empresa.setComEmpConferencias(new ArrayList<ComEmpConferencia>());
|
|
|
|
|
empresa.getComEmpConferencias().add(getComEmpConferencia());
|
|
|
|
|
}
|
|
|
|
@ -530,7 +533,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
cmbCidade.setModel(listModelCiudad);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onChange$cmbEstadoInscEstadual(Event ev) {
|
|
|
|
|
Comboitem cbiEstado = cmbEstadoInscEstadual.getSelectedItem();
|
|
|
|
|
if (cbiEstado != null) {
|
|
|
|
@ -607,7 +610,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Ciudad ciudad = (Ciudad)cmbInscEstCidade.getSelectedItem().getValue();
|
|
|
|
|
String inscEstCNPJ = txtInscEstCNPJ.getValue();
|
|
|
|
|
String equivalenciaAG = txtEquivalenciaAG.getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < inscEstadualList.getModel().getSize(); i++) {
|
|
|
|
|
if (((InscricaoEstadual) inscEstadualList.getModel().getElementAt(i)).getEstado().equals(estado)) {
|
|
|
|
@ -653,26 +656,26 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
inscEstadualList.setData(empresa.getInscricoesEstaduaisActivas());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick$btnAdicionarComissaoCategoria(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Categoria categoria = (Categoria) cmbCategorias.getSelectedItem().getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(categoria != null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ComEmpCategoria comEmpCategoria = new ComEmpCategoria();
|
|
|
|
|
comEmpCategoria.setCategoria(categoria);
|
|
|
|
|
comEmpCategoria.setEmpresa(getEmpresa());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comEmpCategoria = empresaService.adicionarComissaoCategoria(comEmpCategoria);
|
|
|
|
|
|
|
|
|
|
comEmpCategoriaList.updateItem(comEmpCategoria);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoCategoria"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -682,7 +685,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick$btnRemoverComissaoCategoria(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(comEmpCategoriaList.getSelected() != null) {
|
|
|
|
@ -690,18 +693,18 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Labels.getLabel("editarEmpresaController.MSG.borrarComissaoCategoriaPergunta"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (resp == Messagebox.YES) {
|
|
|
|
|
ComEmpCategoria comEmpCategoria = (ComEmpCategoria) comEmpCategoriaList.getSelected();
|
|
|
|
|
empresaService.removerComissaoCategoria(comEmpCategoria);
|
|
|
|
|
comEmpCategoriaList.removeItem(comEmpCategoria);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoCategoria"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
@ -709,26 +712,26 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick$btnAdicionarComissaoFormapago(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormaPago formapago = (FormaPago) cmbFormaPagos.getSelectedItem().getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(formapago != null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ComEmpFormapago comEmpFormapago = new ComEmpFormapago();
|
|
|
|
|
comEmpFormapago.setFormaPago(formapago);
|
|
|
|
|
comEmpFormapago.setEmpresa(getEmpresa());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comEmpFormapago = empresaService.adicionarComissaoFormapago(comEmpFormapago);
|
|
|
|
|
|
|
|
|
|
comEmpFormapagoList.updateItem(comEmpFormapago);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoFormapago"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -738,7 +741,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick$btnRemoverComissaoFormapago(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(comEmpFormapagoList.getSelected() != null) {
|
|
|
|
@ -746,46 +749,17 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Labels.getLabel("editarEmpresaController.MSG.borrarComissaoFormapagoPergunta"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (resp == Messagebox.YES) {
|
|
|
|
|
ComEmpFormapago comEmpFormapago = (ComEmpFormapago) comEmpFormapagoList.getSelected();
|
|
|
|
|
empresaService.removerComissaoFormapago(comEmpFormapago);
|
|
|
|
|
comEmpFormapagoList.removeItem(comEmpFormapago);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoFormapago"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onClick$btnAdicionarComissaoTipoEventoExtra(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
TipoEventoExtra tipoEventoExtra = (TipoEventoExtra) cmbTipoEventoExtras.getSelectedItem().getValue();
|
|
|
|
|
|
|
|
|
|
if(tipoEventoExtra != null) {
|
|
|
|
|
|
|
|
|
|
ComEmpTipoEventoExtra comEmpTipoEventoExtra = new ComEmpTipoEventoExtra();
|
|
|
|
|
comEmpTipoEventoExtra.setTipoEventoExtra(tipoEventoExtra);
|
|
|
|
|
comEmpTipoEventoExtra.setEmpresa(getEmpresa());
|
|
|
|
|
|
|
|
|
|
comEmpTipoEventoExtra = empresaService.adicionarComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
|
|
|
|
|
|
|
|
|
comEmpTipoEventoExtraList.updateItem(comEmpTipoEventoExtra);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoTipoEventoExtra"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
@ -794,7 +768,36 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick$btnAdicionarComissaoTipoEventoExtra(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
TipoEventoExtra tipoEventoExtra = (TipoEventoExtra) cmbTipoEventoExtras.getSelectedItem().getValue();
|
|
|
|
|
|
|
|
|
|
if(tipoEventoExtra != null) {
|
|
|
|
|
|
|
|
|
|
ComEmpTipoEventoExtra comEmpTipoEventoExtra = new ComEmpTipoEventoExtra();
|
|
|
|
|
comEmpTipoEventoExtra.setTipoEventoExtra(tipoEventoExtra);
|
|
|
|
|
comEmpTipoEventoExtra.setEmpresa(getEmpresa());
|
|
|
|
|
|
|
|
|
|
comEmpTipoEventoExtra = empresaService.adicionarComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
|
|
|
|
|
|
|
|
|
comEmpTipoEventoExtraList.updateItem(comEmpTipoEventoExtra);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.adicionarComissaoTipoEventoExtra"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onClick$btnRemoverComissaoTipoEventoExtra(Event ev) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(comEmpTipoEventoExtraList.getSelected() != null) {
|
|
|
|
@ -802,24 +805,24 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Labels.getLabel("editarEmpresaController.MSG.borrarComissaoTipoEventoExtraPergunta"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (resp == Messagebox.YES) {
|
|
|
|
|
ComEmpTipoEventoExtra comEmpTipoEventoExtra = (ComEmpTipoEventoExtra) comEmpTipoEventoExtraList.getSelected();
|
|
|
|
|
empresaService.removerComissaoTipoEventoExtra(comEmpTipoEventoExtra);
|
|
|
|
|
comEmpTipoEventoExtraList.removeItem(comEmpTipoEventoExtra);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("editarEmpresaController.msg.removerComissaoTipoEventoExtra"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("editarEmpresaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Combobox getCmbEstadoInscEstadual() {
|
|
|
|
@ -887,7 +890,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
public void setTxtNumAgencia(Textbox txtNumAgencia) {
|
|
|
|
|
this.txtNumAgencia = txtNumAgencia;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Combobox getCmbInscEstCidade() {
|
|
|
|
|
return cmbInscEstCidade;
|
|
|
|
|
}
|
|
|
|
@ -1015,7 +1018,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
Labels.getLabel("editarEmpresaController.contaBancaria.label"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clearContaBancaria();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1094,11 +1097,11 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
public void setComEmpConferencia(ComEmpConferencia comEmpConferencia) {
|
|
|
|
|
this.comEmpConferencia = comEmpConferencia;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Boolean getGeneraNumfoliosistemaVtaInternetImp() {
|
|
|
|
|
return UsuarioLogado.getUsuarioLogado().isPermisoClave(Constantes.CLAVE_GENERA_FOLIOSISTEMA_VTA_INT_IMP_POSTERIOR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Checkbox getChkHabilitarFidelidade() {
|
|
|
|
|
return chkHabilitarFidelidade;
|
|
|
|
|
}
|
|
|
|
@ -1132,7 +1135,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|
|
|
|
empresa.setEmail("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Boolean isPermissaoVendaSemReducaoZ() {
|
|
|
|
|
return !UsuarioLogado.getUsuarioLogado().isPermisoClave(Constantes.CLAVE_EDITAR_VENDA_SEM_REDUCAO_Z);
|
|
|
|
|
}
|
|
|
|
|