ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r1608497 - in /ofbiz/branches/release12.04: ./ applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Date Mon, 07 Jul 2014 15:38:10 GMT
Author: jleroux
Date: Mon Jul  7 15:38:09 2014
New Revision: 1608497

URL: http://svn.apache.org/r1608497
Log:
"Applied fix from trunk for revision: 1608495" 
------------------------------------------------------------------------
r1608495 | jleroux | 2014-07-07 17:37:06 +0200 (lun. 07 juil. 2014) | 2 lignes

Fixes a bug: can't call PackSession.getShipmentCostEstimate() w/o orderItemShipGroup.contactMechId
&& orderItemShipGroup.shipmentMethodTypeId && orderItemShipGroup.carrierPartyId
&& orderItemShipGroup.carrierRoleTypeId)
Fixes indentation
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1608495

Modified: ofbiz/branches/release12.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1608497&r1=1608496&r2=1608497&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
(original)
+++ ofbiz/branches/release12.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Mon Jul  7 15:38:09 2014
@@ -140,27 +140,29 @@ if (orderId) {
 
         if ("ORDER_APPROVED".equals(orderHeader.statusId)) {
             if (shipGroupSeqId) {
-            if (!shipment) {
-
-                // Generate the shipment cost estimate for the ship group
-                productStoreId = orh.getProductStoreId();
-                shippableItemInfo = orh.getOrderItemAndShipGroupAssoc(shipGroupSeqId);
-                shippableItems = delegator.findList("OrderItemAndShipGrpInvResAndItemSum",
EntityCondition.makeCondition([orderId : orderId, shipGroupSeqId : shipGroupSeqId]), null,
null, null, false);
-                shippableTotal = new Double(orh.getShippableTotal(shipGroupSeqId).doubleValue());
-                shippableWeight = new Double(orh.getShippableWeight(shipGroupSeqId).doubleValue());
-                shippableQuantity = new Double(orh.getShippableQuantity(shipGroupSeqId).doubleValue());
-                shipmentCostEstimate = packSession.getShipmentCostEstimate(orderItemShipGroup,
productStoreId, shippableItemInfo, shippableTotal, shippableWeight, shippableQuantity);
-                context.shipmentCostEstimateForShipGroup = shipmentCostEstimate;
-                context.productStoreId = productStoreId;
-
-                if (!picklistBinId) {
-                    packSession.addItemInfo(shippableItems);
-                    //context.put("itemInfos", shippableItemInfo);
+                if (!shipment) {
+    
+                    // Generate the shipment cost estimate for the ship group
+                    productStoreId = orh.getProductStoreId();
+                    shippableItemInfo = orh.getOrderItemAndShipGroupAssoc(shipGroupSeqId);
+                    shippableItems = delegator.findList("OrderItemAndShipGrpInvResAndItemSum",
EntityCondition.makeCondition([orderId : orderId, shipGroupSeqId : shipGroupSeqId]), null,
null, null, false);
+                    shippableTotal = new Double(orh.getShippableTotal(shipGroupSeqId).doubleValue());
+                    shippableWeight = new Double(orh.getShippableWeight(shipGroupSeqId).doubleValue());
+                    shippableQuantity = new Double(orh.getShippableQuantity(shipGroupSeqId).doubleValue());
+                    if (orderItemShipGroup.contactMechId && orderItemShipGroup.shipmentMethodTypeId
&& orderItemShipGroup.carrierPartyId && orderItemShipGroup.carrierRoleTypeId)
{
+                        shipmentCostEstimate = packSession.getShipmentCostEstimate(orderItemShipGroup,
productStoreId, shippableItemInfo, shippableTotal, shippableWeight, shippableQuantity);
+                        context.shipmentCostEstimateForShipGroup = shipmentCostEstimate;
+                    }
+                    context.productStoreId = productStoreId;
+    
+                    if (!picklistBinId) {
+                        packSession.addItemInfo(shippableItems);
+                        //context.put("itemInfos", shippableItemInfo);
+                    }
+                } else {
+                    request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage("OrderErrorUiLabels",
"OrderErrorOrderHasBeenAlreadyVerified", [orderId : orderId], locale));
                 }
             } else {
-                request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage("OrderErrorUiLabels",
"OrderErrorOrderHasBeenAlreadyVerified", [orderId : orderId], locale));
-            }
-            } else {
                 request.setAttribute("errorMessageList", ['No ship group sequence ID. Cannot
process.']);
             }
         } else {



Mime
View raw message