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!

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ashish Vijaywargiya
2015-01-04 20:03:19 +00:00
parent cbbdc011d3
commit 44d1bbb9bc
2 changed files with 16 additions and 12 deletions
@@ -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);
}
}
@@ -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")>