You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2015/01/04 21:03:19 UTC

svn commit: r1649396 - in /ofbiz/trunk/applications/product: src/org/ofbiz/shipment/shipment/ShipmentServices.java webapp/facility/shipment/PackOrder.ftl

Author: ashish
Date: Sun Jan  4 20:03:19 2015
New Revision: 1649396

URL: http://svn.apache.org/r1649396
Log:
Applied patch from jira issue - OFBIZ-5925 - Pack order flow is broken.
Thanks Deepak for creating the issue and thanks Divesh for the patch. Thanks Jacopo!

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
    ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1649396&r1=1649395&r2=1649396&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Sun Jan  4 20:03:19 2015
@@ -432,22 +432,26 @@ public class ShipmentServices {
         if (shippableItemInfo != null) {
             for (Map<String, Object> itemMap: shippableItemInfo) {
                 // add the item sizes
-                BigDecimal itemSize = (BigDecimal) itemMap.get("size");
-                if (itemSize != null) {
-                    shippableItemSizes.add(itemSize);
+                if (itemMap.containsKey("size")) {
+                    BigDecimal itemSize = (BigDecimal) itemMap.get("size");
+                    if (itemSize != null) {
+                        shippableItemSizes.add(itemSize);
+                    }
                 }
 
                 // add the feature quantities
                 BigDecimal quantity = (BigDecimal) itemMap.get("quantity");
-                Set<String> featureSet = UtilGenerics.checkSet(itemMap.get("featureSet"));
-                if (UtilValidate.isNotEmpty(featureSet)) {
-                    for (String featureId: featureSet) {
-                        BigDecimal featureQuantity = shippableFeatureMap.get(featureId);
-                        if (featureQuantity == null) {
-                            featureQuantity = BigDecimal.ZERO;
+                if (itemMap.containsKey("featureSet")) {
+                    Set<String> featureSet = UtilGenerics.checkSet(itemMap.get("featureSet"));
+                    if (UtilValidate.isNotEmpty(featureSet)) {
+                        for (String featureId: featureSet) {
+                            BigDecimal featureQuantity = shippableFeatureMap.get(featureId);
+                            if (featureQuantity == null) {
+                                featureQuantity = BigDecimal.ZERO;
+                            }
+                            featureQuantity = featureQuantity.add(quantity);
+                            shippableFeatureMap.put(featureId, featureQuantity);
                         }
-                        featureQuantity = featureQuantity.add(quantity);
-                        shippableFeatureMap.put(featureId, featureQuantity);
                     }
                 }
 

Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl?rev=1649396&r1=1649395&r2=1649396&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl Sun Jan  4 20:03:19 2015
@@ -150,7 +150,7 @@ under the License.
         </div>
         <div class="screenlet-body">
               <#if orderItemShipGroup?has_content>
-                <#if (orderItemShipGroup.contacMechId)?has_content>
+                <#if (orderItemShipGroup.contactMechId)?has_content>
                   <#assign postalAddress = orderItemShipGroup.getRelatedOne("PostalAddress", false)>
                 </#if>
                 <#assign carrier = orderItemShipGroup.carrierPartyId?default("N/A")>