Merge pull request 'fixes bug#AL-4368' (!527) from fixbug-AL4368 into master
Reviewed-on: adm/VentaBoletosAdm#527 Reviewed-by: pinheiro <valdevir@rjconsultores.com.br>master 1.77.6
commit
ed8a120b44
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.77.5</version>
|
||||
<version>1.77.6</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Arrays;
|
|||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -592,11 +593,15 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
private Checkbox checkIndBloqueioDescontoWEB;
|
||||
private Checkbox checkIndTaxaConvenienciaOrgaoConcedente;
|
||||
|
||||
private final String constanteIndMotivoBloqueio= "IND_MOTIVO_BLOQUEIO";
|
||||
|
||||
@Autowired
|
||||
private CobrancaAdcPuntoVentaService cobrancaAdcService;
|
||||
|
||||
private List<OrgaoConcedente> lsOrgaoConcedentes;
|
||||
|
||||
private boolean indMotivoBloqueio;
|
||||
|
||||
public Button getBtnApagar() {
|
||||
return btnApagar;
|
||||
}
|
||||
|
@ -773,7 +778,17 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
ptovtaPtoVtaSeguroList.setData(puntoVenta.getPtovtaSeguroList());
|
||||
ptovtaCatIndList.setData(puntoVenta.getPtovtaCatIndList());
|
||||
ptovtaCatIndListTemp.addAll(puntoVenta.getPtovtaCatIndList());
|
||||
ptovtaHistoricoList.setData(puntoVenta.getHistoricoPuntoVentaList());
|
||||
List<HistoricoPuntoVenta> lsHistoricoPuntoVentaOrdenada =puntoVenta.getHistoricoPuntoVentaList();
|
||||
|
||||
Collections.sort(lsHistoricoPuntoVentaOrdenada, new Comparator() {
|
||||
public int compare(Object o1, Object o2) {
|
||||
HistoricoPuntoVenta c1 = (HistoricoPuntoVenta) o1;
|
||||
HistoricoPuntoVenta c2 = (HistoricoPuntoVenta) o2;
|
||||
return c1.getFecBloqueio().compareTo( c2.getFecBloqueio());
|
||||
|
||||
}
|
||||
});
|
||||
ptovtaHistoricoList.setData(lsHistoricoPuntoVentaOrdenada);
|
||||
ptovtaHistoricoFormaPagoList.setData(puntoVenta.getHistoricoFormaPagoPuntoVentaList());
|
||||
categoriasBloqImpPosteriorList.setData(puntoVenta.getCategoriaBloqImpPosteriorList());
|
||||
cobrancaAdicionalList.setData(puntoVenta.getCobrancaAdicionalList());
|
||||
|
@ -864,9 +879,17 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
statusAprobacionInicial = radAprobacionAutorizado.isChecked() ? "A" : "L";
|
||||
motivoBloqueio.setValue(puntoVenta.getMotivoBloqueio());
|
||||
|
||||
obterOValorConstanteIndMotivoBloqueio();
|
||||
if (indMotivoBloqueio) {
|
||||
rowMotivoBloqueio.setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
if (puntoVenta.getPuntoventaId() != null) {
|
||||
|
||||
motivoBloqueio.setValue(puntoVenta.getMotivoBloqueio());
|
||||
|
||||
if (puntoVenta.getAgenciaId() != null) {
|
||||
|
||||
if (puntoVenta.getAgenciaId().getInstiFinanceiraId() != null) {
|
||||
|
@ -895,12 +918,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
if (puntoVenta.getDateAbertura() != null) {
|
||||
dateAbertura.setValue(puntoVenta.getDateAbertura());
|
||||
}
|
||||
|
||||
if (radAprobacionLatente.isChecked()) {
|
||||
dateFechamento.setValue(puntoVenta.getDateFechamento());
|
||||
rowDateFechamento.setVisible(true);
|
||||
motivoBloqueio.setValue(puntoVenta.getMotivoBloqueio());
|
||||
rowMotivoBloqueio.setVisible(true);
|
||||
|
||||
}
|
||||
} else {
|
||||
dateAbertura.setValue(new Date());
|
||||
|
@ -1148,6 +1169,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1920,6 +1944,18 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
txtAntecipPercentual.getValue();
|
||||
numtelefonodos.getValue();
|
||||
numtelefonouno.getValue();
|
||||
if (indMotivoBloqueio) {
|
||||
if (puntoVenta.getPuntoventaId() != null) {
|
||||
String statusAprobacionAtual = radAprobacionAutorizado.isChecked() ? "A" : "L";
|
||||
if (!statusAprobacionAtual.equals(statusAprobacionInicial)) {
|
||||
motivoBloqueio.setConstraint("no empty");
|
||||
motivoBloqueio.getValue();
|
||||
}
|
||||
} else {
|
||||
motivoBloqueio.setConstraint("no empty");
|
||||
motivoBloqueio.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
getTxtTaxaConvenienciaPorc().getValue();
|
||||
if (getTxtTaxaConvenienciaPorc().getValue() != null &&
|
||||
|
@ -2152,7 +2188,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
puntoVenta.setDateFechamento(dateFechamento.getValue());
|
||||
puntoVenta.setMotivoBloqueio(motivoBloqueio.getValue());
|
||||
|
||||
String getString = null;
|
||||
|
||||
puntoVenta.setNumfax(null);
|
||||
|
@ -2245,6 +2281,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
puntoVenta.setStatusaprobacion("L");
|
||||
}
|
||||
|
||||
if (indMotivoBloqueio) {
|
||||
if (puntoVenta.getPuntoventaId() != null) {
|
||||
if (!puntoVenta.getStatusaprobacion().equals(statusAprobacionInicial)) {
|
||||
puntoVenta.setMotivoBloqueio(motivoBloqueio.getValue());
|
||||
}
|
||||
} else {
|
||||
puntoVenta.setMotivoBloqueio(motivoBloqueio.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
if(!puntoVenta.getStatusaprobacion().equals(statusAprobacionInicial)){
|
||||
HistoricoPuntoVenta h = new HistoricoPuntoVenta();
|
||||
h.setPuntoVenta(puntoVenta);
|
||||
|
@ -4168,7 +4214,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
public void onClick$radAprobacionLatente(Event event) {
|
||||
if (radAprobacionLatente.isChecked()) {
|
||||
rowDateFechamento.setVisible(Boolean.TRUE);
|
||||
rowMotivoBloqueio.setVisible(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4176,8 +4221,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
if (!radAprobacionLatente.isChecked()) {
|
||||
dateFechamento.setValue(puntoVenta.getDateFechamento());
|
||||
rowDateFechamento.setVisible(Boolean.FALSE);
|
||||
motivoBloqueio.setValue(null);
|
||||
rowMotivoBloqueio.setVisible(Boolean.FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4861,4 +4904,14 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void obterOValorConstanteIndMotivoBloqueio() {
|
||||
Constante constante = constanteService.buscarPorNomeConstante(constanteIndMotivoBloqueio);
|
||||
if (constante != null && StringUtils.isNotBlank(constante.getValorconstante())
|
||||
&& constante.getValorconstante().equalsIgnoreCase("true")) {
|
||||
indMotivoBloqueio = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -265,7 +265,7 @@
|
|||
<label
|
||||
value="${c:l('editarPuntoVentaController.lbMotivoBloqueio.value')}" />
|
||||
<textbox id="motivoBloqueio"
|
||||
constraint="no zero" width="70%" maxlength="15"
|
||||
constraint="no zero" width="70%" maxlength="100"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
|
|
Loading…
Reference in New Issue