svn commit: r1036344 [2/2] - in /ofbiz/branches/jquery: ./ applications/accounting/ applications/accounting/data/ applications/commonext/script/org/ofbiz/setup/ applications/commonext/webapp/ofbizsetup/WEB-INF/ applications/commonext/webapp/ofbizsetup/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1036344 [2/2] - in /ofbiz/branches/jquery: ./ applications/accounting/ applications/accounting/data/ applications/commonext/script/org/ofbiz/setup/ applications/commonext/webapp/ofbizsetup/WEB-INF/ applications/commonext/webapp/ofbizsetup/...

jleroux@apache.org
Modified: ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml Thu Nov 18 08:32:31 2010
@@ -158,7 +158,7 @@
     <property key="FormFieldTitle_custRequestId">
         <value xml:lang="en">Cust Request Id</value>
         <value xml:lang="fr">Réf. de demande client</value>
-        <value xml:lang="it">Richiesta soggetto</value>
+        <value xml:lang="it">Codice richiesta</value>
         <value xml:lang="nl">Klantvraag ID</value>
         <value xml:lang="pt_BR">ID de solicitação de cliente</value>
         <value xml:lang="zh">客户请求标识</value>
@@ -168,7 +168,7 @@
         <value xml:lang="en">Cust Request Item Seq Id</value>
         <value xml:lang="es">Nº sec. petición de cliente</value>
         <value xml:lang="fr">Réf. séq. de ligne de demande client</value>
-        <value xml:lang="it">Riga richiesta soggetto</value>
+        <value xml:lang="it">Riga richiesta</value>
         <value xml:lang="nl">Klantvraag nr. ID</value>
         <value xml:lang="pt_BR">ID de sequência de solicitação de cliente</value>
         <value xml:lang="ro">Numar Secvential linie Cerere Subiect</value>
@@ -181,7 +181,7 @@
         <value xml:lang="en">Cust Request Name</value>
         <value xml:lang="es">Nombre de petición</value>
         <value xml:lang="fr">Nom de demande client</value>
-        <value xml:lang="it">Nome richiesta soggetto</value>
+        <value xml:lang="it">Nome richiesta</value>
         <value xml:lang="nl">Klantvraag naam</value>
         <value xml:lang="pt_BR">Nome de solicitação</value>
         <value xml:lang="ro">Nume Cerere Subiect</value>
@@ -194,7 +194,7 @@
         <value xml:lang="en">Cust Request Resolution Id</value>
         <value xml:lang="es">Código Resolución de petición</value>
         <value xml:lang="fr">Réf. de résolution de demande client</value>
-        <value xml:lang="it">Risoluzione Richiesta Soggetto</value>
+        <value xml:lang="it">Risoluzione della richiesta</value>
         <value xml:lang="nl">Klantvraag oplossing ID</value>
         <value xml:lang="pt_BR">ID da resolução da solicitação</value>
         <value xml:lang="ro">Solutionare Cerere Subiect</value>
@@ -207,7 +207,7 @@
         <value xml:lang="en">Cust Request Type Id</value>
         <value xml:lang="es">Código Tipo de petición</value>
         <value xml:lang="fr">Réf. de type de demande client</value>
-        <value xml:lang="it">Tipo richiesta soggetto</value>
+        <value xml:lang="it">Tipo di richiesta</value>
         <value xml:lang="nl">Soort klantvraag ID</value>
         <value xml:lang="pt_BR">ID de tipo de solicitação</value>
         <value xml:lang="ro">Tip Cerere Subiect</value>
@@ -233,7 +233,7 @@
         <value xml:lang="en">Deliverable Id</value>
         <value xml:lang="es">Código de envío</value>
         <value xml:lang="fr">Réf. de livrable</value>
-        <value xml:lang="it">Numero Consegna</value>
+        <value xml:lang="it">Codice consegna</value>
         <value xml:lang="nl">Levering ID</value>
         <value xml:lang="pt_BR">ID (código) de envio</value>
         <value xml:lang="ro">Numar Livrare</value>
@@ -246,7 +246,7 @@
         <value xml:lang="en">Entry Date</value>
         <value xml:lang="es">Fecha de registro</value>
         <value xml:lang="fr">Date d'entrée</value>
-        <value xml:lang="it">Data Inserimento</value>
+        <value xml:lang="it">Data inserimento</value>
         <value xml:lang="nl">Invoerdatum</value>
         <value xml:lang="pt_BR">Data de registro</value>
         <value xml:lang="ro">Data Introducere</value>
@@ -259,7 +259,7 @@
         <value xml:lang="en">Estimated Budget</value>
         <value xml:lang="es">Presupuesto estimado</value>
         <value xml:lang="fr">Budget estimé</value>
-        <value xml:lang="it">Budget Stimato</value>
+        <value xml:lang="it">Budget stimato</value>
         <value xml:lang="nl">Geschat budget</value>
         <value xml:lang="pt_BR">Orçamento previsto</value>
         <value xml:lang="ro">Budget Stimat</value>
@@ -272,7 +272,7 @@
         <value xml:lang="en">Estimated Ready Date</value>
         <value xml:lang="es">Fecha disponible estimada</value>
         <value xml:lang="fr">Date estimée de préparation</value>
-        <value xml:lang="it">Data Attesa Stimata</value>
+        <value xml:lang="it">Data di completamento stimata</value>
         <value xml:lang="nl">Verwachte datum gereedkoming</value>
         <value xml:lang="pt_BR">Data de disponibilidade estimada</value>
         <value xml:lang="ro">Data Asteptsre Stimata</value>
@@ -872,7 +872,7 @@
         <value xml:lang="en">Response Required Date</value>
         <value xml:lang="es">Fecha exigida para respuesta</value>
         <value xml:lang="fr">Date requise de la réponse</value>
