Skip to content

Commit

Permalink
Merge pull request #64 from icowan/master
Browse files Browse the repository at this point in the history
只有欧洲国家增加IOSS
  • Loading branch information
icowan authored Feb 28, 2022
2 parents f3d873f + 516224e commit e030ec6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/platforms/CourierbutlerPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ protected function formatOrder(Order $orderClass): array
"invoice_material" => $good->enMaterial,
];
}
$extraService = [];
if (in_array($orderClass->recipient->countryCode, [
"AT", "BE", "BG", "CY", "HR", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE"
])) {
$extraService = [[
"extra_servicecode" => "IO",
"extra_servicevalue" => $orderClass->taxesNumber
]];
}

return [
'reference_no' => $orderClass->customerOrderNo,
Expand Down Expand Up @@ -228,10 +237,7 @@ protected function formatOrder(Order $orderClass): array
// "consignee_tariff" => $orderClass->taxesNumber,
],
"invoice" => $invoice,
"extra_service" => [[
"extra_servicecode" => "IO",
"extra_servicevalue" => $orderClass->taxesNumber
]]
"extra_service" => $extraService,
];
}
}

0 comments on commit e030ec6

Please sign in to comment.