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