From 6222331ffc4c916ab031f823078765bea9ed710b Mon Sep 17 00:00:00 2001 From: Adam Hall Date: Wed, 2 Sep 2020 13:42:30 +0930 Subject: [PATCH 1/2] Fixed support for Oro 4.1 --- composer.json | 3 ++- src/Migrations/Data/ORM/LoadAuTaxTableRatesData.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 70e6ad8..3f4e831 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,7 @@ "homepage": "https://github.com/aligent/orocommerce-australia-bundle", "keywords": ["Oro", "OroCommerce", "Australia", "Tax", "GST"], "license": "OSL-3.0", + "version": "4.1", "authors": [ { "name": "Jim O'Halloran", @@ -13,7 +14,7 @@ ], "require": { "php": ">=7.1", - "oro/commerce": ">=1" + "oro/commerce": ">=4.1.*" }, "autoload": { "psr-4": { "Aligent\\AustraliaBundle\\": "./src/" }, diff --git a/src/Migrations/Data/ORM/LoadAuTaxTableRatesData.php b/src/Migrations/Data/ORM/LoadAuTaxTableRatesData.php index 4539c72..f1c87cb 100644 --- a/src/Migrations/Data/ORM/LoadAuTaxTableRatesData.php +++ b/src/Migrations/Data/ORM/LoadAuTaxTableRatesData.php @@ -91,8 +91,9 @@ private function loadCustomerTaxCodes(ObjectManager $manager, $customerTaxCodes) */ private function loadProductTaxCodes(ObjectManager $manager, $productTaxCodes) { + $org = $this->getAdminUser($manager)->getOrganization(); foreach ($productTaxCodes as $code => $data) { - $taxCode = $this->entitiesFactory->createProductTaxCode($code, $data['description'], $manager, $this); + $taxCode = $this->entitiesFactory->createProductTaxCode($code, $data['description'], $org, $manager, $this); } return $this; From 7fcef8fa86c4affaf1a7a4f6d8a13d7ffe36a2f7 Mon Sep 17 00:00:00 2001 From: Adam Hall Date: Wed, 2 Sep 2020 13:45:36 +0930 Subject: [PATCH 2/2] Fix version constraint --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3f4e831..a89eb82 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=7.1", - "oro/commerce": ">=4.1.*" + "oro/commerce": ">=4.1" }, "autoload": { "psr-4": { "Aligent\\AustraliaBundle\\": "./src/" },