public double getTaxTotal() {
return getTaxTotalBd().doubleValue();
}
public Set getItemFeatureSet(GenericValue item) {
Set featureSet = new ListOrderedSet();
List featureAppls = null;
if (item.get("productId") != null) {
try {
featureAppls = item.getDelegator().findByAndCache("ProductFeatureAppl", UtilMisc.toMap("productId", item.getString("productId")));
List filterExprs = UtilMisc.toList(new EntityExpr("productFeatureApplTypeId", EntityOperator.EQUALS, "STANDARD_FEATURE"));
filterExprs.add(new EntityExpr("productFeatureApplTypeId", EntityOperator.EQUALS, "REQUIRED_FEATURE"));
featureAppls = EntityUtil.filterByOr(featureAppls, filterExprs);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get ProductFeatureAppl for item : " + item, module);
}
if (featureAppls != null) {
Iterator fai = featureAppls.iterator();
while (fai.hasNext()) {
GenericValue appl = (GenericValue) fai.next();
featureSet.add(appl.getString("productFeatureId"));
}
}
}
// get the ADDITIONAL_FEATURE adjustments
List additionalFeatures = null;
try {
additionalFeatures = item.getRelatedByAnd("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "ADDITIONAL_FEATURE"));
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get OrderAdjustment from item : " + item, module);
}
if (additionalFeatures != null) {
Iterator afi = additionalFeatures.iterator();
while (afi.hasNext()) {
GenericValue adj = (GenericValue) afi.next();
String featureId = adj.getString("productFeatureId");
if (featureId != null) {
featureSet.add(featureId);
}
}
}
return featureSet;