Author: mor
Date: Sat May 30 09:11:41 2009
New Revision: 780211
URL: http://svn.apache.org/viewvc?rev=780211&view=rev
Log:
Reverting my commit done in rev. 779981. This process needs a better fix.
Modified:
ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml
ofbiz/trunk/applications/product/servicedef/services_shipment.xml
ofbiz/trunk/applications/product/servicedef/services_shipment_ups.xml
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl
ofbiz/trunk/specialpurpose/ecommerce/data/DemoShipping.xml
Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml Sat May 30
09:11:41 2009
@@ -85,9 +85,6 @@
<property
key="ProductErrorNoValidOrderItemFoundForProductWithEnteredQuantity">
<value xml:lang="en">ERROR: No valid order item found for product
[${productId}] with quantity [${quantity}]</value>
</property>
- <property key="ProductErrorPackageWeightCannotBeNullOrZero">
- <value xml:lang="en">ERROR: Package weight cannot be null/zero, it
should be greater than zero</value>
- </property>
<property key="ProductFeatureTypeIdMustContainsLettersAndDigits">
<value xml:lang="de">Die Produktmerkmal Typ ID darf nur Buchstaben,
Zahlen und _ enthalten. Bitte erneut eingeben.</value>
<value xml:lang="en">The Product Feature TypeId must contains only
letters, underscore and digits. Please re-enter</value>
Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Sat May
30 09:11:41 2009
@@ -589,9 +589,6 @@
<attribute name="shipmentCostEstimateForShipGroup" type="String"
mode="IN" optional="true"/>
<attribute name="pickerPartyId" type="String" mode="IN"
optional="true"/>
<attribute name="forceComplete" type="Boolean" mode="IN"
optional="true"/>
- <attribute name="shippableQuantity" type="BigDecimal" mode="IN"
optional="true"/>
- <attribute name="shippableTotal" type="BigDecimal" mode="IN"
optional="true"/>
- <attribute name="shippableItemInfo" type="List" mode="IN"
optional="true"/>
<attribute name="shipmentId" type="String" mode="INOUT"
optional="true"/>
<attribute name="showWarningForm" type="Boolean" mode="OUT"
optional="true"/>
</service>
Modified: ofbiz/trunk/applications/product/servicedef/services_shipment_ups.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment_ups.xml?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_shipment_ups.xml
(original)
+++ ofbiz/trunk/applications/product/servicedef/services_shipment_ups.xml Sat
May 30 09:11:41 2009
@@ -33,7 +33,6 @@
<attribute name="upsRateInquireMode" type="String" mode="IN"
optional="true"/>
<!-- Passing in a list of package weights will override the splitting
of packages and calculation of package weights by item -->
<attribute name="packageWeights" type="List" mode="IN"
optional="true"/>
- <attribute name="packageInfo" type="List" mode="IN" optional="true"/>
<attribute name="upsRateCodeMap" type="Map" mode="OUT"
optional="false"/>
</service>
@@ -86,7 +85,6 @@
<attribute name="shippingCountryCode" type="String" mode="IN"
optional="true"/>
<!-- Allow specifying a from address if different from product store's
facility address. -->
<attribute name="shipFromAddress" type="org.ofbiz.entity.GenericValue"
mode="IN" optional="true"/>
- <attribute name="packageInfo" type="List" mode="IN" optional="true"/>
</service>
<!-- UPS Address Validation -->
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
Sat May 30 09:11:41 2009
@@ -34,10 +34,8 @@
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.GenericDelegator;
-import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.service.ServiceUtil;
@@ -344,11 +342,6 @@
}
}
- // Check package weight, it must be greater than ZERO
- if (UtilValidate.isEmpty(packageWeight) || new
BigDecimal(packageWeight).compareTo(ZERO) <= 0) {
- return
ServiceUtil.returnError(UtilProperties.getMessage("ProductErrorUiLabels",
"ProductErrorPackageWeightCannotBeNullOrZero", locale));
- }
-
BigDecimal shippableWeight = ZERO;
Map<String, Object> response = FastMap.newInstance();
@@ -387,7 +380,6 @@
public static Map<String, Object> completePackage(DispatchContext dctx,
Map<String, ? extends Object> context) {
GenericDelegator delegator = dctx.getDelegator();
- LocalDispatcher dispatcher = dctx.getDispatcher();
PackingSession session = (PackingSession)
context.get("packingSession");
Locale locale = (Locale) context.get("locale");
Map<String, String> packageWeights =
UtilGenerics.checkMap(context.get("packageWeights"));
@@ -404,9 +396,6 @@
String dimensionUomId = (String) context.get("dimensionUomId");
String weightUomId = (String) context.get("weightUomId");
Boolean forceComplete = (Boolean) context.get("forceComplete");
- List shippableItemInfo = (List) context.get("shippableItemInfo");
- BigDecimal shippableQuantity = (BigDecimal)
context.get("shippableQuantity");
- BigDecimal shippableTotal = (BigDecimal) context.get("shippableTotal");
String shipmentCostEstimateForShipGroup = (String)
context.get("shipmentCostEstimateForShipGroup");
BigDecimal estimatedShipCost = new
BigDecimal(shipmentCostEstimateForShipGroup);
@@ -417,34 +406,7 @@
BigDecimal diffInShipCostInPerc = ZERO;
BigDecimal shippableWeight = setSessionPackageWeights(session,
packageWeights);
- FastList<Map<String, Object>> packageInfo = FastList.newInstance();
- try {
- packageInfo = (FastList) session.getPackageInfo();
- } catch (GenericEntityException e) {
- return ServiceUtil.returnError(e.getMessage());
- }
- BigDecimal newEstimatedShipCost = null;
- if ("UPS".equals(carrierPartyId)) {
- Map<String, Object> upsRateEstimateMap = FastMap.newInstance();
- upsRateEstimateMap.put("shippingContactMechId",
shippingContactMechId);
- upsRateEstimateMap.put("shipmentMethodTypeId",
shipmentMethodTypeId);
- upsRateEstimateMap.put("carrierPartyId", carrierPartyId);
- upsRateEstimateMap.put("carrierRoleTypeId", carrierRoleTypeId);
- upsRateEstimateMap.put("productStoreId", productStoreId);
- upsRateEstimateMap.put("shippableWeight", shippableWeight);
- upsRateEstimateMap.put("shippableQuantity", shippableQuantity);
- upsRateEstimateMap.put("shippableTotal", shippableTotal);
- upsRateEstimateMap.put("shippableItemInfo", shippableItemInfo);
- upsRateEstimateMap.put("packageInfo", packageInfo);
- try {
- Map<String, Object> upsRateEstimateRespose =
dispatcher.runSync("upsRateEstimate", upsRateEstimateMap);
- newEstimatedShipCost = (BigDecimal)
upsRateEstimateRespose.get("shippingEstimateAmount");
- } catch (GenericServiceException e) {
- return ServiceUtil.returnError(e.getMessage());
- }
- } else {
- newEstimatedShipCost =
session.getShipmentCostEstimate(shippingContactMechId, shipmentMethodTypeId,
carrierPartyId, carrierRoleTypeId, productStoreId, null, null, shippableWeight,
null);
- }
+ BigDecimal newEstimatedShipCost =
session.getShipmentCostEstimate(shippingContactMechId, shipmentMethodTypeId,
carrierPartyId, carrierRoleTypeId, productStoreId, null, null, shippableWeight,
null);
session.setAdditionalShippingCharge(newEstimatedShipCost);
session.setDimensionUomId(dimensionUomId);
@@ -455,8 +417,7 @@
try {
session.checkPackedQty(orderId, locale);
- List<GenericValue> shipments = FastList.newInstance();
- shipments = delegator.findByAnd("Shipment",
UtilMisc.toMap("primaryOrderId", orderId, "statusId", "SHIPMENT_PACKED"));
+ FastList<GenericValue> shipments = (FastList)
delegator.findByAnd("Shipment", UtilMisc.toMap("primaryOrderId", orderId,
"statusId", "SHIPMENT_PACKED"));
for (GenericValue shipment : shipments) {
BigDecimal additionalShippingCharge =
shipment.getBigDecimal("additionalShippingCharge");
if (UtilValidate.isNotEmpty(additionalShippingCharge)) {
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
Sat May 30 09:11:41 2009
@@ -1017,8 +1017,6 @@
packageWeights.remove(Integer.valueOf(packageSeqId));
} else {
packageWeights.put(Integer.valueOf(packageSeqId), packageWeight);
- PackingSessionLine packLine = this.getLine(packageSeqId);
- packLine.setWeight(packageWeight);
}
}
@@ -1173,33 +1171,6 @@
}
}
- public List<Map<String, Object>> getPackageInfo() throws
GenericEntityException {
- List<Map<String, Object>> packageInfoList = FastList.newInstance();
- if (UtilValidate.isNotEmpty(this.getLines())) {
- for (PackingSessionLine packedline : this.getLines()) {
- Map<String, Object> packageInfoMap = FastMap.newInstance();
- if
(UtilValidate.isNotEmpty(packedline.getShipmentBoxTypeId())) {
- GenericValue shipmentBoxType =
this.getDelegator().findOne("ShipmentBoxType",
UtilMisc.toMap("shipmentBoxTypeId", packedline.getShipmentBoxTypeId()), false);
- packageInfoMap.put("shipmentBoxType", shipmentBoxType);
- } else {
- packageInfoMap.put("shipmentBoxType", null);
- }
- if (UtilValidate.isNotEmpty(packedline.getLength()) &&
UtilValidate.isNotEmpty(packedline.getWidth()) &&
UtilValidate.isNotEmpty(packedline.getHeight())) {
- packageInfoMap.put("packageLength",
packedline.getLength());
- packageInfoMap.put("packageWidth", packedline.getWidth());
- packageInfoMap.put("packageHeight",
packedline.getHeight());
- } else {
- packageInfoMap.put("packageLength", null);
- packageInfoMap.put("packageWidth", null);
- packageInfoMap.put("packageHeight", null);
- }
- packageInfoMap.put("packageWeight", packedline.getWeight());
- packageInfoList.add(packageInfoMap);
- }
- }
- return packageInfoList;
- }
-
class ItemDisplay extends AbstractMap {
public GenericValue orderItem;
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
Sat May 30 09:11:41 2009
@@ -1560,7 +1560,6 @@
cxt.put("shippableWeight", context.get("shippableWeight"));
cxt.put("isResidentialAddress", context.get("isResidentialAddress"));
cxt.put("shipFromAddress", shipFromAddress);
- cxt.put("packageInfo", context.get("packageInfo"));
try {
return dctx.getDispatcher().runSync("upsRateEstimateByPostalCode",
cxt);
@@ -1629,90 +1628,6 @@
UtilXml.addChildElementValue(packageWeightElement, "Weight",
packageWeight.toString(), requestDoc);
}
- private static Map<String, Object> addPackageElement(Document requestDoc,
Element shipmentElement, Map<String, Object> packageInfoMap) {
- GenericValue shipmentBoxType = null;
- List<GenericValue> carrierShipmentBoxTypes = null;
- try {
- if
(UtilValidate.isNotEmpty(packageInfoMap.get("shipmentBoxType"))) {
- shipmentBoxType = (GenericValue)
packageInfoMap.get("shipmentBoxType");
- carrierShipmentBoxTypes =
shipmentBoxType.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId",
"UPS"), null);
- }
- Element packageElement = UtilXml.addChildElement(shipmentElement,
"Package", requestDoc);
- Element packagingTypeElement =
UtilXml.addChildElement(packageElement, "PackagingType", requestDoc);
-
- if (UtilValidate.isNotEmpty(carrierShipmentBoxTypes)) {
- GenericValue carrierShipmentBoxType =
carrierShipmentBoxTypes.get(0);
- if
(UtilValidate.isNotEmpty(carrierShipmentBoxType.getString("packagingTypeCode")))
{
- UtilXml.addChildElementValue(packagingTypeElement, "Code",
carrierShipmentBoxType.getString("packagingTypeCode"), requestDoc);
- } else {
- UtilXml.addChildElementValue(packagingTypeElement, "Code",
"02", requestDoc);
- }
- } else {
- UtilXml.addChildElementValue(packagingTypeElement, "Code",
"00", requestDoc);
- }
-
- UtilXml.addChildElementValue(packagingTypeElement, "Description",
"Unknown PackagingType", requestDoc);
- if (UtilValidate.isNotEmpty(shipmentBoxType) &&
UtilValidate.isNotEmpty(shipmentBoxType.getString("description"))) {
- UtilXml.addChildElementValue(packageElement, "Description",
shipmentBoxType.getString("description"), requestDoc);
- } else {
- UtilXml.addChildElementValue(packageElement, "Description",
"Package Description", requestDoc);
- }
-
- Element packageWeightElement =
UtilXml.addChildElement(packageElement, "PackageWeight", requestDoc);
- Element packageWeightUnitOfMeasurementElement =
UtilXml.addChildElement(packageWeightElement, "UnitOfMeasurement", requestDoc);
- if (UtilValidate.isNotEmpty(shipmentBoxType) &&
UtilValidate.isNotEmpty(shipmentBoxType.getString("weightUomId"))) {
- String weightUomUps =
unitsOfbizToUps.get(shipmentBoxType.getString("weightUomId"));
-
UtilXml.addChildElementValue(packageWeightUnitOfMeasurementElement, "Code",
weightUomUps, requestDoc);
- } else {
-
UtilXml.addChildElementValue(packageWeightUnitOfMeasurementElement, "Code",
"LBS", requestDoc);
- }
-
- BigDecimal packageWeight = BigDecimal.ONE;
- if (UtilValidate.isNotEmpty(packageInfoMap.get("packageWeight"))) {
- packageWeight = (BigDecimal)
packageInfoMap.get("packageWeight");
- } else {
- String totalWeightStr =
UtilProperties.getPropertyValue("shipment", "shipment.ups.min.estimate.weight",
"1");
- try {
- packageWeight = new BigDecimal(totalWeightStr);
- } catch (NumberFormatException e) {
- Debug.logError(e, module);
- }
- }
-
- UtilXml.addChildElementValue(packageWeightElement, "Weight",
packageWeight.toString(), requestDoc);
- if (UtilValidate.isNotEmpty(packageInfoMap.get("packageLength"))
&& UtilValidate.isNotEmpty(packageInfoMap.get("packageWidth")) &&
-
UtilValidate.isNotEmpty(packageInfoMap.get("packageHeight"))) {
- Element dimensionsElement =
UtilXml.addChildElement(packageElement, "Dimensions", requestDoc);
- Element unitOfMeasurementElement =
UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", requestDoc);
-
- UtilXml.addChildElementValue(unitOfMeasurementElement, "Code",
"IN", requestDoc);
-
- BigDecimal length = (BigDecimal)
packageInfoMap.get("packageLength");
- BigDecimal width = (BigDecimal)
packageInfoMap.get("packageWidth");
- BigDecimal height = (BigDecimal)
packageInfoMap.get("packageHeight");
-
- UtilXml.addChildElementValue(dimensionsElement, "Length",
length.setScale(decimals, rounding).toString(), requestDoc);
- UtilXml.addChildElementValue(dimensionsElement, "Width",
width.setScale(decimals, rounding).toString(), requestDoc);
- UtilXml.addChildElementValue(dimensionsElement, "Height",
height.setScale(decimals, rounding).toString(), requestDoc);
- } else if (UtilValidate.isNotEmpty(shipmentBoxType) &&
UtilValidate.isNotEmpty(shipmentBoxType.getBigDecimal("boxLength")) &&
-
UtilValidate.isNotEmpty(shipmentBoxType.getBigDecimal("boxWidth")) &&
UtilValidate.isNotEmpty(shipmentBoxType.getBigDecimal("boxHeight"))) {
- Element dimensionsElement =
UtilXml.addChildElement(packageElement, "Dimensions", requestDoc);
- Element unitOfMeasurementElement =
UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", requestDoc);
- GenericValue dimensionUom =
shipmentBoxType.getRelatedOne("DimensionUom");
- if (dimensionUom != null) {
- UtilXml.addChildElementValue(unitOfMeasurementElement,
"Code", dimensionUom.getString("abbreviation").toUpperCase(), requestDoc);
- } else {
- UtilXml.addChildElementValue(unitOfMeasurementElement,
"Code", "IN", requestDoc);
- }
- UtilXml.addChildElementValue(dimensionsElement, "Length",
shipmentBoxType.getBigDecimal("boxLength").setScale(decimals,
rounding).toString(), requestDoc);
- UtilXml.addChildElementValue(dimensionsElement, "Width",
shipmentBoxType.getBigDecimal("boxWidth").setScale(decimals,
rounding).toString(), requestDoc);
- UtilXml.addChildElementValue(dimensionsElement, "Height",
shipmentBoxType.getBigDecimal("boxHeight").setScale(decimals,
rounding).toString(), requestDoc);
- }
- } catch (GenericEntityException e) {
- return ServiceUtil.returnError(e.getMessage());
- }
- return ServiceUtil.returnSuccess();
- }
private static BigDecimal checkForDefaultPackageWeight(BigDecimal weight,
BigDecimal minWeight) {
return (weight.compareTo(BigDecimal.ZERO) > 0 &&
weight.compareTo(minWeight) > 0 ? weight : minWeight);
@@ -1994,7 +1909,6 @@
String shippingCountryCode = (String)
context.get("shippingCountryCode");
List<BigDecimal> packageWeights =
UtilGenerics.checkList(context.get("packageWeights"));
List<Map<String, Object>> shippableItemInfo =
UtilGenerics.checkList(context.get("shippableItemInfo"));
- List<Map<String, Object>> packageInfo =
UtilGenerics.checkList(context.get("packageInfo"));
BigDecimal shippableTotal = (BigDecimal) context.get("shippableTotal");
BigDecimal shippableQuantity = (BigDecimal)
context.get("shippableQuantity");
BigDecimal shippableWeight = (BigDecimal)
context.get("shippableWeight");
@@ -2128,19 +2042,11 @@
}
// Passing in a list of package weights overrides the calculation of
same via shippableItemInfo
- if (UtilValidate.isEmpty(packageInfo)) {
- // Passing in a list of package weights overrides the calculation
of same via shippableItemInfo
- if (UtilValidate.isEmpty(packageWeights)) {
- splitEstimatePackages(rateRequestDoc, shipmentElement,
shippableItemInfo, maxWeight, minWeight);
- } else {
- for (BigDecimal packageWeight: packageWeights) {
- addPackageElement(rateRequestDoc, shipmentElement,
packageWeight);
- }
- }
+ if (UtilValidate.isEmpty(packageWeights)) {
+ splitEstimatePackages(rateRequestDoc, shipmentElement,
shippableItemInfo, maxWeight, minWeight);
} else {
- // Passing in a map of package informations like weight, dimension
(length, width and height) and shipmentBoxType
- for (Map<String, Object> packageInfoMap : packageInfo) {
- addPackageElement(rateRequestDoc, shipmentElement,
packageInfoMap);
+ for (BigDecimal packageWeight: packageWeights) {
+ addPackageElement(rateRequestDoc, shipmentElement,
packageWeight);
}
}
Modified:
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
(original)
+++
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
Sat May 30 09:11:41 2009
@@ -127,6 +127,9 @@
context.weightPackageSeqIds = weightPackageSeqIds;
}
+shipmentBoxTypes = delegator.findList("ShipmentBoxType", null, null,
["description"], null, true);
+context.shipmentBoxTypes = shipmentBoxTypes;
+
// picklist based packing information
picklistBinId = parameters.picklistBinId;
// see if the bin ID is already set
@@ -167,7 +170,6 @@
}
// grab the order information
-String carrierPartyId = null;
if (orderId) {
orderHeader = delegator.findOne("OrderHeader", [orderId : orderId], false);
if (orderHeader) {
@@ -176,7 +178,6 @@
context.orderHeader = orderHeader;
context.orderReadHelper = orh;
orderItemShipGroup = orh.getOrderItemShipGroup(shipGroupSeqId);
- carrierPartyId = orderItemShipGroup.carrierPartyId;
context.orderItemShipGroup = orderItemShipGroup;
orderItems = orh.getOrderItems();
context.orderItems = orderItems;
@@ -187,18 +188,14 @@
// Generate the shipment cost estimate for the ship group
productStoreId = orh.getProductStoreId();
- orderItemAndShipGroupAssocs =
orh.getOrderItemAndShipGroupAssoc(shipGroupSeqId);
- shippableItemInfo =
orh.getShippableItemInfo(shipGroupSeqId);
+ shippableItemInfo =
orh.getOrderItemAndShipGroupAssoc(shipGroupSeqId);
shippableItems =
delegator.findList("OrderItemAndShipGrpInvResAndItemSum",
EntityCondition.makeCondition([orderId : orderId, shipGroupSeqId :
shipGroupSeqId]), null, null, null, false);
- shippableTotal = new
BigDecimal(orh.getShippableTotal(shipGroupSeqId).doubleValue());
+ shippableTotal = new
Double(orh.getShippableTotal(shipGroupSeqId).doubleValue());
shippableWeight = new
Double(orh.getShippableWeight(shipGroupSeqId).doubleValue());
- shippableQuantity = new
BigDecimal(orh.getShippableQuantity(shipGroupSeqId).doubleValue());
- shipmentCostEstimate =
packSession.getShipmentCostEstimate(orderItemShipGroup, productStoreId,
orderItemAndShipGroupAssocs, shippableTotal, shippableWeight,
shippableQuantity);
+ shippableQuantity = new
Double(orh.getShippableQuantity(shipGroupSeqId).doubleValue());
+ shipmentCostEstimate =
packSession.getShipmentCostEstimate(orderItemShipGroup, productStoreId,
shippableItemInfo, shippableTotal, shippableWeight, shippableQuantity);
context.shipmentCostEstimateForShipGroup =
shipmentCostEstimate;
context.productStoreId = productStoreId;
- context.shippableQuantity = shippableQuantity;
- context.shippableTotal = shippableTotal;
- context.shippableItemInfo = shippableItemInfo;
if (!picklistBinId) {
packSession.addItemInfo(shippableItems);
@@ -218,15 +215,6 @@
}
}
-if (carrierPartyId) {
- carrierShipmentBoxTypes =
delegator.findByAnd("CarrierShipmentBoxType", [partyId : carrierPartyId]);
- shipmentBoxTypes = [];
- carrierShipmentBoxTypes.each { carrierShipmentBoxType ->
- shipmentBoxTypes.add(delegator.findOne("ShipmentBoxType",
[shipmentBoxTypeId : carrierShipmentBoxType.shipmentBoxTypeId], false));
- context.shipmentBoxTypes = shipmentBoxTypes;
- }
-}
-
defaultDimensionUomId = null;
if (facility) {
defaultDimensionUomId = facility.defaultDimensionUomId;
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=780211&r1=780210&r2=780211&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl Sat
May 30 09:11:41 2009
@@ -506,9 +506,6 @@
<input type="hidden" name="shipmentId"
value="${(shipment.shipmentId)?default("")}"/>
<input type="hidden" name="invoiceId"
value="${(invoice.invoiceId)?default("")}"/>
<input type="hidden" name="showInput" value="N"/>
- <input type="hidden" name="shippableQuantity"
value="${shippableQuantity?if_exists}"/>
- <input type="hidden" name="shippableTotal"
value="${shippableTotal?if_exists}"/>
- <input type="hidden" name="shippableItemInfo"
value="${shippableItemInfo?if_exists}"/>
<#if orderItemShipGroup?has_content>
<input type="hidden" name="shippingContactMechId"
value="${orderItemShipGroup.contactMechId?if_exists}"/>
<input type="hidden" name="shipmentMethodTypeId"
value="${orderItemShipGroup.shipmentMethodTypeId?if_exists}"/>
Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoShipping.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoShipping.xml?rev=780211&r1=780210&r2=780211&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/data/DemoShipping.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoShipping.xml Sat May 30
09:11:41 2009
@@ -148,14 +148,4 @@
<CarrierShipmentBoxType shipmentBoxTypeId="FX25KGBOX" partyId="FEDEX"
packagingTypeCode="FEDEX25KGBOX"/>
<CarrierShipmentBoxType shipmentBoxTypeId="YOURPACKNG" partyId="FEDEX"
packagingTypeCode="YOURPACKAGING"/>
- <ShipmentBoxType shipmentBoxTypeId="UPSBOX_MED" description="UPS Medium
Moving Box(18 inches x 14 inches x 12 inches)" dimensionUomId="LEN_in"
boxLength="18" boxWidth="14" boxHeight="12"/>
- <ShipmentBoxType shipmentBoxTypeId="UPSBOX_LRG" description="UPS Large
Moving Box(20 inches x 20 inches x 15 inches)" dimensionUomId="LEN_in"
boxLength="20" boxWidth="20" boxHeight="15"/>
- <ShipmentBoxType shipmentBoxTypeId="UPSBOX_ELRG" description="UPS Extra
Large Moving Box(23 inches x 23 inches x 16 inches)" dimensionUomId="LEN_in"
boxLength="23" boxWidth="23" boxHeight="16"/>
- <ShipmentBoxType shipmentBoxTypeId="UPSBOX_WRDB" description="UPS Wardrobe
Box(18 inches x 18 inches x 22 inches)" dimensionUomId="LEN_in" boxLength="18"
boxWidth="18" boxHeight="22"/>
-
- <CarrierShipmentBoxType shipmentBoxTypeId="UPSBOX_MED" partyId="UPS"/>
- <CarrierShipmentBoxType shipmentBoxTypeId="UPSBOX_LRG" partyId="UPS"/>
- <CarrierShipmentBoxType shipmentBoxTypeId="UPSBOX_ELRG" partyId="UPS"/>
- <CarrierShipmentBoxType shipmentBoxTypeId="UPSBOX_WRDB" partyId="UPS"/>
-
</entity-engine-xml>