You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/07/07 17:38:12 UTC
svn commit: r1608498 - in /ofbiz/branches/release11.04: ./
applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Author: jleroux
Date: Mon Jul 7 15:38:11 2014
New Revision: 1608498
URL: http://svn.apache.org/r1608498
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/release11.04/ (props changed)
ofbiz/branches/release11.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1608495
Modified: ofbiz/branches/release11.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1608498&r1=1608497&r2=1608498&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy (original)
+++ ofbiz/branches/release11.04/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy Mon Jul 7 15:38:11 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 {