@@ -1404,6 +1404,7 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
1404
1404
* @param \Magento\Framework\DataObject $request
1405
1405
* @return $this|\Magento\Framework\DataObject|boolean
1406
1406
* @deprecated 100.2.3
1407
+ * @see use processAdditionalValidation method instead
1407
1408
*/
1408
1409
public function proccessAdditionalValidation (\Magento \Framework \DataObject $ request )
1409
1410
{
@@ -1580,8 +1581,13 @@ protected function _doRequest()
1580
1581
* Shipment bill to account – required if Shipping PaymentType is other than 'S'
1581
1582
*/
1582
1583
$ nodeBilling ->addChild ('BillingAccountNumber ' , (string )$ this ->getConfigData ('account ' ));
1583
- $ nodeBilling ->addChild ('DutyPaymentType ' , 'S ' );
1584
- $ nodeBilling ->addChild ('DutyAccountNumber ' , (string )$ this ->getConfigData ('account ' ));
1584
+ if ($ this ->isDutiable (
1585
+ $ rawRequest ->getShipperAddressCountryCode (),
1586
+ $ rawRequest ->getRecipientAddressCountryCode ()
1587
+ )) {
1588
+ $ nodeBilling ->addChild ('DutyPaymentType ' , 'S ' );
1589
+ $ nodeBilling ->addChild ('DutyAccountNumber ' , (string )$ this ->getConfigData ('account ' ));
1590
+ }
1585
1591
1586
1592
/** Receiver */
1587
1593
$ nodeConsignee = $ xml ->addChild ('Consignee ' , '' , '' );
@@ -1789,7 +1795,10 @@ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '')
1789
1795
$ contentType = isset ($ package ['params ' ]['container ' ]) ? $ package ['params ' ]['container ' ] : '' ;
1790
1796
$ packageType = $ contentType === self ::DHL_CONTENT_TYPE_NON_DOC ? 'CP ' : 'EE ' ;
1791
1797
$ nodeShipmentDetails ->addChild ('PackageType ' , $ packageType );
1792
- if ($ this ->isDutiable ($ rawRequest ->getOrigCountryId (), $ rawRequest ->getDestCountryId ())) {
1798
+ if ($ this ->isDutiable (
1799
+ $ rawRequest ->getShipperAddressCountryCode (),
1800
+ $ rawRequest ->getRecipientAddressCountryCode ()
1801
+ )) {
1793
1802
$ nodeShipmentDetails ->addChild ('IsDutiable ' , 'Y ' );
1794
1803
}
1795
1804
$ nodeShipmentDetails ->addChild (
@@ -2044,9 +2053,8 @@ protected function _checkDomesticStatus($origCountryCode, $destCountryCode)
2044
2053
2045
2054
$ origCountry = (string )$ this ->getCountryParams ($ origCountryCode )->getData ('name ' );
2046
2055
$ destCountry = (string )$ this ->getCountryParams ($ destCountryCode )->getData ('name ' );
2047
- $ isDomestic = (string )$ this ->getCountryParams ($ destCountryCode )->getData ('domestic ' );
2048
2056
2049
- if (($ origCountry == $ destCountry && $ isDomestic )
2057
+ if (($ origCountry == $ destCountry )
2050
2058
|| (
2051
2059
$ this ->_carrierHelper ->isCountryInEU ($ origCountryCode )
2052
2060
&& $ this ->_carrierHelper ->isCountryInEU ($ destCountryCode )
0 commit comments