Skip to content

Commit

Permalink
Merge pull request #76 from avadev/release/2.5.1
Browse files Browse the repository at this point in the history
release/2.5.1
  • Loading branch information
avl-asheesh-singh authored Apr 4, 2023
2 parents b45dc37 + 89d3621 commit 7a0317f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 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.5.0';
const APP_VERSION = '2.5.1';
/**
* Avalara APP String
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function aroundSave(AbstractDb $subject, callable $proceed, AbstractModel
$attributeCode
);
}

$tablesToUpdate[$directive['join_reference_table']] = $directive;
$dataToSave = [$directive['join_reference_field'] => $object->getId()];
$fields = [];
Expand Down Expand Up @@ -264,12 +264,18 @@ public function aroundLoad(AbstractDb $subject, callable $proceed, AbstractModel


foreach (array_unique(array_keys($tablesToUpdate)) as $tableName) {
\Magento\Framework\App\ObjectManager::getInstance()
->get('Psr\Log\LoggerInterface')->debug("field:". $tablesToUpdate[$tableName]['join_reference_field']. " value:".$tablesToUpdate[$tableName]['join_reference_field_value']);

$fields = array_merge(...$tableFields[$tableName]);
$select = $subject->getConnection()->select()->from($subject->getTable($tableName))->columns($fields)->where(
$tablesToUpdate[$tableName]['join_reference_field'],
$tablesToUpdate[$tableName]['join_reference_field']. " = ?",
$tablesToUpdate[$tableName]['join_reference_field_value']
);

\Magento\Framework\App\ObjectManager::getInstance()
->get('Psr\Log\LoggerInterface')->debug($select);

$data = $subject->getConnection()->fetchRow($select);
if ($data) {
foreach ($tablesToUpdate[$tableName]['attribute_codes'] as $attributeCode => $fields) {
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.5.0",
"version": "2.5.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.5.0
composer require avalara/avatax-magento:2.5.1
```

2. Setup the AvaTax module in magento
Expand Down

0 comments on commit 7a0317f

Please sign in to comment.