Merge pull request 'fixes bug#AL-4688' (!630) from AL-4688 into master
Reviewed-on: adm/VentaBoletosAdm#630 Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>master 1.118.4
commit
d96593e8ec
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.118.3</version>
|
<version>1.118.4</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -1458,6 +1458,43 @@ public class EditarConvenioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnAdicionarPuntoVenta(Event ev) throws InterruptedException {
|
||||||
|
if (cmbPuntoVenta.getSelectedItem() != null) {
|
||||||
|
PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue();
|
||||||
|
|
||||||
|
ConvenioPuntoVenta convenioPuntoVentaToAdd = new ConvenioPuntoVenta();
|
||||||
|
convenioPuntoVentaToAdd.setActivo(Boolean.TRUE);
|
||||||
|
convenioPuntoVentaToAdd.setConvenio(convenio);
|
||||||
|
convenioPuntoVentaToAdd.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
convenioPuntoVentaToAdd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
convenioPuntoVentaToAdd.setPuntoVenta(puntoVenta);
|
||||||
|
|
||||||
|
boolean achou = Boolean.FALSE;
|
||||||
|
for (ConvenioPuntoVenta convenioPuntoVentaInTheList : lsConvenioPuntoVenta) {
|
||||||
|
if (convenioPuntoVentaInTheList.getPuntoVenta().equals(convenioPuntoVentaToAdd.getPuntoVenta()) && convenioPuntoVentaInTheList.getActivo()) {
|
||||||
|
achou = Boolean.TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!achou) {
|
||||||
|
lsConvenioPuntoVenta.add(convenioPuntoVentaToAdd);
|
||||||
|
convenio.setConvenioPuntoVentaList(lsConvenioPuntoVenta);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ConvenioPuntoVenta> tempList = new ArrayList<ConvenioPuntoVenta>();
|
||||||
|
if(lsConvenioPuntoVenta != null) {
|
||||||
|
for (ConvenioPuntoVenta convenioPuntoVenta : lsConvenioPuntoVenta) {
|
||||||
|
if(convenioPuntoVenta.getActivo()) {
|
||||||
|
tempList.add(convenioPuntoVenta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
convenioPuntoVentaList.setData(tempList);
|
||||||
|
cmbPuntoVenta.setSelectedItem(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverPuntoVenta(Event ev) {
|
public void onClick$btnRemoverPuntoVenta(Event ev) {
|
||||||
try {
|
try {
|
||||||
ConvenioPuntoVenta convenioPuntoVentaToRemove = (ConvenioPuntoVenta) convenioPuntoVentaList.getSelected();
|
ConvenioPuntoVenta convenioPuntoVentaToRemove = (ConvenioPuntoVenta) convenioPuntoVentaList.getSelected();
|
||||||
|
|
Loading…
Reference in New Issue