fixes bug #6565
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@46918 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
44882421ab
commit
6d1b5ba8ee
|
@ -860,8 +860,16 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pricingRutaList.getModel().getSize() == 0) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.rutaVazio"),
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pricingRutaList.getModel().getSize() == 0 && verificarContemTodas()) {
|
||||
if (verificarContemTodasRuta() && verificarContemTodas()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.rutaVazio"),
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
|
@ -884,7 +892,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (pricingMercadoList.getModel().getSize() == 0) {
|
||||
if (pricingMercadoList.getModel().getSize() == 0 && verificarContemTodasRuta()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.mercadoVazio"),
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
|
@ -895,6 +903,17 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
return true;
|
||||
}
|
||||
|
||||
private boolean verificarContemTodasRuta() {
|
||||
Integer rutaIdTodas = -1;
|
||||
for(int i = 0; i < pricingRutaList.getModel().getSize(); i++ ){
|
||||
PricingRuta princingRuta = (PricingRuta) pricingRutaList.getModel().getElementAt(i);
|
||||
if(princingRuta.getRuta().getRutaId() == rutaIdTodas){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Boolean verificarContemTodas() {
|
||||
String TODAS = "TODAS";
|
||||
for(int i = 0; i < pricingMercadoList.getModel().getSize(); i++ ){
|
||||
|
|
Loading…
Reference in New Issue