Merge pull request 'fixes bug#AL-3308' (!337) from AL-3308 into master
Reviewed-on: adm/VentaBoletosAdm#337 Reviewed-by: wallace <wallace@rjconsultores.com.br>master 1.35.17
commit
0bd3532303
4
pom.xml
4
pom.xml
|
@ -4,11 +4,11 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.35.16</version>
|
||||
<version>1.35.17</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<modelWeb.version>1.26.2</modelWeb.version>
|
||||
<modelWeb.version>1.26.3</modelWeb.version>
|
||||
<flyway.version>1.22.1</flyway.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
|
|
@ -102,6 +102,8 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
/*Forma de Pagamento*/
|
||||
private Combobox cmbEmpresaFormaPago;
|
||||
private MyListbox formaPagoList;
|
||||
private List<TipoEventoExtraEmpresa> lsTipoEventoExtraEmpresa;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -125,7 +127,7 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
tipoEventoExtra = (TipoEventoExtra) Executions.getCurrent().getArg().get("tipoEventoExtra");
|
||||
tipoEventoExtraList = (MyListbox) Executions.getCurrent().getArg().get("tipoEventoExtraList");
|
||||
|
||||
//lsTipoEventoExtraEmpresas = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraEmpresa>() : tipoEventoExtraEmpresaService.buscarPorTipoEventoExtra(tipoEventoExtra);
|
||||
//lsTipoEventoExtraEmpresa = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraEmpresa>() : tipoEventoExtraEmpresaService.buscarPorTipoEventoExtra(tipoEventoExtra);
|
||||
empresasList.setData(tipoEventoExtra.getEmpresas());
|
||||
agenciasList.setData(tipoEventoExtra.getPontosventa());
|
||||
|
||||
|
@ -162,12 +164,9 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
txtNome.focus();
|
||||
|
||||
lsFormaPago = formaPagoService.obtenerTodos();
|
||||
|
||||
if (tipoEventoExtra.getTipoeventoextraId() != null) {
|
||||
lsTipoEventoExtraFormaPago = tipoEventoExtraFormaPagoService.obtenerTodos();
|
||||
lsTipoEventoExtraFormaPago = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraFormaPago>() : tipoEventoExtraFormaPagoService.buscarPorTipoEventoExtra(tipoEventoExtra);
|
||||
formaPagoList.setData(lsTipoEventoExtraFormaPago);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException {
|
||||
if (empresasList.getSelectedItem() == null){
|
||||
|
@ -193,11 +192,19 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
return;
|
||||
}
|
||||
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||
|
||||
tipoEventoExtra.addEmpresa(e);
|
||||
|
||||
Boolean achou = Boolean.FALSE;
|
||||
if (e != null) {
|
||||
for (TipoEventoExtraEmpresa empresas : tipoEventoExtra.getEmpresas()) {
|
||||
if (empresas.getEmpresa().equals(e)) {
|
||||
achou = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
if (!achou&&getTipoEventoExtra()!=null){
|
||||
tipoEventoExtraEmpresaService.actualizacion(tipoEventoExtra.addEmpresa(e));
|
||||
empresasList.setData(tipoEventoExtra.getEmpresas());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarAgencia(Event ev) throws InterruptedException {
|
||||
if (cmbPontoVenda.getSelectedItem() == null){
|
||||
|
|
Loading…
Reference in New Issue