} catch (Exception ex) {
clearBean();
throw new ClipsException("Не удалось загрузить дисконты",ex);
}
DirectoryDiscountLevel directoryLevels = DirectoryLocator.getDirectory(DirectoryDiscountLevel.class, false);
DirectoryServiceClass directoryClasses = DirectoryLocator.getDirectory(DirectoryServiceClass.class);
for(int i=0; i<list.size(); i++) {
DiscountDetails d = list.get(i);
DirectoryDiscountLevelItem level = directoryLevels.getItemFromID(d.level);
DirectoryServiceClassItem cls = directoryClasses.getItemFromID(d.cls);
discount.setValue(level, cls, d.value);
}
discount.setLoaded();