diff --git a/src/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculator.php b/src/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculator.php index 8f2183a70..e2a38c107 100644 --- a/src/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculator.php +++ b/src/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculator.php @@ -18,7 +18,7 @@ final class PostNLReceiptCodeCalculator extends AbstractPdkOrderOptionCalculator /** * Calculates the receipt code options for PostNL shipments. * When receipt code is enabled: - * - Shipment must be to the Netherlands + * - Shipment must be to the Netherlands or Belgium * - Receipt code will be disabled if age check is active * - Signature and only recipient will be disabled * - Large format will be disabled @@ -33,7 +33,7 @@ public function calculate(): void return; } - if ($this->order->shippingAddress->cc !== CountryCodes::CC_NL) { + if (! in_array($this->order->shippingAddress->cc, [CountryCodes::CC_NL, CountryCodes::CC_BE])) { $shipmentOptions->receiptCode = TriStateService::DISABLED; return; } diff --git a/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php b/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php index 686cb6245..dbdde4119 100644 --- a/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php +++ b/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php @@ -78,10 +78,10 @@ ], ], - 'disables receipt code when shipping to a non-NL country' => [ + 'disables receipt code when shipping to a non-NL or BE country' => [ [ShipmentOptions::RECEIPT_CODE => TriStateService::ENABLED], [ShipmentOptions::RECEIPT_CODE => TriStateService::DISABLED], - 'BE', + 'FR', ], 'disables signature, only recipient, large format and return when receipt code is enabled' => [