Skip to content

Commit f39f434

Browse files
committed
#AC-7900:Unable to create Shipping Label for Dutiable shipments in DHL shipping method-Method name updated as per review
1 parent bc17c0f commit f39f434

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ protected function _doRequest()
16611661
$nodeDutiable->addChild('TermsOfTrade', 'DAP');
16621662

16631663
/** Export Declaration */
1664-
$this->getExportDeclaration($xml, $rawRequest);
1664+
$this->addExportDeclaration($xml, $rawRequest);
16651665

16661666
}
16671667
/**
@@ -2195,7 +2195,7 @@ private function getGatewayURL(): string
21952195
* @param RateRequest $rawRequest
21962196
* @return void
21972197
*/
2198-
private function getExportDeclaration($xml, $rawRequest)
2198+
private function addExportDeclaration(\Magento\Shipping\Model\Simplexml\Element $xml, RateRequest $rawRequest): void
21992199
{
22002200
$nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', '');
22012201
$nodeExportDeclaration->addChild(
@@ -2228,7 +2228,7 @@ private function getExportDeclaration($xml, $rawRequest)
22282228
$nodeItemGrossWeight = $nodeExportItem->addChild('GrossWeight');
22292229
$nodeItemGrossWeight->addChild('Weight', $itemData['weight']);
22302230
$nodeItemGrossWeight->addChild('WeightUnit', $itemWeightUnit);
2231-
$nodeExportItem->addChild('ManufactureCountryCode', 'US');
2231+
$nodeExportItem->addChild('ManufactureCountryCode', $rawRequest->getShipperAddressCountryCode());
22322232
}
22332233
}
22342234
}
@@ -2239,7 +2239,7 @@ private function getExportDeclaration($xml, $rawRequest)
22392239
* @param RateRequest $rawRequest
22402240
* @return string
22412241
*/
2242-
private function getInvoiceNumbers($rawRequest)
2242+
private function getInvoiceNumbers(RateRequest $rawRequest): string
22432243
{
22442244
$invoiceNumbers = [];
22452245
$order = $rawRequest->getOrderShipment()->getOrder();

0 commit comments

Comments
 (0)