-        <value xml:lang="it">Data Richiesta Risposta</value>
+        <value xml:lang="it">Rispondere entro</value>
         <value xml:lang="nl">Antwoord geven voor</value>
         <value xml:lang="ro">Data Cerere Raspuns</value>
         <value xml:lang="ru">Требуемая дата ответа</value>
@@ -3797,7 +3797,7 @@
     <property key="OrderIncomingCustRequests">
         <value xml:lang="en">Incoming customer requests</value>
         <value xml:lang="fr">Nouvelles demandes utilisateur</value>
-        <value xml:lang="it">Richiesta cliente in entrata</value>
+        <value xml:lang="it">Nuove richieste cliente</value>
         <value xml:lang="pt_BR">Novas Solicitações de clientes</value>
         <value xml:lang="th">แสดงรายรับของลูกค้า</value>
         <value xml:lang="zh">输入的客户请求</value>
@@ -4616,7 +4616,7 @@
         <value xml:lang="en">New Request</value>
         <value xml:lang="es">Nueva petición</value>
         <value xml:lang="fr">Nouvelle demande</value>
-        <value xml:lang="it">Nuova Richiesta</value>
+        <value xml:lang="it">Nuova richiesta</value>
         <value xml:lang="nl">Nieuwe vraag</value>
         <value xml:lang="pt_BR">Nova solicitação</value>
         <value xml:lang="ro">Noua Cerere </value>
@@ -4630,7 +4630,7 @@
         <value xml:lang="en">New Request Item</value>
         <value xml:lang="es">Nuevo ítem de petición</value>
         <value xml:lang="fr">Nouvelle demande d'article</value>
-        <value xml:lang="it">Nuova Riga Richiesta</value>
+        <value xml:lang="it">Nuova riga richiesta</value>
         <value xml:lang="nl">Nieuw vraagelement</value>
         <value xml:lang="pt_BR">Novo item de solicitação</value>
         <value xml:lang="ro">Noua Linie Cerere</value>
@@ -4644,7 +4644,7 @@
         <value xml:lang="en">New Requirement</value>
         <value xml:lang="es">Nuevo requisito</value>
         <value xml:lang="fr">Nouveau besoin</value>
-        <value xml:lang="it">Nuovo Fabbisogno</value>
+        <value xml:lang="it">Nuovo fabbisogno</value>
         <value xml:lang="nl">Nieuwe behoefte</value>
         <value xml:lang="pt_BR">Novo requisito</value>
         <value xml:lang="ro">Nou Necesar</value>
@@ -4658,7 +4658,7 @@
         <value xml:lang="en">New Shipment</value>
         <value xml:lang="es">Nuevo envío</value>
         <value xml:lang="fr">Nouvelle expédition</value>
-        <value xml:lang="it">Nuova Spedizione</value>
+        <value xml:lang="it">Nuova spedizione</value>
         <value xml:lang="nl">Nieuwe verzending</value>
         <value xml:lang="pt_BR">Novo envio</value>
         <value xml:lang="ro">Noua Expediere</value>
@@ -8227,6 +8227,10 @@
         <value xml:lang="zh">请求日期</value>
         <value xml:lang="zh_CN">请求日期</value>
     </property>
+    <property key="OrderRequestInformation">
+        <value xml:lang="en">Request Information</value>
+        <value xml:lang="it">Informazioni sulla richiesta</value>
+    </property>
     <property key="OrderRequestItem">
         <value xml:lang="de">Anfrageelement</value>
         <value xml:lang="en">Request Item</value>
@@ -11201,7 +11205,7 @@
         <value xml:lang="en">Edit Request Roles</value>
         <value xml:lang="es">Editar roles de petición</value>
         <value xml:lang="fr">Modifier une demande de rôles</value>
-        <value xml:lang="it">Aggiorna Ruoli Richiesta</value>
+        <value xml:lang="it">Aggiorna i ruoli della richiesta</value>
         <value xml:lang="pt_BR">Alterar papéis de solicitação</value>
         <value xml:lang="th">แก้ไขสถานะการร้องขอ</value>
         <value xml:lang="zh">编辑请求角色</value>
@@ -11533,7 +11537,7 @@
         <value xml:lang="en">Request Items</value>
         <value xml:lang="es">Ítems de petición</value>
         <value xml:lang="fr">Demande d'articles</value>
-        <value xml:lang="it">Righe Richiesta</value>
+        <value xml:lang="it">Righe richiesta</value>
         <value xml:lang="nl">Request Items</value>
         <value xml:lang="pt_BR">Solicitação de itens</value>
         <value xml:lang="ro">Linii Cerere</value>

Propchange: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264
-/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1034179
+/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1036339

Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Thu Nov 18 08:32:31 2010
@@ -3860,7 +3860,7 @@ public class OrderServices {
             }
         }
 
-        // get the new orderItems, adjustments, shipping info, payments and order item atrributes from the cart
+        // get the new orderItems, adjustments, shipping info, payments and order item attributes from the cart
         List<Map> modifiedItems = FastList.newInstance();
         List toStore = new LinkedList();
         List<GenericValue> toAddList = new ArrayList<GenericValue>();
