List<EntityCondition> backordersCondList = FastList.newInstance();
backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.NOT_EQUAL, null));
backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.GREATER_THAN, BigDecimal.ZERO));
//backordersCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_CREATED"), EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.LESS_THAN, "ITEM_APPROVED")));
List<GenericValue> backorders = delegator.findList("OrderItemAndShipGrpInvResAndItem",
EntityCondition.makeCondition(backordersCondList, EntityOperator.AND), null,
UtilMisc.toList("shipBeforeDate"), null, false);
for(GenericValue genericResult : backorders) {
String productId = genericResult.getString("productId");
GenericValue orderItemShipGroup = delegator.findByPrimaryKey("OrderItemShipGroup", UtilMisc.toMap("orderId", genericResult.get("orderId"),