Format oz in the USPS shipping driver to the nearest tenth of an oz. Change the minimum to be 0.1 oz
This commit is contained in:
parent
2c5c2ea5ee
commit
63b797c875
3 changed files with 18 additions and 18 deletions
|
|
@ -73,9 +73,9 @@ sub buildXML {
|
|||
$weight += $itemWeight;
|
||||
}
|
||||
my $pounds = int($weight);
|
||||
my $ounces = int(16 * ($weight - $pounds));
|
||||
if ($pounds == 0 && $ounces == 0 ) {
|
||||
$ounces = 1;
|
||||
my $ounces = sprintf '%3.1f', (16 * ($weight - $pounds));
|
||||
if ($pounds == 0 && $ounces eq '0.0' ) {
|
||||
$ounces = 0.1;
|
||||
}
|
||||
my $destination = $package->[0]->getShippingAddress;
|
||||
my $destZipCode = $destination->get('code');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue