Skip to content

Commit d13fd1b

Browse files
Kingdutchbojanz
authored andcommitted
Don't compare years greater than as string
The date returned by `format('Y')` should be an integer which would make php change 2015 into an integer but it's a bit weird not to just do that ourselves.
1 parent ed36542 commit d13fd1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/tax/src/Plugin/Commerce/TaxType/EuropeanUnionVat.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function resolveZones(OrderItemInterface $order_item, ProfileInterface
6666
// to Germany needs to have German VAT applied.
6767
$taxable_type = $this->getTaxableType($order_item);
6868
$year = $this->getCalculationDate($order)->format('Y');
69-
$is_digital = $taxable_type == TaxableType::DIGITAL_GOODS && $year >= '2015';
69+
$is_digital = $taxable_type == TaxableType::DIGITAL_GOODS && $year >= 2015;
7070
$resolved_zones = [];
7171
if (empty($store_zones) && !empty($store_registration_zones)) {
7272
// The store is not in the EU but is registered to collect VAT.

0 commit comments

Comments
 (0)