You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/03/24 08:23:50 UTC

svn commit: r1084863 [4/11] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/data/ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/of...

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Thu Mar 24 07:23:42 2011
@@ -175,7 +175,7 @@ public class ProductPromoWorker {
         try {
             Iterator<GenericValue> productStorePromoAppls = UtilMisc.toIterator(EntityUtil.filterByDate(productStore.getRelatedCache("ProductStorePromoAppl", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum")), true));
             while (productStorePromoAppls != null && productStorePromoAppls.hasNext()) {
-                GenericValue productStorePromoAppl = (GenericValue) productStorePromoAppls.next();
+                GenericValue productStorePromoAppl = productStorePromoAppls.next();
                 if (UtilValidate.isNotEmpty(productStorePromoAppl.getString("manualOnly")) && "Y".equals(productStorePromoAppl.getString("manualOnly"))) {
                     // manual only promotions are not automatically evaluated (they must be explicitly selected by the user)
                     if (Debug.verboseOn()) Debug.logVerbose("Skipping promotion with id [" + productStorePromoAppl.getString("productPromoId") + "] because it is applied to the store with ID " + productStoreId + " as a manual only promotion.", module);
@@ -184,7 +184,7 @@ public class ProductPromoWorker {
                 GenericValue productPromo = productStorePromoAppl.getRelatedOneCache("ProductPromo");
                 Iterator<GenericValue> productPromoCodesIter = UtilMisc.toIterator(productPromo.getRelatedCache("ProductPromoCode", null, null));
                 while (productPromoCodesIter != null && productPromoCodesIter.hasNext()) {
-                    GenericValue productPromoCode = (GenericValue) productPromoCodesIter.next();
+                    GenericValue productPromoCode = productPromoCodesIter.next();
                     promoCodes.add(productPromoCode.getString("productPromoCodeId"));
                 }
             } 
@@ -330,7 +330,7 @@ public class ProductPromoWorker {
             List<Map<Object, Object>> productPromoDiscountMapListOrderTotal = FastList.newInstance();
             Iterator<GenericValue> productPromoIter = productPromoList.iterator();
             while (productPromoIter.hasNext()) {
-                GenericValue productPromo = (GenericValue) productPromoIter.next();
+                GenericValue productPromo = productPromoIter.next();
                 Map<Object, Object> productPromoDiscountMap = UtilGenerics.checkMap(UtilMisc.toMap("productPromo", productPromo, "totalDiscountAmount", cart.getProductPromoUseTotalDiscount(productPromo.getString("productPromoId"))));
                 if (hasOrderTotalCondition(productPromo, delegator)) {
                     productPromoDiscountMapListOrderTotal.add(productPromoDiscountMap);
@@ -426,7 +426,7 @@ public class ProductPromoWorker {
                                 List<GenericValue> orderproductPromoCodes =  delegator.findList("OrderProductPromoCode", EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, cart.getOrderId()), null, null, null, false);
                                 Iterator<GenericValue> orderproductPromoCodesItr = UtilMisc.toIterator(orderproductPromoCodes);
                                 while (orderproductPromoCodesItr != null && orderproductPromoCodesItr.hasNext()) {
-                                    GenericValue orderproductPromoCode = (GenericValue) orderproductPromoCodesItr.next();
+                                    GenericValue orderproductPromoCode = orderproductPromoCodesItr.next();
                                     enteredCodes.add(orderproductPromoCode.getString("productPromoCodeId"));
                                 }
                             }
@@ -753,7 +753,7 @@ public class ProductPromoWorker {
 
             Iterator<GenericValue> promoRulesIter = productPromoRules.iterator();
             while (promoRulesIter != null && promoRulesIter.hasNext()) {
-                GenericValue productPromoRule = (GenericValue) promoRulesIter.next();
+                GenericValue productPromoRule = promoRulesIter.next();
 
                 // if apply then performActions when no conditions are false, so default to true
                 boolean performActions = true;
@@ -766,7 +766,7 @@ public class ProductPromoWorker {
 
                 Iterator<GenericValue> productPromoCondIter = UtilMisc.toIterator(productPromoConds);
                 while (productPromoCondIter != null && productPromoCondIter.hasNext()) {
-                    GenericValue productPromoCond = (GenericValue) productPromoCondIter.next();
+                    GenericValue productPromoCond = productPromoCondIter.next();
 
                     boolean condResult = checkCondition(productPromoCond, cart, delegator, dispatcher, nowTimestamp);
 
@@ -783,7 +783,7 @@ public class ProductPromoWorker {
                     List<GenericValue> productPromoActions = productPromoRule.getRelatedCache("ProductPromoAction", null, UtilMisc.toList("productPromoActionSeqId"));
                     Iterator<GenericValue> productPromoActionIter = UtilMisc.toIterator(productPromoActions);
                     while (productPromoActionIter != null && productPromoActionIter.hasNext()) {
-                        GenericValue productPromoAction = (GenericValue) productPromoActionIter.next();
+                        GenericValue productPromoAction = productPromoActionIter.next();
                         try {
                             ActionResultInfo actionResultInfo = performAction(productPromoAction, cart, delegator, dispatcher, nowTimestamp);
                             totalDiscountAmount = totalDiscountAmount.add(actionResultInfo.totalDiscountAmount);
@@ -1295,20 +1295,22 @@ public class ProductPromoWorker {
         BigDecimal amountOff = listPrice.subtract(basePrice);
         BigDecimal percentOff = amountOff.divide(listPrice, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100L));
 
-        BigDecimal condValueBigDecimal = new BigDecimal(condValue);
-
         Integer compareBase = null;
 
         if ("PPIP_LPMUP_AMT".equals(inputParamEnumId)) {
+            // NOTE: only check this after we know it's this type of cond, otherwise condValue may not be a number
+            BigDecimal condValueBigDecimal = new BigDecimal(condValue);
             compareBase = Integer.valueOf(amountOff.compareTo(condValueBigDecimal));
         } else if ("PPIP_LPMUP_PER".equals(inputParamEnumId)) {
+            // NOTE: only check this after we know it's this type of cond, otherwise condValue may not be a number
+            BigDecimal condValueBigDecimal = new BigDecimal(condValue);
             compareBase = Integer.valueOf(percentOff.compareTo(condValueBigDecimal));
         } else {
             // condition doesn't apply to individual item, always passes
             return true;
         }
 
-        Debug.logInfo("Checking condition for item productId=" + cartItem.getProductId() + ", listPrice=" + listPrice + ", basePrice=" + basePrice + ", amountOff=" + amountOff + ", percentOff=" + percentOff + ", condValueBigDecimal=" + condValueBigDecimal + ", compareBase=" + compareBase + ", productPromoCond=" + productPromoCond, module);
+        Debug.logInfo("Checking condition for item productId=" + cartItem.getProductId() + ", listPrice=" + listPrice + ", basePrice=" + basePrice + ", amountOff=" + amountOff + ", percentOff=" + percentOff + ", condValue=" + condValue + ", compareBase=" + compareBase + ", productPromoCond=" + productPromoCond, module);
 
         if (compareBase != null) {
             int compare = compareBase.intValue();
@@ -1672,7 +1674,7 @@ public class ProductPromoWorker {
             List<ShoppingCartItem> lineOrderedByBasePriceList = cart.getLineListOrderedByBasePrice(false);
             Iterator<ShoppingCartItem> lineOrderedByBasePriceIter = lineOrderedByBasePriceList.iterator();
             while (quantityDesired.compareTo(BigDecimal.ZERO) > 0 && lineOrderedByBasePriceIter.hasNext()) {
-                ShoppingCartItem cartItem = (ShoppingCartItem) lineOrderedByBasePriceIter.next();
+                ShoppingCartItem cartItem = lineOrderedByBasePriceIter.next();
                 // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                 String parentProductId = cartItem.getParentProductId();
                 GenericValue product = cartItem.getProduct();

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/task/TaskWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/task/TaskWorker.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/task/TaskWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/task/TaskWorker.java Thu Mar 24 07:23:42 2011
@@ -53,7 +53,7 @@ public class TaskWorker {
 
     public static String getPrettyStatus(GenericValue orderTaskList) {
         String statusId = orderTaskList.getString("currentStatusId");
-        String prettyStatus = (String) statusMapping.get(statusId);
+        String prettyStatus = statusMapping.get(statusId);
         if (prettyStatus == null)
             prettyStatus = "?";
         return prettyStatus;

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/test/OrderTestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/test/OrderTestServices.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/test/OrderTestServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/test/OrderTestServices.java Thu Mar 24 07:23:42 2011
@@ -98,7 +98,7 @@ public class OrderTestServices {
                     if (productCategoryMembers != null) {
                         Iterator<GenericValue> i = productCategoryMembers.iterator();
                         while (i.hasNext()) {
-                            GenericValue prodCatMemb = (GenericValue) i.next();
+                            GenericValue prodCatMemb = i.next();
                             if (prodCatMemb != null) {
                                 productsList.add(prodCatMemb.getString("productId"));
                             }
@@ -136,11 +136,11 @@ public class OrderTestServices {
             // get a product
             int k = r.nextInt(productsList.size());
             try {
-                cart.addOrIncreaseItem((String) productsList.get(k), null, BigDecimal.ONE, null, null, null,
+                cart.addOrIncreaseItem(productsList.get(k), null, BigDecimal.ONE, null, null, null,
                                        null, null, null, null,
                                        null /*catalogId*/, null, null/*itemType*/, null/*itemGroupNumber*/, null, dispatcher);
             } catch (Exception exc) {
-                Debug.logWarning("Error adding product with id " + (String) productsList.get(k) + " to the cart: " + exc.getMessage(), module);
+                Debug.logWarning("Error adding product with id " + productsList.get(k) + " to the cart: " + exc.getMessage(), module);
             }
         }
         cart.setDefaultCheckoutOptions(dispatcher);

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Thu Mar 24 07:23:42 2011
@@ -243,9 +243,9 @@ public class ZipSalesServices {
         try {
             // loop through and get per item tax rates
             for (int i = 0; i < itemProductList.size(); i++) {
-                GenericValue product = (GenericValue) itemProductList.get(i);
-                BigDecimal itemAmount = (BigDecimal) itemAmountList.get(i);
-                BigDecimal shippingAmount = (BigDecimal) itemShippingList.get(i);
+                GenericValue product = itemProductList.get(i);
+                BigDecimal itemAmount = itemAmountList.get(i);
+                BigDecimal shippingAmount = itemShippingList.get(i);
                 itemAdjustments.add(getItemTaxList(delegator, product, postalCode, city, itemAmount, shippingAmount, false));
             }
             if (orderShippingAmount.compareTo(BigDecimal.ZERO) > 0) {
@@ -318,7 +318,7 @@ public class ZipSalesServices {
         // get the first one
         GenericValue taxEntry = null;
         if (UtilValidate.isNotEmpty(taxLookup)) {
-            taxEntry = (GenericValue) taxLookup.iterator().next();
+            taxEntry = taxLookup.iterator().next();
         }
 
         if (taxEntry == null) {
@@ -368,7 +368,7 @@ public class ZipSalesServices {
                     // if we found an rule which passes no need to contine (all rules are ||)
                     break;
                 }
-                GenericValue rule = (GenericValue) ruleIterator.next();
+                GenericValue rule = ruleIterator.next();
                 String idCode = rule.getString("idCode");
                 String taxable = rule.getString("taxable");
                 String condition = rule.getString("shipCond");

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy Thu Mar 24 07:23:42 2011
@@ -34,6 +34,10 @@ catalogName = CatalogWorker.getCatalogNa
 productCategoryId = request.getAttribute("productCategoryId") ?: parameters.category_id;
 context.productCategoryId = productCategoryId;
 
+pageTitle = null;
+metaDescription = null;
+metaKeywords = null;
+
 /* NOTE DEJ20070220: this is a weird way to do this and caused unacceptable side effects as described in the related
  * comment in the Main.groovy file
  *
@@ -58,14 +62,44 @@ if (category) {
     if (category.detailScreen) {
         detailScreen = category.detailScreen;
     }
+    categoryPageTitle = delegator.findByAndCache("ProductCategoryContentAndInfo", [productCategoryId : productCategoryId, prodCatContentTypeId : "PAGE_TITLE"]);
+    if (categoryPageTitle) {
+        pageTitle = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : categoryPageTitle.get(0).dataResourceId]);
+    }
+    categoryMetaDescription = delegator.findByAndCache("ProductCategoryContentAndInfo", [productCategoryId : productCategoryId, prodCatContentTypeId : "META_DESCRIPTION"]);
+    if (categoryMetaDescription) {
+        metaDescription = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : categoryMetaDescription.get(0).dataResourceId]);
+    }
+    categoryMetaKeywords = delegator.findByAndCache("ProductCategoryContentAndInfo", [productCategoryId : productCategoryId, prodCatContentTypeId : "META_KEYWORD"]);
+    if (categoryMetaKeywords) {
+        metaKeywords = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : categoryMetaKeywords.get(0).dataResourceId]);
+    }
     categoryContentWrapper = new CategoryContentWrapper(category, request);
-    context.title = categoryContentWrapper.CATEGORY_NAME;
+    
     categoryDescription = categoryContentWrapper.DESCRIPTION;
-    if (categoryDescription) {
-        context.metaDescription = categoryDescription;
-        context.metaKeywords = categoryDescription + ", " + catalogName;
+
+    if (pageTitle) {
+        context.title = pageTitle.textData;
+    } else {
+        context.title = categoryContentWrapper.CATEGORY_NAME;
+    }
+
+    if (metaDescription) {
+        context.metaDescription = metaDescription.textData;
+    } else {
+        if (categoryDescription) {
+            context.metaDescription = categoryDescription;
+        }
+    }
+
+    if (metaKeywords) {
+        context.metaKeywords = metaKeywords.textData;
     } else {
-        context.metaKeywords = catalogName;
+        if (categoryDescription) {
+            context.metaKeywords = categoryDescription + ", " + catalogName;
+        } else {
+            context.metaKeywords = catalogName;
+        }
     }
     context.productCategory = category;
 }

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Thu Mar 24 07:23:42 2011
@@ -36,6 +36,10 @@ requestParams = UtilHttp.getParameterMap
 detailScreen = "productdetail";
 productId = requestParams.product_id ?: request.getAttribute("product_id");
 
+pageTitle = null;
+metaDescription = null;
+metaKeywords = null;
+
 /*
  * NOTE JLR 20070221 this should be done using the same method than in add to cart. I will do it like that and remove all this after.
  *
@@ -72,6 +76,19 @@ if (productId) {
         product = delegator.findByPrimaryKeyCache("Product", [productId : productId]);
     }
 
+    productPageTitle = delegator.findByAndCache("ProductContentAndInfo", [productId : productId, productContentTypeId : "PAGE_TITLE"]);
+    if (productPageTitle) {
+        pageTitle = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : productPageTitle.get(0).dataResourceId]);
+    }
+    productMetaDescription = delegator.findByAndCache("ProductContentAndInfo", [productId : productId, productContentTypeId : "META_DESCRIPTION"]);
+    if (productMetaDescription) {
+        metaDescription = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : productMetaDescription.get(0).dataResourceId]);
+    }
+    productMetaKeywords = delegator.findByAndCache("ProductContentAndInfo", [productId : productId, productContentTypeId : "META_KEYWORD"]);
+    if (productMetaKeywords) {
+        metaKeywords = delegator.findByPrimaryKeyCache("ElectronicText", [dataResourceId : productMetaKeywords.get(0).dataResourceId]);
+    }
+
     context.productId = productId;
 
     // now check to see if there is a view allow category and if this product is in it...
@@ -88,20 +105,34 @@ if (productId) {
     if (product) {
         context.product = product;
         contentWrapper = new ProductContentWrapper(product, request);
-        context.put("title", contentWrapper.get("PRODUCT_NAME"));
-        context.put("metaDescription", contentWrapper.get("DESCRIPTION"));
 
-        keywords = [];
-        keywords.add(product.productName);
-        keywords.add(catalogName);
-        members = delegator.findByAndCache("ProductCategoryMember", [productId : productId]);
-        members.each { member ->
-            category = member.getRelatedOneCache("ProductCategory");
-            if (category.description) {
-                keywords.add(category.description);
+        if (pageTitle) {
+            context.title = pageTitle.textData;
+        } else {
+            context.put("title", contentWrapper.get("PRODUCT_NAME"));
+        }
+
+        if (metaDescription) {
+            context.metaDescription = metaDescription.textData;
+        } else {
+            context.put("metaDescription", contentWrapper.get("DESCRIPTION"));
+        }
+
+        if (metaKeywords) {
+            context.metaKeywords = metaKeywords.textData;
+        } else {
+            keywords = [];
+            keywords.add(product.productName);
+            keywords.add(catalogName);
+            members = delegator.findByAndCache("ProductCategoryMember", [productId : productId]);
+            members.each { member ->
+                category = member.getRelatedOneCache("ProductCategory");
+                if (category.description) {
+                    keywords.add(category.description);
+                }
             }
+            context.metaKeywords = StringUtil.join(keywords, ", ");
         }
-        context.metaKeywords = StringUtil.join(keywords, ", ");
 
         // Set the default template for aggregated product (product component configurator ui)
         if (product.productTypeId && "AGGREGATED".equals(product.productTypeId) && context.configproductdetailScreen) {

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy Thu Mar 24 07:23:42 2011
@@ -41,31 +41,25 @@ double calcItemCount(List items) {
     return count;
 }
 
-cal = Calendar.getInstance();
-cal.set(Calendar.AM_PM, Calendar.AM);
-cal.set(Calendar.HOUR, 0);
-cal.set(Calendar.MINUTE, 0);
-cal.set(Calendar.SECOND, 0);
-cal.set(Calendar.MILLISECOND, 0);
-dayBegin = new Timestamp(cal.getTime().getTime());
-
-cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
-weekBegin = new Timestamp(cal.getTime().getTime());
-
-cal.set(Calendar.DAY_OF_MONTH, 1);
-monthBegin = new Timestamp(cal.getTime().getTime());
-
-cal.set(Calendar.MONTH, 0);
-yearBegin = new Timestamp(cal.getTime().getTime());
+dayBegin = UtilDateTime.getDayStart(nowTimestamp, timeZone, locale);
+weekBegin = UtilDateTime.getWeekStart(nowTimestamp, timeZone, locale);
+monthBegin = UtilDateTime.getMonthStart(nowTimestamp, timeZone, locale);
+yearBegin = UtilDateTime.getYearStart(nowTimestamp, timeZone, locale);
+
+dayEnd = UtilDateTime.getDayEnd(nowTimestamp, timeZone, locale);
+weekEnd = UtilDateTime.getWeekEnd(nowTimestamp, timeZone, locale);
+monthEnd = UtilDateTime.getMonthEnd(nowTimestamp, timeZone, locale);
+yearEnd = UtilDateTime.getYearEnd(nowTimestamp, timeZone, locale);
 
 // order status report
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, dayEnd)],
                     EntityOperator.AND);
 dayList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.dayOrder = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_ORDERED"]);
+context.dayOrder = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_CREATED"]);
 context.dayApprove = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_APPROVED"]);
 context.dayComplete = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_COMPLETED"]);
 context.dayCancelled = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_CANCELLED"]);
@@ -74,10 +68,11 @@ context.dayRejected = EntityUtil.filterB
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, weekEnd)],
                     EntityOperator.AND);
 weekList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.weekOrder = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_ORDERED"]);
+context.weekOrder = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_CREATED"]);
 context.weekApprove = EntityUtil.filterByAnd(weekList, [statusId: "ORDER_APPROVED"]);
 context.weekComplete = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_COMPLETED"]);
 context.weekCancelled = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_CANCELLED"]);
@@ -86,10 +81,11 @@ context.weekRejected = EntityUtil.filter
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, monthEnd)],
                     EntityOperator.AND);
 monthList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.monthOrder = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_ORDERED"]);
+context.monthOrder = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_CREATED"]);
 context.monthApprove = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_APPROVED"]);
 context.monthComplete = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_COMPLETED"]);
 context.monthCancelled = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_CANCELLED"]);
@@ -98,10 +94,11 @@ context.monthRejected = EntityUtil.filte
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO, yearEnd)],
                     EntityOperator.AND);
 yearList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.yearOrder = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_ORDERED"]);
+context.yearOrder = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_CREATED"]);
 context.yearApprove = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_APPROVED"]);
 context.yearComplete = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_COMPLETED"]);
 context.yearCancelled = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_CANCELLED"]);
@@ -112,6 +109,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, dayEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 dayItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -121,10 +119,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, dayEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 dayHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, [statusId : "ORDER_ORDERED"]);
+dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, [statusId : "ORDER_CREATED"]);
 
 dayItemTotal = calcItemTotal(dayHeaders);
 dayItemCount = calcItemCount(dayItems);
@@ -143,6 +142,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, weekEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 weekItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -152,10 +152,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, weekEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 weekHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, [statusId : "ORDER_ORDERED"]);
+weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, [statusId : "ORDER_CREATED"]);
 
 weekItemTotal = calcItemTotal(weekHeaders);
 weekItemCount = calcItemCount(weekItems);
@@ -174,6 +175,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, monthEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 monthItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -183,10 +185,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, monthEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 monthHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, [statusId : "ORDER_ORDERED"]);
+monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, [statusId : "ORDER_CREATED"]);
 
 monthItemTotal = calcItemTotal(monthHeaders);
 monthItemCount = calcItemCount(monthItems);
@@ -205,6 +208,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, yearEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 yearItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -214,10 +218,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, yearEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")],
                     EntityOperator.AND);
 yearHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, [statusId : "ORDER_ORDERED"]);
+yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, [statusId : "ORDER_CREATED"]);
 
 yearItemTotal = calcItemTotal(yearHeaders);
 yearItemCount = calcItemCount(yearItems);
@@ -233,7 +238,7 @@ context.yearItemTotalPaid = yearItemTota
 context.yearItemCountPaid = yearItemCountPaid;
 
 // order state report
-waitingPayment = delegator.findByAnd("OrderHeader", [statusId : "ORDER_ORDERED", orderTypeId : "SALES_ORDER"]);
+waitingPayment = delegator.findByAnd("OrderHeader", [statusId : "ORDER_CREATED", orderTypeId : "SALES_ORDER"]);
 context.waitingPayment = waitingPayment.size();
 
 waitingApproval = delegator.findByAnd("OrderHeader", [statusId : "ORDER_PROCESSING", orderTypeId : "SALES_ORDER"]);

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderstats.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderstats.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderstats.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderstats.ftl Thu Mar 24 07:23:42 2011
@@ -128,7 +128,7 @@ under the License.
           </tr>
           <tr class="alternate-row">
             <td>&nbsp;</td>
-            <td>${uiLabelMap.OrderOrdered}</td>
+            <td>${uiLabelMap.OrderCreated}</td>
             <td align="right">${dayOrder?size?default(0)?string.number}</td>
             <td align="right">${weekOrder?size?default(0)?string.number}</td>
             <td align="right">${monthOrder?size?default(0)?string.number}</td>

Modified: ofbiz/branches/jackrabbit20100709/applications/order/widget/ordermgr/QuoteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/widget/ordermgr/QuoteScreens.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/widget/ordermgr/QuoteScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/widget/ordermgr/QuoteScreens.xml Thu Mar 24 07:23:42 2011
@@ -40,11 +40,11 @@ under the License.
                                     </condition>
                                     <widgets>
                                         <include-menu name="QuoteTabBar" location="component://order/widget/ordermgr/OrderMenus.xml"/>
+                                        <container>
+                                            <label style="h1">[${uiLabelMap.CommonId}:${quote.quoteId}] ${quote.description}</label>
+                                        </container>
                                     </widgets>
                                 </section>
-                                <container>
-                                    <label style="h1">[${uiLabelMap.CommonId}:${quote.quoteId}] ${quote.description}</label>
-                                </container>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>

Modified: ofbiz/branches/jackrabbit20100709/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/entitydef/entitymodel.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/entitydef/entitymodel.xml Thu Mar 24 07:23:42 2011
@@ -655,7 +655,7 @@ under the License.
         <field name="datetimeStarted" type="date-time"></field>
         <field name="datetimeEnded" type="date-time"></field>
         <field name="subject" type="long-varchar"></field>
-        <field name="contentMimeTypeId" type="id-long"/>
+        <field name="contentMimeTypeId" type="id-vlong"/>
         <field name="content" type="very-long"></field>
         <field name="note" type="comment"></field>
         <field name="reasonEnumId" type="id"></field>

Modified: ofbiz/branches/jackrabbit20100709/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Thu Mar 24 07:23:42 2011
@@ -344,6 +344,8 @@ under the License.
         <if-empty field="event"><!-- the service can be called multiple times because event can have several recipients-->
             <return/><!-- ignore if already deleted -->
         </if-empty>
+        <!-- remove related links to work effort -->
+        <remove-related relation-name="CommunicationEventWorkEff" value-field="event"/>
         <!-- remove related links to content -->
         <get-related value-field="event" relation-name="CommEventContentAssoc" list="contentAssocs"/>
         <if-not-empty field="contentAssocs">

Propchange: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 24 07:23:42 2011
@@ -2,3 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-952957
 /ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264
+/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:962442-1084618

Modified: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/js/PartyProfileContent.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/js/PartyProfileContent.js?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/js/PartyProfileContent.js (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/js/PartyProfileContent.js Thu Mar 24 07:23:42 2011
@@ -90,7 +90,6 @@ function getUploadProgressStatus(event){
             var timerId = timerId;
             jQuery.ajax({
                 url: 'getFileUploadProgressStatus',
-                dataType: "json",
                 success: function(data) {
                     if (data._ERROR_MESSAGE_LIST_ != undefined) {
                         jQuery('#content-messages').html(data._ERROR_MESSAGE_LIST_);

Modified: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/Content.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/Content.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/Content.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/Content.ftl Thu Mar 24 07:23:42 2011
@@ -50,12 +50,6 @@ under the License.
             <option value="${role.roleTypeId}" <#if role.roleTypeId == "_NA_">selected="selected"</#if>>${role.get("description", locale)?default(role.roleTypeId)}</option>
           </#list>
         </select>
-        <select name="mimeTypeId">
-          <option value="">${uiLabelMap.PartySelectMimeType}</option>
-          <#list mimeTypes as mimeType>
-            <option value="${mimeType.mimeTypeId}">${mimeType.get("description", locale)?default(mimeType.mimeTypeId)}</option>
-          </#list>
-        </select>
         <input type="submit" value="${uiLabelMap.CommonUpload}"/>
       </form>
       <div id='progress_bar'><div></div></div>

Modified: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl Thu Mar 24 07:23:42 2011
@@ -28,7 +28,7 @@ under the License.
             <#assign pcType = pContent.getRelatedOne("PartyContentType")>
             <tr>
               <td class="button-col"><a href="<@o...@ofbizUrl>">${content.contentId}</a></td>
-              <td>${pcType.description?if_exists}</td>
+              <td>${(pcType.get("description", locale))?if_exists}</td>
               <td>${content.contentName?if_exists}</td>
               <td>${(contentType.get("description",locale))?if_exists}</td>
               <td>${(mimeType.description)?if_exists}</td>
@@ -41,7 +41,7 @@ under the License.
                 <form name="removePartyContent_${pContent_index}" method="post" action="<@o...@ofbizUrl>">
                   <input type="hidden" name="contentId" value="${pContent.contentId}" />
                   <input type="hidden" name="partyId" value="${pContent.partyId}" />
-                  <input type="hidden" name="partyContentTypeId" value= ${pContent.partyContentTypeId}" />
+                  <input type="hidden" name="partyContentTypeId" value="${pContent.partyContentTypeId}" />
                   <input type="hidden" name="fromDate" value="${pContent.fromDate}" />
                   <a href="javascript:document.removePartyContent_${pContent_index}.submit()">${uiLabelMap.CommonRemove}</a>
                 </form>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/config/ProductEntityLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/config/ProductEntityLabels.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/config/ProductEntityLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/config/ProductEntityLabels.xml Thu Mar 24 07:23:42 2011
@@ -1729,7 +1729,7 @@
         <value xml:lang="zh_TW">禮品包裝</value>
     </property>
     <property key="ProductFeatureType.description.HARDWARE_FEATURE">
-        <value xml:lang="de">Hardeware-Merkmal</value>
+        <value xml:lang="de">Hardware-Merkmal</value>
         <value xml:lang="en">Hardware Feature</value>
         <value xml:lang="es">Característica de hardware</value>
         <value xml:lang="fr">Matériaux utilisés</value>
@@ -1825,7 +1825,8 @@
         <value xml:lang="zh_TW">產品質量</value>
     </property>
     <property key="ProductFeatureType.description.SIZE">
-        <value xml:lang="de">Grösse</value>
+        <value xml:lang="de">Größe</value>
+        <value xml:lang="de_CH">Grösse</value>
         <value xml:lang="en">Size</value>
         <value xml:lang="es">Tamaño</value>
         <value xml:lang="fr">Taille</value>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/config/ProductErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/config/ProductErrorUiLabels.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/config/ProductErrorUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/config/ProductErrorUiLabels.xml Thu Mar 24 07:23:42 2011
@@ -77,6 +77,9 @@
         <value xml:lang="zh">无法缩放原始图像</value>
         <value xml:lang="zh_TW">無法縮放原始圖像</value>
     </property>
+    <property key="ImageManagementErrorMessageResizeImage">
+        <value xml:lang="en">Cannot resize image format not jpg.</value>
+    </property>
     <property key="ProductCreateCommunicationEventProductPermissionError">
         <value xml:lang="en">Create Communication Event Product Permission Error</value>
         <value xml:lang="it">Errore di permesso durante la creazione evento comunicazione prodotto</value>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml Thu Mar 24 07:23:42 2011
@@ -5832,7 +5832,17 @@
     <property key="Manage">
         <value xml:lang="en">Manage</value>
         <value xml:lang="th">จัดการ</value>
-    </property>    <property key="PageTitleAddFacilityGroupRollup">
+    </property>
+    <property key="MetaDescription">
+        <value xml:lang="en">Meta Description</value>
+    </property>
+    <property key="MetaKeywords">
+        <value xml:lang="en">Meta Keywords</value>
+    </property>
+    <property key="PageTitle">
+        <value xml:lang="en">Page Title</value>
+    </property>
+    <property key="PageTitleAddFacilityGroupRollup">
         <value xml:lang="de">Einrichtungsgruppe Rollup hinzufügen</value>
         <value xml:lang="en">Add Facility Group Rollup</value>
         <value xml:lang="es">Añadir despliegue de grupo de almacenes</value>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/config/freemarkerTransforms.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/config/freemarkerTransforms.properties?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/config/freemarkerTransforms.properties (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/config/freemarkerTransforms.properties Thu Mar 24 07:23:42 2011
@@ -22,3 +22,4 @@
 # entries are in the form: key=transform name, property=transform class name
 
 ofbizCatalogUrl=org.ofbiz.product.category.OfbizCatalogUrlTransform
+ofbizCatalogAltUrl=org.ofbiz.product.category.OfbizCatalogAltUrlTransform

Modified: ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml Thu Mar 24 07:23:42 2011
@@ -222,11 +222,15 @@ under the License.
     <ProductCategoryContentType description="Category Name" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_NAME"/>
     <ProductCategoryContentType description="Description" hasTable="N" parentTypeId="" prodCatContentTypeId="DESCRIPTION"/>
     <ProductCategoryContentType description="Description - Long" hasTable="N" parentTypeId="" prodCatContentTypeId="LONG_DESCRIPTION"/>
+    <ProductCategoryContentType description="Alternative URL" hasTable="N" parentTypeId="" prodCatContentTypeId="ALTERNATIVE_URL"/>
     <ProductCategoryContentType description="Category Image URL" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_IMAGE_URL"/>
     <ProductCategoryContentType description="Category Image Alt Text" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_IMAGE_ALT"/>
     <ProductCategoryContentType description="Link 1 Alt Text" hasTable="N" parentTypeId="" prodCatContentTypeId="LINK1_ALT_TEXT"/>
     <ProductCategoryContentType description="Link 2 Alt Text" hasTable="N" parentTypeId="" prodCatContentTypeId="LINK2_ALT_TEXT"/>
     <ProductCategoryContentType description="Footer" hasTable="N" parentTypeId="" prodCatContentTypeId="FOOTER"/>
+    <ProductCategoryContentType description="Page Title" hasTable="N" parentTypeId="" prodCatContentTypeId="PAGE_TITLE"/>
+    <ProductCategoryContentType description="Meta Keyword" hasTable="N" parentTypeId="" prodCatContentTypeId="META_KEYWORD"/>
+    <ProductCategoryContentType description="Meta Description" hasTable="N" parentTypeId="" prodCatContentTypeId="META_DESCRIPTION"/>
 
     <ProductContentType description="Online Access" hasTable="N" parentTypeId="" productContentTypeId="ONLINE_ACCESS"/>
     <ProductContentType description="Digital Download" hasTable="N" parentTypeId="" productContentTypeId="DIGITAL_DOWNLOAD"/>
@@ -236,6 +240,7 @@ under the License.
     <ProductContentType description="Product Name" hasTable="N" parentTypeId="" productContentTypeId="PRODUCT_NAME"/>
     <ProductContentType description="Description" hasTable="N" parentTypeId="" productContentTypeId="DESCRIPTION"/>
     <ProductContentType description="Description - Long" hasTable="N" parentTypeId="" productContentTypeId="LONG_DESCRIPTION"/>
+    <ProductContentType description="Alternative URL" hasTable="N" parentTypeId="" productContentTypeId="ALTERNATIVE_URL"/>
     <ProductContentType description="Price Detail Text" hasTable="N" parentTypeId="" productContentTypeId="PRICE_DETAIL_TEXT"/>
     <ProductContentType description="Ingredients" hasTable="N" parentTypeId="" productContentTypeId="INGREDIENTS"/>
     <ProductContentType description="Unique Ingredients" hasTable="N" parentTypeId="" productContentTypeId="UNIQUE_INGREDIENTS"/>
@@ -279,6 +284,9 @@ under the License.
     <ProductContentType description="Installation" hasTable="N" parentTypeId="DIGITAL_DOWNLOAD" productContentTypeId="INSTALLATION"/>
     <ProductContentType description="Specification" hasTable="N" parentTypeId="DIGITAL_DOWNLOAD" productContentTypeId="SPECIFICATION"/>
     <ProductContentType description="Warranty" hasTable="N" parentTypeId="DIGITAL_DOWNLOAD" productContentTypeId="WARRANTY"/>
+    <ProductContentType description="Page Title" hasTable="N" parentTypeId="" productContentTypeId="PAGE_TITLE"/>
+    <ProductContentType description="Meta Keyword" hasTable="N" parentTypeId="" productContentTypeId="META_KEYWORD"/>
+    <ProductContentType description="Meta Description" hasTable="N" parentTypeId="" productContentTypeId="META_DESCRIPTION"/>
 
     <ProdConfItemContentType description="Image" hasTable="N" parentTypeId="" confItemContentTypeId="IMAGE_URL"/>
     <ProdConfItemContentType description="Description" hasTable="N" parentTypeId="" confItemContentTypeId="DESCRIPTION"/>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel_shipment.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel_shipment.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel_shipment.xml Thu Mar 24 07:23:42 2011
@@ -767,6 +767,9 @@ under the License.
         <key-map field-name="carrierPartyId" rel-field-name="partyId"/>
         <key-map field-name="carrierRoleTypeId" rel-field-name="roleTypeId"/>
       </relation>
+      <relation type="one" fk-name="SHPMNT_PS_SH_METH" rel-entity-name="ProductStoreShipmentMeth">
+          <key-map field-name="productStoreShipMethId"/>
+      </relation>
       <relation type="one" fk-name="SHPMNT_CE_PARTY" rel-entity-name="Party">
         <key-map field-name="partyId"/>
       </relation>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml Thu Mar 24 07:23:42 2011
@@ -70,4 +70,72 @@ under the License.
         <set-service-fields service-name="updateSimpleTextContent" map="parameters" to-map="updateSimpleText"/>
         <call-service service-name="updateSimpleTextContent" in-map-name="updateSimpleText"/>
     </simple-method>
+    <simple-method method-name="updateContentSEOForCategory" short-description="Update Category SEO">
+        <if-not-empty field="parameters.title">
+            <entity-and list="productCategoryContents" entity-name="ProductCategoryContentAndInfo">
+                <field-map field-name="productCategoryId" from-field="parameters.productCategoryId"/>
+                <field-map field-name="prodCatContentTypeId" value="PAGE_TITLE"/>
+            </entity-and>
+            <if-not-empty field="productCategoryContents">
+                <first-from-list entry="productCategoryContent" list="productCategoryContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productCategoryContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.title"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productCategoryId" from-field="parameters.productCategoryId"/>
+                <set field="createTextContentMap.prodCatContentTypeId" value="PAGE_TITLE"/>
+                <set field="createTextContentMap.text" from-field="parameters.title"/>
+                <call-service service-name="createSimpleTextContentForCategory" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+        <if-not-empty field="parameters.metaKeyword">
+            <entity-and list="productCategoryContents" entity-name="ProductCategoryContentAndInfo">
+                <field-map field-name="productCategoryId" from-field="parameters.productCategoryId"/>
+                <field-map field-name="prodCatContentTypeId" value="META_KEYWORD"/>
+            </entity-and>
+            <if-not-empty field="productCategoryContents">
+                <first-from-list entry="productCategoryContent" list="productCategoryContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productCategoryContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.metaKeyword"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productCategoryId" from-field="parameters.productCategoryId"/>
+                <set field="createTextContentMap.prodCatContentTypeId" value="META_KEYWORD"/>
+                <set field="createTextContentMap.text" from-field="parameters.metaKeyword"/>
+                <call-service service-name="createSimpleTextContentForCategory" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+        <if-not-empty field="parameters.metaDescription">
+            <entity-and list="productCategoryContents" entity-name="ProductCategoryContentAndInfo">
+                <field-map field-name="productCategoryId" from-field="parameters.productCategoryId"/>
+                <field-map field-name="prodCatContentTypeId" value="META_DESCRIPTION"/>
+            </entity-and>
+            <if-not-empty field="productCategoryContents">
+                <first-from-list entry="productCategoryContent" list="productCategoryContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productCategoryContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.metaDescription"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productCategoryId" from-field="parameters.productCategoryId"/>
+                <set field="createTextContentMap.prodCatContentTypeId" value="META_DESCRIPTION"/>
+                <set field="createTextContentMap.text" from-field="parameters.metaDescription"/>
+                <call-service service-name="createSimpleTextContentForCategory" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Thu Mar 24 07:23:42 2011
@@ -899,9 +899,8 @@ under the License.
         </else>
         </if-compare>
         
-        <entity-and entity-name="ProductStoreCatalog" list="productStoreCatalogs">
+        <entity-and entity-name="ProductStoreCatalog" list="productStoreCatalogs" filter-by-date="true">
             <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
-            <field-map field-name="thruDate" from-field="nullField"/>
         </entity-and>
         <if-not-empty field="productStoreCatalogs">
             <first-from-list list="productStoreCatalogs" entry="productStoreCatalog"/>
@@ -973,9 +972,8 @@ under the License.
     
     <simple-method method-name="FindBestSellingProduct" short-description="Find best selling product.">
         <now-timestamp field="nowTimestamp"/>
-        <entity-and entity-name="ProductCategoryMember" list="productCategoryMembers">
+        <entity-and entity-name="ProductCategoryMember" list="productCategoryMembers" filter-by-date="true">
             <field-map field-name="productCategoryId" from-field="parameters.productCategoryId"/>
-            <field-map field-name="thruDate" from-field="nullField"/>
         </entity-and>
         <iterate list="productCategoryMembers" entry="productCategoryMember">
             <entity-condition entity-name="SalesOrderItemStarSchema" list="salesOrderItemStarSchemas" distinct="true">

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml Thu Mar 24 07:23:42 2011
@@ -42,12 +42,19 @@ under the License.
         <entity-and list="productContentAndInfos" entity-name="ProductContentAndInfo">
             <field-map field-name="productId" from-field="parameters.productId"/>
             <field-map field-name="contentId" from-field="parameters.contentId"/>
-            <field-map field-name="productContentTypeId" value="IMAGE"/>
+            <field-map field-name="productContentTypeId" value="DEFAULT_IMAGE"/>
         </entity-and>
         <if-not-empty field="productContentAndInfos">
-            <set field="setThumbnailMap.productId" from-field="parameters.productId"/>
+            <first-from-list entry="productContentAndInfo" list="productContentAndInfos"/>
+            <entity-one value-field="product" entity-name="Product">
+                <field-map field-name="productId" from-field="parameters.productId"/>
+            </entity-one>
+            <set field="product.originalImageUrl" from-field="productContentAndInfo.drObjectInfo"/>
+            <store-value value-field="product"/>
+        
+            <!--<set field="setThumbnailMap.productId" from-field="parameters.productId"/>
             <set field="setThumbnailMap.contentIdTo" from-field="parameters.contentIdTo"/>
-            <!--<call-service service-name="setThumbnail" in-map-name="setThumbnailMap"/>-->
+            <call-service service-name="setThumbnail" in-map-name="setThumbnailMap"/>-->
         </if-not-empty>
     </simple-method>
 </simple-methods>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml Thu Mar 24 07:23:42 2011
@@ -154,7 +154,9 @@ under the License.
         <entity-and list="contentRoles" entity-name="ContentRole" >
            <field-map field-name="contentId" from-field="parameters.contentId"/>
         </entity-and>
-        <remove-value value-field="contentRoles[0]"/>
+        <if-not-empty field="contentRoles">
+            <remove-value value-field="contentRoles[0]"/>
+        </if-not-empty>
         
         <entity-condition entity-name="ContentApproval" list="contentApprovals">
             <condition-list combine="and">
@@ -178,7 +180,9 @@ under the License.
         <entity-and list="dataResourceRoles" entity-name="DataResourceRole" >
             <field-map field-name="dataResourceId" from-field="dataResourceId"/>
         </entity-and>
-        <remove-value value-field="dataResourceRoles[0]"/>
+        <if-not-empty field="dataResourceRoles">
+            <remove-value value-field="dataResourceRoles[0]"/>
+        </if-not-empty>
         
         <entity-one value-field="dataResource" entity-name="DataResource">
             <field-map field-name="dataResourceId" from-field="dataResourceId"/>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml Thu Mar 24 07:23:42 2011
@@ -202,4 +202,74 @@ under the License.
         </if-empty>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
+
+    <!-- Product Content SEO -->
+    <simple-method method-name="updateContentSEOForProduct" short-description="Update Product SEO">
+        <if-not-empty field="parameters.title">
+            <entity-and list="productContents" entity-name="ProductContentAndInfo">
+                <field-map field-name="productId" from-field="parameters.productId"/>
+                <field-map field-name="productContentTypeId" value="PAGE_TITLE"/>
+            </entity-and>
+            <if-not-empty field="productContents">
+                <first-from-list entry="productContent" list="productContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.title"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productId" from-field="parameters.productId"/>
+                <set field="createTextContentMap.productContentTypeId" value="PAGE_TITLE"/>
+                <set field="createTextContentMap.text" from-field="parameters.title"/>
+                <call-service service-name="createSimpleTextContentForProduct" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+        <if-not-empty field="parameters.metaKeyword">
+            <entity-and list="productContents" entity-name="ProductContentAndInfo">
+                <field-map field-name="productId" from-field="parameters.productId"/>
+                <field-map field-name="productContentTypeId" value="META_KEYWORD"/>
+            </entity-and>
+            <if-not-empty field="productContents">
+                <first-from-list entry="productContent" list="productContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.metaKeyword"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productId" from-field="parameters.productId"/>
+                <set field="createTextContentMap.productContentTypeId" value="META_KEYWORD"/>
+                <set field="createTextContentMap.text" from-field="parameters.metaKeyword"/>
+                <call-service service-name="createSimpleTextContentForProduct" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+        <if-not-empty field="parameters.metaDescription">
+            <entity-and list="productContents" entity-name="ProductContentAndInfo">
+                <field-map field-name="productId" from-field="parameters.productId"/>
+                <field-map field-name="productContentTypeId" value="META_DESCRIPTION"/>
+            </entity-and>
+            <if-not-empty field="productContents">
+                <first-from-list entry="productContent" list="productContents"/>
+                <entity-one value-field="electronicText" entity-name="ElectronicText">
+                    <field-map field-name="dataResourceId" from-field="productContent.dataResourceId"/>
+                </entity-one>
+                <if-not-empty field="electronicText">
+                    <set field="electronicText.textData" from-field="parameters.metaDescription"/>
+                    <store-value value-field="electronicText"/>
+                </if-not-empty>
+            <else>
+                <set field="createTextContentMap.productId" from-field="parameters.productId"/>
+                <set field="createTextContentMap.productContentTypeId" value="META_DESCRIPTION"/>
+                <set field="createTextContentMap.text" from-field="parameters.metaDescription"/>
+                <call-service service-name="createSimpleTextContentForProduct" in-map-name="createTextContentMap"/>
+            </else>
+            </if-not-empty>
+        </if-not-empty>
+    </simple-method>
 </simple-methods>

Propchange: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 24 07:23:42 2011
@@ -2,3 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-952957
 /ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264
+/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:962442-1084618

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Thu Mar 24 07:23:42 2011
@@ -245,7 +245,7 @@ under the License.
                 <!-- if no inventory item type specified, get default from facility -->
                 <if-empty field="parameters.inventoryItemTypeId">
                     <get-related-one value-field="returnHeader" relation-name="Facility" to-value-field="facility"/>
-                    <set from-field="facility.defaultInventoryItemTypeId" field="parameters.inventoryItemTypeId"/>
+                    <set field="parameters.inventoryItemTypeId" from-field="facility.defaultInventoryItemTypeId" default-value="NON_SERIAL_INV_ITEM"/>
                 </if-empty>
 
                 <now-timestamp field="nowTimestamp"/>
@@ -286,10 +286,9 @@ under the License.
                                 <condition-expr field-name="facilityId" operator="equals" from-field="returnHeader.destinationFacilityId"/>
                                 <condition-expr field-name="inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM"/>
                             </condition-list>
-                        </entity-count>
-                        <get-related-one value-field="returnHeader" relation-name="Facility" to-value-field="destinationFacility"/>
+                        </entity-count>                        
                         <set field="setNonSerial" value="false"/>
-                        <if-compare field="destinationFacility.defaultInventoryItemTypeId" value="NON_SERIAL_INV_ITEM" operator="equals">
+                        <if-compare field="parameters.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM" operator="equals">
                             <if-compare field="serializedItemCount" value="0" operator="equals">
                                 <set field="parameters.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
                                 <set field="setNonSerial" value="true"/>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml Thu Mar 24 07:23:42 2011
@@ -205,15 +205,15 @@ under the License.
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
 
-    <service name="findProductsById" engine="java"  auth="true"
-            location="org.ofbiz.product.ProductServices" invoke="findProductByGoodIdentification">
-        <description>Find the productId corresponding to a reference and a reference type</description>
+    <service name="findProductById" engine="java"  auth="true" export="true"
+        location="org.ofbiz.product.product.ProductServices" invoke="findProductById">
+        <description>Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue</description>
         <attribute type="String" mode="IN" name="idToFind" optional="false"/>
         <attribute type="String" mode="IN" name="goodIdentificationTypeId" optional="true"/>
         <attribute type="String" mode="IN" name="searchProductFirst" optional="true"/>
         <attribute type="String" mode="IN" name="searchAllId" optional="true"/>
         <attribute type="org.ofbiz.entity.GenericValue" mode="OUT" name="product" optional="true"/>
-        <attribute type="List" mode="OUT" name="productsFound" optional="true"/>
+        <attribute type="List" mode="OUT" name="productsList" optional="true"/>
     </service>
 
     <!-- Product Association Services -->
@@ -451,7 +451,7 @@ under the License.
         <override name="productContentTypeId" optional="false"/>
         <override name="productId" optional="false"/>
     </service>
-    
+
     <service name="uploadProductAdditionalViewImages" engine="simple"
         location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="uploadProductAdditionalViewImages" auth="true">
         <description>Upload Additional View Images For Product</description>
@@ -471,6 +471,15 @@ under the License.
         <attribute name="_additionalImageFour_contentType" type="String" mode="IN" optional="true"/>
     </service>
 
+    <service name="updateContentSEOForProduct" engine="simple"
+            location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="updateContentSEOForProduct" auth="true">
+        <description>Update Product SEO</description>
+        <attribute name="productId" mode="IN" type="String" optional="false"/>
+        <attribute name="title" mode="IN" type="String" optional="true"/>
+        <attribute name="metaKeyword" mode="IN" type="String" optional="true"/>
+        <attribute name="metaDescription" mode="IN" type="String" optional="true"/>
+    </service>
+
     <!-- SupplierProduct Services -->
     <service name="createSupplierProduct" default-entity-name="SupplierProduct" engine="simple"
         location="component://product/script/org/ofbiz/product/supplier/SupplierProductServices.xml" invoke="createSupplierProduct" auth="true">
@@ -961,6 +970,15 @@ under the License.
         <attribute name="text" type="String" mode="IN" optional="true" allow-html="safe"/>
     </service>
 
+    <service name="updateContentSEOForCategory" engine="simple"
+            location="component://product/script/org/ofbiz/product/category/CategoryContentServices.xml" invoke="updateContentSEOForCategory" auth="true">
+        <description>Update Category SEO</description>
+        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
+        <attribute name="title" mode="IN" type="String" optional="true"/>
+        <attribute name="metaKeyword" mode="IN" type="String" optional="true"/>
+        <attribute name="metaDescription" mode="IN" type="String" optional="true"/>
+    </service>
+
     <!-- ProductFeatureDataResource services -->
     <service name="createProductFeatureDataResource" default-entity-name="ProductFeatureDataResource" engine="simple"
             location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="createProductFeatureDataResource" auth="true">

Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java Thu Mar 24 07:23:42 2011
@@ -18,14 +18,22 @@
  *******************************************************************************/
 package org.ofbiz.product.category;
 
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
 import java.sql.Timestamp;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
+import net.sf.json.JSONObject;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilGenerics;
@@ -391,4 +399,116 @@ public class CategoryServices {
         if (productCategoryMembers != null) result.put("productCategoryMembers", productCategoryMembers);
         return result;
     }
+    
+    // Please note : the structure of map in this function is according to the JSON data map of the jsTree
+    @SuppressWarnings("unchecked")
+    public static void getChildCategoryTree(HttpServletRequest request, HttpServletResponse response){
+        Delegator delegator = (Delegator) request.getAttribute("delegator");
+        String productCategoryId = request.getParameter("productCategoryId");
+        String isCatalog = request.getParameter("isCatalog");
+        String entityName = null;
+        String primaryKeyName = null;
+        
+        if (isCatalog.equals("true")) {
+            entityName = "ProdCatalog";
+            primaryKeyName = "prodCatalogId";
+        } else {
+            entityName = "ProductCategory";
+            primaryKeyName = "productCategoryId";
+        }
+        
+        List categoryList = FastList.newInstance();
+        List<GenericValue> childOfCats;
+        
+        try {
+            GenericValue category = delegator.findByPrimaryKey(entityName ,UtilMisc.toMap(primaryKeyName, productCategoryId));
+            if (UtilValidate.isNotEmpty(category)) {
+                if (isCatalog.equals("true")) {
+                    CategoryWorker.getRelatedCategories(request, "ChildCatalogList", CatalogWorker.getCatalogTopCategoryId(request, productCategoryId), true);
+                    childOfCats = (List<GenericValue>) request.getAttribute("ChildCatalogList");
+                } else {
+                    childOfCats = delegator.findByAnd("ProductCategoryRollup", UtilMisc.toMap(
+                            "parentProductCategoryId", productCategoryId ));
+                }
+                if (UtilValidate.isNotEmpty(childOfCats)) {
+                    for (GenericValue childOfCat : childOfCats ) {
+                        
+                        Object catId = null;
+                        String catNameField = null;
+                        
+                        catId = childOfCat.get("productCategoryId");
+                        catNameField = "CATEGORY_NAME";
+                        
+                        Map josonMap = FastMap.newInstance();
+                        List<GenericValue> childList = null;
+                        
+                        // Get the child list of chosen category
+                        childList = delegator.findByAnd("ProductCategoryRollup", UtilMisc.toMap(
+                                    "parentProductCategoryId", catId));
+                        
+                        // Get the chosen category information for the categoryContentWrapper
+                        GenericValue cate = delegator.findByPrimaryKey("ProductCategory" ,UtilMisc.toMap("productCategoryId",catId));
+                        
+                        // If chosen category's child exists, then put the arrow before category icon
+                        if (UtilValidate.isNotEmpty(childList)) {
+                            josonMap.put("state", "closed");
+                        }
+                        Map dataMap = FastMap.newInstance();
+                        Map dataAttrMap = FastMap.newInstance();
+                        CategoryContentWrapper categoryContentWrapper = new CategoryContentWrapper(cate, request);
+                        
+                        if (UtilValidate.isNotEmpty(categoryContentWrapper.get(catNameField))) {
+                            dataMap.put("title", categoryContentWrapper.get(catNameField)+"["+catId+"]");
+                        } else {
+                            dataMap.put("title", catId);
+                        }
+                        dataAttrMap.put("onClick","window.location.href='EditCategory?productCategoryId="+catId+"'; return false;");
+                        
+                        dataMap.put("attr", dataAttrMap);
+                        josonMap.put("data", dataMap);
+                        Map attrMap = FastMap.newInstance();
+                        attrMap.put("id", catId);
+                        attrMap.put("isCatalog", false);
+                        attrMap.put("rel", "CATEGORY");
+                        josonMap.put("attr",attrMap);
+                        
+                        categoryList.add(josonMap);
+                    }
+                    toJsonObjectList(categoryList,response);
+                }
+            }
+        } catch (GenericEntityException e) {
+            e.printStackTrace();
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public static void toJsonObjectList(List attrList, HttpServletResponse response){
+        String jsonStr = "[";
+        for (Object attrMap : attrList) {
+            JSONObject json = JSONObject.fromObject(attrMap);
+            jsonStr = jsonStr + json.toString() + ',';
+        }
+        jsonStr = jsonStr + "{ } ]";
+        if (UtilValidate.isEmpty(jsonStr)) {
+            Debug.logError("JSON Object was empty; fatal error!",module);
+        }
+        // set the X-JSON content type
+        response.setContentType("application/json");
+        // jsonStr.length is not reliable for unicode characters
+        try {
+            response.setContentLength(jsonStr.getBytes("UTF8").length);
+        } catch (UnsupportedEncodingException e) {
+            Debug.logError("Problems with Json encoding",module);
+        }
+        // return the JSON String
+        Writer out;
+        try {
+            out = response.getWriter();
+            out.write(jsonStr);
+            out.flush();
+        } catch (IOException e) {
+            Debug.logError("Unable to get response writer",module);
+        }
+    }
 }