Skip to content

Commit

Permalink
Release 2.4.1 - Tranport field issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
nirav-patel-avalara committed Nov 4, 2022
1 parent d3a51b0 commit 3e337b6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Framework/AppInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface AppInterface
/**
* Connector version
*/
const APP_VERSION = '2.4.0';
const APP_VERSION = '2.4.1';
/**
* Avalara APP String
*/
Expand Down
2 changes: 1 addition & 1 deletion Framework/Interaction/Rest/Definitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class Definitions extends \ClassyLlama\AvaTax\Framework\Interaction\Rest
implements \ClassyLlama\AvaTax\Api\RestDefinitionsInterface
{
const PARAMETERS_FILTER = 'id=621';
const PARAMETERS_FILTER = 'name=Transport';
/**
* @var RestConfig
*/
Expand Down
27 changes: 15 additions & 12 deletions Framework/Interaction/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,19 +431,22 @@ protected function convertTaxQuoteDetailsToRequest(
$storeId = $quote->getStoreId();
$serialized_transport = $this->config->getVATTransport($storeId);
$shipping_method = $quote->getShippingAddress()->getShippingMethod();
$config_transports = $this->serialize->unserialize($serialized_transport);
$transport_parameters_value = $this->config::AVATAX_PARAMETERS_TRANSPORT_DEFAULT_VALUE;
if($config_transports && !empty($config_transports))
{
foreach($config_transports as $config_transport)
{
if($shipping_method == $config_transport['transport_shipping'])
{
$transport_parameters_value = $config_transport['transport'];
break;
}
}
}
if($serialized_transport && !empty($serialized_transport))
{
$config_transports = $this->serialize->unserialize($serialized_transport);
if($config_transports && !empty($config_transports))
{
foreach($config_transports as $config_transport)
{
if($shipping_method == $config_transport['transport_shipping'])
{
$transport_parameters_value = $config_transport['transport'];
break;
}
}
}
}
$data = [
'store_id' => $store->getId(),
'commit' => false, // quotes should never be committed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "avalara/avatax-magento",
"type": "magento2-module",
"version": "2.4.0",
"version": "2.4.1",
"license": "OSL-3.0",
"description": "Magento module for Avalara's AvaTax suite of business tax calculation and processing services. Uses the AvaTax REST v2 API.",
"require": {
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This is the recommended installation method as it allows you to easily update th
1. Require the desired version of AvaTax. Latest version can be installed by running following command:

```
composer require avalara/avatax-magento:2.4.0
composer require avalara/avatax-magento:2.4.1
```

2. Setup the AvaTax module in magento
Expand Down

0 comments on commit 3e337b6

Please sign in to comment.