From b6bdabbb464273348ef82c7a010d432244628f5f Mon Sep 17 00:00:00 2001 From: Nico Fischer Date: Fri, 30 Aug 2024 11:01:48 +0200 Subject: [PATCH 1/5] Update Surcharge.php fix tax_rate in Surcharge --- src/Dto/Surcharge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dto/Surcharge.php b/src/Dto/Surcharge.php index 5b78922..80f06b2 100644 --- a/src/Dto/Surcharge.php +++ b/src/Dto/Surcharge.php @@ -34,7 +34,7 @@ public function __construct(ProductCollectionSurcharge $surcharge) if ($surcharge->hasTax()) { $this->total_tax_amount = (int) round(($surcharge->total_price - $surcharge->tax_free_total_price) * 100); - $this->tax_rate = (int) round(($this->total_tax_amount / $this->total_amount) * 1000); + $this->tax_rate = (int) round(($surcharge->total_price / $surcharge->tax_free_total_price - 1 ) * 10000); } else { $this->tax_rate = 0; $this->total_tax_amount = 0; From 4f580a699e1039cdd43d8813beead16e53884b09 Mon Sep 17 00:00:00 2001 From: Nico Fischer Date: Fri, 30 Aug 2024 11:02:48 +0200 Subject: [PATCH 2/5] Update ShippingOption.php fix tax_amount in ShippingOption Dto --- src/Dto/ShippingOption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dto/ShippingOption.php b/src/Dto/ShippingOption.php index d04da5a..2c23739 100644 --- a/src/Dto/ShippingOption.php +++ b/src/Dto/ShippingOption.php @@ -74,6 +74,6 @@ private function addTaxData(IsotopeShipping $shipping) $rate = StringUtil::deserialize($includes->rate, true); $this->tax_rate = (int) round($rate['value'] * 100); - $this->tax_amount = (int) round($includes->calculateAmountIncludedInPrice($this->price) * 100); + $this->tax_amount = (int) round($includes->calculateAmountIncludedInPrice($this->price)); } } From 7dbd085c12773cdcd8f5f281ba3d60ab83f3ef39 Mon Sep 17 00:00:00 2001 From: Nico Fischer Date: Fri, 30 Aug 2024 11:05:01 +0200 Subject: [PATCH 3/5] Update composer.json doctrine/dbal v3 in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5f2c6d8..5e9889a 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "php": ">=7.4", "ext-json": "*", "contao/core-bundle": "^4.9", - "doctrine/dbal": "^2.0", + "doctrine/dbal": "^3.0", "isotope/isotope-core": "^2.6", "symfony/dependency-injection": "^4.4 || ^5.0", "symfony/http-client": "^4.4 || ^5.0", From 1ab82944076f2fa90681bd51342022107cfcdf4a Mon Sep 17 00:00:00 2001 From: Nico Fischer Date: Fri, 30 Aug 2024 14:21:01 +0200 Subject: [PATCH 4/5] Update tl_iso_config.php extend password length, because of new passwords around 180 chars long --- src/Resources/contao/dca/tl_iso_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/contao/dca/tl_iso_config.php b/src/Resources/contao/dca/tl_iso_config.php index 2569268..023ed1e 100644 --- a/src/Resources/contao/dca/tl_iso_config.php +++ b/src/Resources/contao/dca/tl_iso_config.php @@ -49,7 +49,7 @@ 'mandatory' => true, 'tl_class' => 'w50', ], - 'sql' => "varchar(64) NOT NULL default ''", + 'sql' => "varchar(255) NOT NULL default ''", ]; $GLOBALS['TL_DCA']['tl_iso_config']['fields']['klarna_api_test'] = [ From 98b5d37f311751b9ed0b57dad999cf7e4bd11715 Mon Sep 17 00:00:00 2001 From: Nico Fischer Date: Fri, 30 Aug 2024 14:36:41 +0200 Subject: [PATCH 5/5] Update composer.json dbal v2 or v3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5e9889a..6bcc3ff 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "php": ">=7.4", "ext-json": "*", "contao/core-bundle": "^4.9", - "doctrine/dbal": "^3.0", + "doctrine/dbal": "^2.0 || ^3.0", "isotope/isotope-core": "^2.6", "symfony/dependency-injection": "^4.4 || ^5.0", "symfony/http-client": "^4.4 || ^5.0",