@@ -3959,7 +3959,10 @@ public class OrderServices {
                 if (UtilValidate.isEmpty(valueObj.get("orderItemSeqId"))) {
                     valueObj.set("orderItemSeqId", DataModelConstants.SEQ_ID_NA);
                 }
-                valueObj.set("orderAdjustmentId", delegator.getNextSeqId("OrderAdjustment"));
+                // in order to avoid duplicate adjustments don't set orderAdjustmentId (which is the pk) if there is already one
+                if (UtilValidate.isEmpty(valueObj.getString("orderAdjustmentId"))) {
+                    valueObj.set("orderAdjustmentId", delegator.getNextSeqId("OrderAdjustment"));
+                }
                 valueObj.set("createdDate", UtilDateTime.nowTimestamp());
                 valueObj.set("createdByUserLogin", userLogin.getString("userLoginId"));
             } else if ("OrderPaymentPreference".equals(valueObj.getEntityName())) {

Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Thu Nov 18 08:32:31 2010
@@ -834,7 +834,8 @@ public class ProductPromoWorker {
                 // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                 GenericValue product = cartItem.getProduct();
                 String parentProductId = cartItem.getParentProductId();
-                if (!cartItem.getIsPromo() &&
+                boolean passedItemConds = checkConditionsForItem(productPromoCond, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                if (passedItemConds && !cartItem.getIsPromo() &&
                         (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
 
@@ -878,7 +879,8 @@ public class ProductPromoWorker {
                     // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                     GenericValue product = cartItem.getProduct();
                     String parentProductId = cartItem.getParentProductId();
-                    if (!cartItem.getIsPromo() &&
+                    boolean passedItemConds = checkConditionsForItem(productPromoCond, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                    if (passedItemConds && !cartItem.getIsPromo() &&
                             (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                             (product == null || !"N".equals(product.getString("includeInPromotions")))) {
 
@@ -909,7 +911,8 @@ public class ProductPromoWorker {
                 // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                 GenericValue product = cartItem.getProduct();
                 String parentProductId = cartItem.getParentProductId();
-                if (!cartItem.getIsPromo() &&
+                boolean passedItemConds = checkConditionsForItem(productPromoCond, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                if (passedItemConds && !cartItem.getIsPromo() &&
                         (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
                     // reduce quantity still needed to qualify for promo (quantityNeeded)
@@ -1175,6 +1178,12 @@ public class ProductPromoWorker {
                 if (Debug.verboseOn()) { Debug.logVerbose("Doing order total Shipping compare: ordertotalShipping=" + orderTotalShipping, module); }
                 compareBase = orderTotalShipping.compareTo(new BigDecimal(condValue));
             }
+        } else if ("PPIP_LPMUP_AMT".equals(inputParamEnumId)) {
+            // does nothing on order level, only checked on item level, so ignore by always considering passed
+            return true;
+        } else if ("PPIP_LPMUP_PER".equals(inputParamEnumId)) {
+            // does nothing on order level, only checked on item level, so ignore by always considering passed
+            return true;
         } else {
             Debug.logWarning(UtilProperties.getMessage(resource_error,"OrderAnUnSupportedProductPromoCondInputParameterLhs", UtilMisc.toMap("inputParamEnumId",productPromoCond.getString("inputParamEnumId")), cart.getLocale()), module);
             return false;
@@ -1205,6 +1214,82 @@ public class ProductPromoWorker {
         return false;
     }
 
+    protected static boolean checkConditionsForItem(GenericValue productPromoActionOrCond, ShoppingCart cart, ShoppingCartItem cartItem, Delegator delegator, LocalDispatcher dispatcher, Timestamp nowTimestamp) throws GenericEntityException {
+        GenericValue productPromoRule = productPromoActionOrCond.getRelatedOneCache("ProductPromoRule");
+        
+        List<GenericValue> productPromoConds = delegator.findByAndCache("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromoRule.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"));
+        productPromoConds = EntityUtil.filterByAnd(productPromoConds, UtilMisc.toMap("productPromoRuleId", productPromoRule.get("productPromoRuleId")));
+        for (GenericValue productPromoCond: productPromoConds) {
+            boolean passed = checkConditionForItem(productPromoCond, cart, cartItem, delegator, dispatcher, nowTimestamp);
+            if (!passed) return false;
+        }
+        return true;
+    }
+
+    protected static boolean checkConditionForItem(GenericValue productPromoCond, ShoppingCart cart, ShoppingCartItem cartItem, Delegator delegator, LocalDispatcher dispatcher, Timestamp nowTimestamp) throws GenericEntityException {
+        String condValue = productPromoCond.getString("condValue");
+        String otherValue = productPromoCond.getString("otherValue");
+        String inputParamEnumId = productPromoCond.getString("inputParamEnumId");
+        String operatorEnumId = productPromoCond.getString("operatorEnumId");
+
+        // don't get list price from cart because it may have tax included whereas the base price does not: BigDecimal listPrice = cartItem.getListPrice();
+        Map<String, String> priceFindMap = UtilMisc.toMap("productId", cartItem.getProductId(),
+                "productPriceTypeId", "LIST_PRICE", "productPricePurposeId", "PURCHASE");
+        List<GenericValue> listProductPriceList = delegator.findByAnd("ProductPrice", priceFindMap, UtilMisc.toList("-fromDate"));
+        listProductPriceList = EntityUtil.filterByDate(listProductPriceList, true);
+        GenericValue listProductPrice = (listProductPriceList != null && listProductPriceList.size() > 0) ? listProductPriceList.get(0): null;
+        BigDecimal listPrice = (listProductPrice != null) ? listProductPrice.getBigDecimal("price") : null;
+        
+        if (listPrice == null) {
+            // can't find a list price so this condition is meaningless, consider it passed
+            return true;
+        }
+        
+        BigDecimal basePrice = cartItem.getBasePrice();
+        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)) {
+            compareBase = Integer.valueOf(amountOff.compareTo(condValueBigDecimal));
+        } else if ("PPIP_LPMUP_PER".equals(inputParamEnumId)) {
+            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);
+
+        if (compareBase != null) {
+            int compare = compareBase.intValue();
+            if ("PPC_EQ".equals(operatorEnumId)) {
+                if (compare == 0) return true;
+            } else if ("PPC_NEQ".equals(operatorEnumId)) {
+                if (compare != 0) return true;
+            } else if ("PPC_LT".equals(operatorEnumId)) {
+                if (compare < 0) return true;
+            } else if ("PPC_LTE".equals(operatorEnumId)) {
+                if (compare <= 0) return true;
+            } else if ("PPC_GT".equals(operatorEnumId)) {
+                if (compare > 0) return true;
+            } else if ("PPC_GTE".equals(operatorEnumId)) {
+                if (compare >= 0) return true;
+            } else {
+                Debug.logWarning(UtilProperties.getMessage(resource_error,"OrderAnUnSupportedProductPromoCondCondition", UtilMisc.toMap("operatorEnumId",operatorEnumId) , cart.getLocale()), module);
+                return false;
+            }
+            // was a compareBase and nothing returned above, so condition didn't pass, return false
+            return false;
+        }
+
+        // no compareBase, this condition doesn't apply
+        return true;
+    }
+
     private static int checkConditionPartyHierarchy(Delegator delegator, Timestamp nowTimestamp, String groupPartyId, String partyId) throws GenericEntityException{
         List<GenericValue> partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP"));
         partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, nowTimestamp, null, null, true);
@@ -1451,7 +1536,9 @@ public class ProductPromoWorker {
                 // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                 GenericValue product = cartItem.getProduct();
                 String parentProductId = cartItem.getParentProductId();
-                if (!cartItem.getIsPromo() &&
+                boolean passedItemConds = checkConditionsForItem(productPromoAction, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                // Debug.logInfo("Running promo action for cartItem " + cartItem.getName() + ", passedItemConds=" + passedItemConds + ", productPromoAction=" + productPromoAction, module);
+                if (passedItemConds && !cartItem.getIsPromo() &&
                         (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
                     // reduce quantity still needed to qualify for promo (quantityNeeded)
@@ -1496,7 +1583,8 @@ public class ProductPromoWorker {
                 // 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();
-                if (!cartItem.getIsPromo() &&
+                boolean passedItemConds = checkConditionsForItem(productPromoAction, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                if (passedItemConds && !cartItem.getIsPromo() &&
                         (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
                     // reduce quantity still needed to qualify for promo (quantityNeeded)
@@ -1542,7 +1630,8 @@ public class ProductPromoWorker {
                 // 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();
-                if (!cartItem.getIsPromo() && (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
+                boolean passedItemConds = checkConditionsForItem(productPromoAction, cart, cartItem, delegator, dispatcher, nowTimestamp);
+                if (passedItemConds && !cartItem.getIsPromo() && (productIds.contains(cartItem.getProductId()) || (parentProductId != null && productIds.contains(parentProductId))) &&
                         (product == null || !"N".equals(product.getString("includeInPromotions")))) {
                     // reduce quantity still needed to qualify for promo (quantityNeeded)
                     BigDecimal quantityUsed = cartItem.addPromoQuantityCandidateUse(quantityDesired, productPromoAction, false);

Modified: ofbiz/branches/jquery/applications/order/widget/ordermgr/CustRequestScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/widget/ordermgr/CustRequestScreens.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/widget/ordermgr/CustRequestScreens.xml (original)
+++ ofbiz/branches/jquery/applications/order/widget/ordermgr/CustRequestScreens.xml Thu Nov 18 08:32:31 2010
@@ -496,6 +496,7 @@ under the License.
     <screen name="IncomingCustRequests">
         <section>
             <actions>
+                <set field="parameters.sortField" from-field="parameters.sortField" default-value="-custRequestDate"/>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
                 <entity-condition list="custRequests" entity-name="CustReqAndTypeAndPartyRel">
                     <condition-list combine="and">
@@ -505,7 +506,7 @@ under the License.
                             <condition-expr field-name="partyIdTo" operator="equals" from-field="userLogin.partyId"/>
                         </condition-list>
                     </condition-list>
-                    <order-by field-name="-custRequestDate"/>
+                    <order-by field-name="${parameters.sortField}"/>
                 </entity-condition>
             </actions>
             <widgets>

Modified: ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml Thu Nov 18 08:32:31 2010
@@ -2142,6 +2142,10 @@
         <value xml:lang="it">Lista comunicazioni dei soggetti relazionati</value>
         <value xml:lang="pt_BR">Lista de comunicações de participantes relacionados</value>
     </property>
+    <property key="PageTitleListLoggedInUsers">
+        <value xml:lang="en">Logged-in Users List</value>
+        <value xml:lang="it">Lista utenti loggati</value>
+    </property>
     <property key="PageTitleListPartyIdentifications">
         <value xml:lang="en">List Identification Number</value>
         <value xml:lang="fr">Liste des numéros d'identification</value>
@@ -6408,6 +6412,10 @@
         <value xml:lang="th">รายการประเภท</value>
         <value xml:lang="zh">类型列表</value>
     </property>
+    <property key="PartyLoggedInUsers">
+        <value xml:lang="en">Logged-in Users</value>
+        <value xml:lang="it">Utenti loggati</value>
+    </property>
     <property key="PartyLookupAccount">
         <value xml:lang="en">Lookup Party with the role Account</value>
         <value xml:lang="fr">Consultation de l'acteur ayant le role "compte"</value>

Modified: ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml (original)
+++ ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml Thu Nov 18 08:32:31 2010
@@ -131,6 +131,12 @@
         description="Related accounts of an contact"/>
     <PortletPortletCategory portalPortletId="partyRelAccounts" portletCategoryId="PARTY_PROFILE"/>
 
+    <PortalPortlet portalPortletId="partyLoggedIn" portletName="List all logged in users"
+        screenName="LoggedInUsersScreen"
+        screenLocation="component://party/widget/partymgr/VisitScreens.xml"
+        description="A list of all logged in users"/>
+    <PortletPortletCategory portalPortletId="partyLoggedIn" portletCategoryId="PARTY_PROFILE"/>
+
     <!-- communications -->
     <PortletCategory portletCategoryId="COMMUNICATIONS" description="Communication(s)"/>
     <PortalPortlet portalPortletId="MyCommunications" portletName="My Communications"  description="IN and outgoing Communication list of a party"

Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Thu Nov 18 08:32:31 2010
@@ -340,6 +340,9 @@ under the License.
 
     <simple-method method-name="deleteCommunicationEvent" short-description="Delete a CommunicationEvent">
         <entity-one entity-name="CommunicationEvent" value-field="event"/>
+        <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 content -->
         <get-related value-field="event" relation-name="CommEventContentAssoc" list="contentAssocs"/>
         <if-not-empty field="contentAssocs">
@@ -352,19 +355,26 @@ under the License.
                         <iterate entry="content" list="contents">
                             <remove-related value-field="content" relation-name="ContentRole"/>
                             <remove-value value-field="content"/>
-                            <get-related-one value-field="content" relation-name="DataResource" to-value-field="dataResource"/>
-                            <if-not-empty field="dataResource">
-                                <get-related-one value-field="dataResource" relation-name="ImageDataResource" to-value-field="imageDataResource"/>
-                                <if-not-empty field="imageDataResource">
-                                    <remove-value value-field="imageDataResource"/>
-                                </if-not-empty>
-                                <get-related-one value-field="dataResource" relation-name="ElectronicText" to-value-field="electronicText"/>
-                                <if-not-empty field="electronicText">
-                                    <remove-value value-field="electronicText"/>
+                            <!-- check first if the content is used on any other communication event if yes, only delete link-->
+                            <entity-and entity-name="CommEventContentAssoc" list="commEvents">
+                                <field-map field-name="contentId" from-field="content.contentId"/>
+                            </entity-and>
+                            <set field="commEventsSize" value="${groovy: return(commEvents.size())}" type="Integer"/>
+                            <if-compare field="commEventsSize" operator="equals" value="1">
+                                <get-related-one value-field="content" relation-name="DataResource" to-value-field="dataResource"/>
+                                <if-not-empty field="dataResource">
+                                    <get-related-one value-field="dataResource" relation-name="ImageDataResource" to-value-field="imageDataResource"/>
+                                    <if-not-empty field="imageDataResource">
+                                        <remove-value value-field="imageDataResource"/>
+                                    </if-not-empty>
+                                    <get-related-one value-field="dataResource" relation-name="ElectronicText" to-value-field="electronicText"/>
+                                    <if-not-empty field="electronicText">
+                                        <remove-value value-field="electronicText"/>
+                                    </if-not-empty>
+                                    <remove-related value-field="dataResource" relation-name="DataResourceRole"/>
+                                    <remove-value value-field="dataResource"/>
                                 </if-not-empty>
-                                <remove-related value-field="dataResource" relation-name="DataResourceRole"/>
-                                <remove-value value-field="dataResource"/>
-                            </if-not-empty>
+                            </if-compare>
                         </iterate>
                     </if-not-empty>
                 </if-compare>

Propchange: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:418499-490456
 /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:951708-1034179
+/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-1036339

Modified: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu Nov 18 08:32:31 2010
@@ -719,6 +719,7 @@ under the License.
 
     <request-map uri="findVisits"><security https="true" auth="true"/><response name="success" type="view" value="findVisits"/></request-map>
     <request-map uri="visitdetail"><security https="true" auth="true"/><response name="success" type="view" value="visitdetail"/></request-map>
+    <request-map uri="listLoggedInUsers"><security https="true" auth="true"/><response name="success" type="view" value="listLoggedInUsers"/></request-map>
     
     <request-map uri="pushPage">
         <security https="true" auth="true"/>
@@ -1365,6 +1366,7 @@ under the License.
 
     <view-map name="findVisits" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#FindVisits"/>
     <view-map name="visitdetail" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#visitdetail"/>
+    <view-map name="listLoggedInUsers" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#ListLoggedInUsers"/>
 
     <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/>
     <view-map name="LookupPartyEmail" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyEmail"/>

Modified: ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml (original)
+++ ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml Thu Nov 18 08:32:31 2010
@@ -25,6 +25,7 @@
         <menu-item name="mycomm" title="${uiLabelMap.PartyMyCommunications}"><link target="MyCommunicationEvents"/></menu-item>
         <menu-item name="comm" title="${uiLabelMap.PartyCommunications}"><link target="FindCommunicationEvents"/></menu-item>
         <menu-item name="visits" title="${uiLabelMap.PartyVisits}"><link target="findVisits"/></menu-item>
+        <menu-item name="loggedinusers" title="${uiLabelMap.PartyLoggedInUsers}"><link target="listLoggedInUsers"/></menu-item>
         <menu-item name="classification" title="${uiLabelMap.PartyClassifications}"><link target="showclassgroups"/></menu-item>
         <menu-item name="security" title="${uiLabelMap.CommonSecurity}">
             <condition>

Modified: ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml (original)
+++ ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml Thu Nov 18 08:32:31 2010
@@ -71,4 +71,25 @@ under the License.
         <field name="thruDate" title="${uiLabelMap.CommonThruDate}" sort-field="true"><display/></field>
     </form>
 
+    <form name="ListLoggedInUsers" type="list" separate-columns="true" title="Visits List" list-name="listIt" target="" default-entity-name="Visit" paginate-target="listLoggedInUsers"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <set field="parameters.sortField" from-field="parameters.sortField" default-value="-userLoginId"/>
+            <entity-condition entity-name="Visit" list="listIt" distinct="true" filter-by-date="true">
+                <condition-expr field-name="userLoginId" operator="not-equals" from-field="null"/>
+                <select-field field-name="partyId"/>
+                <select-field field-name="userLoginId"/>
+                <select-field field-name="clientIpAddress"/>
+                <order-by field-name="${parameters.sortField}"/>
+            </entity-condition>
+        </actions>
+        
+        <field name="userLoginId" title="${uiLabelMap.PartyUserLoginId}" sort-field="true"><display/></field>
+        <field name="partyId" widget-style="buttontext" sort-field="true">
+            <hyperlink description="${partyId}" target="viewprofile">
+                <parameter param-name="partyId"/>
+            </hyperlink>
+        </field>
+        <field name="clientIpAddress" title="${uiLabelMap.PartyClientIP}" sort-field="true"><display/></field>
+    </form>
 </forms>

Modified: ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml (original)
+++ ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml Thu Nov 18 08:32:31 2010
@@ -56,6 +56,38 @@ under the License.
         </section>
     </screen>
 
+    <screen name="ListLoggedInUsers">
+        <section>
+            <actions>
+                <set field="headerItem" value="loggedinusers"/>
+                <set field="titleProperty" value="PageTitleListLoggedInUsers"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <include-screen name="LoggedInUsersScreen" />
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="LoggedInUsersScreen">
+        <section>
+            <condition>
+                <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
+            </condition>
+            <widgets>
+                <screenlet title="${uiLabelMap.PageTitleListLoggedInUsers}">
+                    <include-form name="ListLoggedInUsers"  location="component://party/widget/partymgr/PartyVisitForms.xml"/>
+                </screenlet>
+            </widgets>
+            <fail-widgets>
+                <label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
+            </fail-widgets>
+        </section>
+    </screen>
+    
     <screen name="visitdetail">
         <section>
             <actions>

Modified: ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml Thu Nov 18 08:32:31 2010
@@ -370,8 +370,10 @@ under the License.
     <Enumeration description="Promotion Recurrence" enumCode="PROMO_RECURRENCE" enumId="PPIP_RECURRENCE" sequenceId="11" enumTypeId="PROD_PROMO_IN_PARAM"/>
     <Enumeration description="Order sub-total X since beginning of current year" enumCode="ORST_YEAR" enumId="PPIP_ORST_YEAR" sequenceId="12" enumTypeId="PROD_PROMO_IN_PARAM"/>
     <Enumeration description="Order sub-total X last year" enumCode="ORST_LAST_YEAR" enumId="PPIP_ORST_LAST_YEAR" sequenceId="13" enumTypeId="PROD_PROMO_IN_PARAM"/>
-    <Enumeration description="Shipping Total" enumCode="ORDER_SHIP_TOTAL" enumId="PPIP_ORDER_SHIPTOTAL" sequenceId="14" enumTypeId="PROD_PROMO_IN_PARAM"/>
-    <Enumeration description="Call Service" enumCode="SERVICE" enumId="PPIP_SERVICE" sequenceId="15" enumTypeId="PROD_PROMO_IN_PARAM"/>
+    <Enumeration description="List Price minus Unit Price (Amount)" enumCode="LPMUP_AMT" enumId="PPIP_LPMUP_AMT" sequenceId="14" enumTypeId="PROD_PROMO_IN_PARAM"/>
+    <Enumeration description="List Price minus Unit Price (Percent)" enumCode="LPMUP_PER" enumId="PPIP_LPMUP_PER" sequenceId="15" enumTypeId="PROD_PROMO_IN_PARAM"/>
+    <Enumeration description="Shipping Total" enumCode="ORDER_SHIP_TOTAL" enumId="PPIP_ORDER_SHIPTOTAL" sequenceId="16" enumTypeId="PROD_PROMO_IN_PARAM"/>
+    <Enumeration description="Call Service" enumCode="SERVICE" enumId="PPIP_SERVICE" sequenceId="17" enumTypeId="PROD_PROMO_IN_PARAM"/>
 
     <EnumerationType description="Product Promotion Condition" enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
     <!-- old style very technical ...

Propchange: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/applications/product/script/org/ofbiz/shipment/test/FacilityTests.xml:831210-885099,885686-886087
 /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:951708-1034179
+/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-1036339

Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductEvents.java Thu Nov 18 08:32:31 2010
@@ -34,6 +34,7 @@ import javolution.util.FastMap;
 import javolution.util.FastSet;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilHttp;
@@ -241,7 +242,7 @@ public class ProductEvents {
 
         if (UtilValidate.isNotEmpty(fromDateStr)) {
             try {
-                fromDate = Timestamp.valueOf(fromDateStr);
+                fromDate = (Timestamp) ObjectType.simpleTypeConvert(fromDateStr, "Timestamp", null, UtilHttp.getTimeZone(request), UtilHttp.getLocale(request), false);
             } catch (Exception e) {
                 errMsgList.add("From Date not formatted correctly.");
             }
@@ -308,7 +309,7 @@ public class ProductEvents {
 
         if (UtilValidate.isNotEmpty(thruDateStr)) {
             try {
-                thruDate = Timestamp.valueOf(thruDateStr);
+                thruDate = (Timestamp) ObjectType.simpleTypeConvert(thruDateStr, "Timestamp", null, UtilHttp.getTimeZone(request), UtilHttp.getLocale(request), false);
             } catch (Exception e) {
                 errMsgList.add(UtilProperties.getMessage(resource,"productevents.thru_date_not_formatted_correctly", UtilHttp.getLocale(request)));
             }

Modified: ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductFeatures.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductFeatures.ftl?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductFeatures.ftl (original)
+++ ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductFeatures.ftl Thu Nov 18 08:32:31 2010
@@ -105,7 +105,7 @@ under the License.
     <form name= "RemoveFeatureFromProduct_o_${productFeatureAndAppl_index}" method= "post" action= "<@ofbizUrl>RemoveFeatureFromProduct</@ofbizUrl>">
       <input type= "hidden" name= "productId" value= "${(productFeatureAndAppl.productId)?if_exists}"/>
       <input type= "hidden" name= "productFeatureId" value= "${(productFeatureAndAppl.productFeatureId)?if_exists}"/>
-      <input type= "hidden" name= "fromDate" value= "${productFeatureAndAppl.getString("fromDate")}"/>
+      <input type= "hidden" name= "fromDate" value= "${(productFeatureAndAppl.fromDate)?if_exists}"/>
     </form>
   </#list>
   </div>

Propchange: ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/applications/commonext/widget/HelpScreens.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1034179
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1036339

Modified: ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Thu Nov 18 08:32:31 2010
@@ -196,6 +196,8 @@ public class ContextFilter implements Fi
         }
 
         // test to see if we have come through the control servlet already, if not do the processing
+        String requestPath = null;
+        String contextUri = null;
         if (request.getAttribute(ContextFilter.FORWARDED_FROM_SERVLET) == null) {
             // Debug.logInfo("In ContextFilter.doFilter, FORWARDED_FROM_SERVLET is NOT set", module);
             String allowedPath = config.getInitParameter("allowedPaths");
@@ -208,7 +210,7 @@ public class ContextFilter implements Fi
 
             if (debug) Debug.log("[Request]: " + httpRequest.getRequestURI(), module);
 
-            String requestPath = httpRequest.getServletPath();
+            requestPath = httpRequest.getServletPath();
             if (requestPath == null) requestPath = "";
             if (requestPath.lastIndexOf("/") > 0) {
                 if (requestPath.indexOf("/") == 0) {
@@ -234,7 +236,7 @@ public class ContextFilter implements Fi
             if (httpRequest.getPathInfo() != null) {
                 contextUriBuffer.append(httpRequest.getPathInfo());
             }
-            String contextUri = contextUriBuffer.toString();
+            contextUri = contextUriBuffer.toString();
 
             // Verbose Debugging
             if (Debug.verboseOn()) {
@@ -288,10 +290,11 @@ public class ContextFilter implements Fi
                     GenericValue tenant = EntityUtil.getFirst(tenants);
                     String tenantId = tenant.getString("tenantId");
                     
-                    // if the request URI is "/control/main" then redirect to the initial path
-                    if (httpRequest.getRequestURI().startsWith("/control/main")) {
+                    // if the request path is a root mount then redirect to the initial path
+                    if (UtilValidate.isNotEmpty(requestPath) && requestPath.equals(contextUri)) {
                         String initialPath = tenant.getString("initialPath");
                         ((HttpServletResponse)response).sendRedirect(initialPath);
+                        return;
                     }
                     
                     // make that tenant active, setup a new delegator and a new dispatcher

Propchange: ofbiz/branches/jquery/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/specialpurpose/ebay/lib:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1034179
+/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1036339

Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/config/EcommerceUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/config/EcommerceUiLabels.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/config/EcommerceUiLabels.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/config/EcommerceUiLabels.xml Thu Nov 18 08:32:31 2010
@@ -263,10 +263,6 @@
         <value xml:lang="th">ข้อมูลบทความ</value>
         <value xml:lang="zh">文章信息</value>
     </property>
-    <property key="EcommerceArticleName">
-        <value xml:lang="en">Article Name</value>
-        <value xml:lang="th">ชื่อบทความ</value>
-    </property>
     <property key="EcommerceAvailable">
         <value xml:lang="en">Available:</value>
         <value xml:lang="fr">Disponible :</value>
@@ -331,15 +327,6 @@
         <value xml:lang="pt_BR">Adicionar um tópico de discussão</value>
         <value xml:lang="zh">添加一个线索:</value>
     </property>
-    <property key="EcommerceBlogArticle">
-        <value xml:lang="da">Artikel</value>
-        <value xml:lang="en">Article</value>
-        <value xml:lang="fr">Article</value>
-        <value xml:lang="it">Articolo</value>
-        <value xml:lang="nl">Artikel</value>        
-        <value xml:lang="pt_BR">Artigo</value>
-        <value xml:lang="zh">文章</value>
-    </property>
     <property key="EcommerceBlogContentNotFound">
         <value xml:lang="da">Kan ikke finde blog indhold!</value>
         <value xml:lang="en">Unable to find Blog content!</value>
@@ -358,15 +345,6 @@
         <value xml:lang="pt_BR">Você deve registrar-se para editar comentários</value>
         <value xml:lang="zh">你必须登录以便编辑评论。</value>
     </property>
-    <property key="EcommerceBlogEntryId">
-        <value xml:lang="da">Blog indlæg id</value>
-        <value xml:lang="en">Blog entry Id</value>
-        <value xml:lang="fr">Réf. de note de blog</value>
-        <value xml:lang="it">Voce blog</value>
-        <value xml:lang="nl">Blog ingave ID</value>    
-        <value xml:lang="pt_BR">ID de entrada de blog</value>
-        <value xml:lang="zh">博客记录标识</value>
-    </property>
     <property key="EcommerceBlogFullMessage">
         <value xml:lang="da">Fuld besked</value>
         <value xml:lang="en">Full message</value>
@@ -3141,22 +3119,6 @@
         <value xml:lang="pt_BR">E-mail de verificação de inscrição</value>
         <value xml:lang="zh">订阅验证电子邮件</value>
     </property>
-    <property key="EcommerceSummary">
-        <value xml:lang="da">Resumé</value>
-        <value xml:lang="de">Zusammenfassung</value>
-        <value xml:lang="en">Summary</value>
-        <value xml:lang="es">Resumen</value>
-        <value xml:lang="fr">Résumé</value>
-        <value xml:lang="hi_IN">साराशं</value>
-        <value xml:lang="it">Sommario</value>
-        <value xml:lang="ja">Summary</value>
-        <value xml:lang="nl">Samenvatting</value>
-        <value xml:lang="pt_BR">Resumo</value>
-        <value xml:lang="ro">Breviar</value>
-        <value xml:lang="ru">Итоги</value>
-        <value xml:lang="th">สรุป</value>
-        <value xml:lang="zh">摘要</value>
-    </property>
     <property key="EcommerceSummaryInformation">
         <value xml:lang="da">Resumé information</value>
         <value xml:lang="de">Zusammenfassung Information</value>

Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/forum/editforumarticle.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/forum/editforumarticle.ftl?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/forum/editforumarticle.ftl (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/forum/editforumarticle.ftl Thu Nov 18 08:32:31 2010
@@ -72,7 +72,7 @@ under the License.
         <h3>${uiLabelMap.EcommerceSummaryInformation}</h3>
     <div class="screenlet-body">
   <table>
-    <tr><td><div class='tabletext'>${uiLabelMap.EcommerceSummary}</div></td><td>&nbsp;</td><td><div class='tabletext'>
+    <tr><td><div class='tabletext'>${uiLabelMap.ContentSummary}</div></td><td>&nbsp;</td><td><div class='tabletext'>
 ${summaryData?if_exists}
 <div></td></tr>
   </table>

Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml Thu Nov 18 08:32:31 2010
@@ -65,7 +65,7 @@ under the License.
         <field name="description">
             <text size="60"/>
         </field>
-       <field name="summaryData" title="${uiLabelMap.EcommerceSummary}"
+       <field name="summaryData" title="${uiLabelMap.ContentSummary}"
             use-when="&quot;${summaryDataResourceTypeId}&quot;.length()>0"
             id-name="summaryData">
                 <textarea rows="8" cols="80"/>
@@ -247,7 +247,7 @@ under the License.
         <field name="description">
             <text size="60"/>
         </field>
-       <field name="summaryData" title="${uiLabelMap.EcommerceSummary}"
+       <field name="summaryData" title="${uiLabelMap.ContentSummary}"
             use-when="&quot;${summaryDataResourceTypeId}&quot;.length()>0"
             id-name="summaryData">
                 <textarea rows="8" cols="80"/>
@@ -473,7 +473,7 @@ under the License.
         <field name="description" title="${uiLabelMap.EcommerceLongSubject}">
             <text size="60"/>
         </field>
-       <field name="summaryData" title="${uiLabelMap.EcommerceSummary}"
+       <field name="summaryData" title="${uiLabelMap.ContentSummary}"
             use-when="&quot;${summaryDataResourceTypeId}&quot;.length()>0"
             id-name="summaryData">
                 <textarea rows="8" cols="80"/>

Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogForms.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogForms.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogForms.xml Thu Nov 18 08:32:31 2010
@@ -196,31 +196,6 @@
         </sort-order>
     </form>
 
-    <form name="EditArticle" target="createBlogArticle" title="" type="upload" skip-end="true" default-map-name="blogEntry"
-        default-title-style="treeHeader" default-tooltip-style="tabletext" default-widget-style="inputBox">
-        <alt-target use-when="contentId!=void&amp;&amp;contentId!=null" target="updateBlogArticle"/>
-        <field name="blogContentId"><hidden value="${parameters.blogContentId}"/></field>
-        <field name="contentId" title="${uiLabelMap.EcommerceBlogEntryId}" use-when="contentId!=void&amp;&amp;contentId!=null"><display/></field>
-        <field name="contentName" title="${uiLabelMap.EcommerceArticleName}"><text size="40"/></field>
-        <field name="description"><textarea cols="60" rows="2"/></field>
-        <field name="summaryData" title="${uiLabelMap.EcommerceSummary}" widget-style="inputBox dojo-ResizableTextArea"><textarea cols="60" rows="4"/></field>
-        <field name="articleData" title="${uiLabelMap.EcommerceBlogArticle}" widget-style="inputBox dojo-ResizableTextArea"><textarea cols="100" rows="20" visual-editor-enable="true"/></field>
-        <field name="uploadedFile" title="${uiLabelMap.ContentImage}"><file size="25"/></field>
-        <field name="templateDataResourceId" title="${uiLabelMap.ContentTemplate}">
-            <drop-down>
-                <option key="BLOG_TPL_TOPLEFT" description="${uiLabelMap.EcommerceBlogTopLeft}"/>
-                <option key="BLOG_TPL_TOPCENTER" description="${uiLabelMap.EcommerceBlogTopCenter}"/>
-            </drop-down>
-        </field>
-        <field name="statusId" title="${uiLabelMap.CommonStatus}">
-            <drop-down no-current-selected-key="CTNT_INITIAL_DRAFT">
-                <option key="CTNT_PUBLISHED" description="${uiLabelMap.EcommerceBlogPublish}"/>
-                <option key="CTNT_INITIAL_DRAFT" description="${uiLabelMap.EcommerceBlogPreview}"/>
-            </drop-down>
-        </field>
-        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
-    </form>
-
     <form name="editFormSubmit" target="" title="" type="single" skip-start="true" skip-end="true"
         default-title-style="treeHeader" default-tooltip-style="tabletext" default-widget-style="inputBox">
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit">

Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogScreens.xml?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogScreens.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/blog/BlogScreens.xml Thu Nov 18 08:32:31 2010
@@ -176,7 +176,7 @@
                     <widgets>
                         <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
                             <decorator-section name="body">
-                                <include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>
                             </decorator-section>
                         </decorator-screen>
                     </widgets>
@@ -209,7 +209,7 @@
                         <decorator-screen name="CommonBlog" location="${parameters.mainDecoratorLocation}">
                             <decorator-section name="body">
                                 <sub-content content-id="${parameters.contentId}" map-key="IMAGE"/>
-                                <include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                                <include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>
                             </decorator-section>
                         </decorator-screen>
                     </widgets>

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-1034179
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-1036339

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-1034179
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-1036339

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 18 08:32:31 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-1034179
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-1036339

Modified: ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css?rev=1036344&r1=1036343&r2=1036344&view=diff
==============================================================================
--- ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css (original)
+++ ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css Thu Nov 18 08:32:31 2010
@@ -1981,8 +1981,8 @@ margin-bottom: 1em;
 /* Pager */
 .nav-pager {
 background-color: #9F9F9F;
-padding:8px 20px;
-height:21px;
+padding:2px 20px;
+height:23px;
 }
 
 .nav-pager select{