alexandre.lima 2017-07-17 14:34:17 +00:00
parent 9ce047a294
commit 2381fc9296
1 changed files with 5 additions and 1 deletions

View File

@ -264,9 +264,13 @@ public class EditarSeguroKmController extends MyGenericForwardComposer {
//ChecandoDuplicado //ChecandoDuplicado
boolean existe = false; boolean existe = false;
for (SeguroKm km : lsSeguroKm) { for (SeguroKm km : lsSeguroKm) {
if ((txtKm.isVisible() && km.getKmate().equals(txtKm.getValue())) || (txtKmSemTpp.isVisible() && km.getKmate().equals(txtKmSemTpp.getValue()))) { if (txtKm.isVisible() && km.getKmate().equals(txtKm.getValue()) && km.getTipoSeguro().equals(TipoSeguro.SEGURO)) {
existe = true; existe = true;
} }
if (txtKmSemTpp.isVisible() && km.getKmate().equals(txtKmSemTpp.getValue()) && km.getTipoSeguro().equals(cmbTipoSeguro.getValue())) {
existe = true;
}
} }
if (existe) { if (existe) {