[jira] Created: (OFBIZ-2114) Cleanup Weight Handling for USPS RateEstimates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-2114) Cleanup Weight Handling for USPS RateEstimates

Nicolas Malin (Jira)
Cleanup Weight Handling for USPS RateEstimates
----------------------------------------------

                 Key: OFBIZ-2114
                 URL: https://issues.apache.org/jira/browse/OFBIZ-2114
             Project: OFBiz
          Issue Type: Improvement
          Components: ecommerce
    Affects Versions: SVN trunk
         Environment: USPS Rate Estimates
            Reporter: Daniel Kunkel
            Priority: Minor
             Fix For: SVN trunk


It seems the shipping system could handle package weights a little better, especially for packages weighing less than 1 pound.

In USPSServices.java there is a line of code getting the weight:

double packageWeight = isOnePackage ? shippableWeight.doubleValue() : calcPackageWeight(dctx, packageMap, shippableItemInfo, 0);

For a package that is less than a pound, the shippableWeight reported grossly in error, and of course, because it would fit in one package that erroronious value was the one retrieved.

The calcPackageWeight function in USPSServices does a little bit better job of calculating the package weight, especially when a weight conversion is required and may be adaptable for calculating the shippableWeight.



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.