Skip to content

Commit f2ae707

Browse files
committed
MAGETWO-71831: Unable to create a shipping label for a shipment with USPS
1 parent 1ae2acf commit f2ae707

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ protected function _formIntlShipmentRequest(\Magento\Framework\DataObject $reque
18141814
}
18151815

18161816
$xml->addChild('GrossPounds', $packagePoundsWeight);
1817-
$xml->addChild('GrossOunces', sprintf('%.2F', $packageOuncesWeight));
1817+
$xml->addChild('GrossOunces', $packageOuncesWeight);
18181818
if ($packageParams->getContentType() == 'OTHER' && $packageParams->getContentTypeOther() != null) {
18191819
$xml->addChild('ContentType', $packageParams->getContentType());
18201820
$xml->addChild('ContentTypeOther ', $packageParams->getContentTypeOther());

app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ public function testFormattingFloatValuesForIntlShipmentRequest()
296296

297297
$request->setRecipientAddressCountryCode('UK');
298298
$formattedValuesRegex = '(<Value>5.00<\/Value>).*';
299-
$formattedValuesRegex .= '(<NetOunces>0.00<\/NetOunces>).*';
300-
$formattedValuesRegex .= '(<GrossOunces>0.00<\/GrossOunces>)';
299+
$formattedValuesRegex .= '(<NetOunces>0.00<\/NetOunces>)';
301300

302301
$this->httpClient->expects($this->exactly(2))
303302
->method('setParameterGet')

0 commit comments

Comments
 (0)