taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 29 forks source link

Admin order sync status is incorrect #369

Open rhoerr opened 8 months ago

rhoerr commented 8 months ago

Magento version 2.4.6-p3 TaxJar extension version 2.2.0 (current release)

Viewing an admin order and then going to 'TaxJar Information' should show 'Last synced at {date}' if an order has synced. Instead, it always shows "This order has not been synced to TaxJar."

Steps to reproduce

  1. Have a completed synced order
  2. Go to Admin > Sales > Orders and view the order
  3. See that the Information tab shows "Synced to TaxJar" with a sync date
  4. Click the TaxJar Information tab, and open the Sync Status section
  5. See that it shows "This order has not been synced to TaxJar."

Tech details

The issue is related to https://github.com/taxjar/taxjar-magento2-extension/blob/ece47270a7e6b319031e95529c303c5317797a0a/view/adminhtml/templates/order/view/tab/taxjar/info/sync.phtml#L21

There's no such getFormattedSyncDate method in the block. That causes the template to fail to obtain the sync date, and decide the order is unsynced.

It should be easily fixed by adding getFormattedSyncDate to https://github.com/taxjar/taxjar-magento2-extension/blob/ece47270a7e6b319031e95529c303c5317797a0a/Block/Adminhtml/Order/View/Tab/Taxjar/View/Info/Sync.php .