Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

TaxCode for invoice/creditmemo API calls only loads from global configuration scope #34

Closed
erikhansen opened this issue Sep 14, 2016 · 0 comments

Comments

@erikhansen
Copy link
Contributor

When an invoice or creditmemo is sent to AvaTax, if the products in those entities has a "Product Tax Class" ("TaxCode", in AvaTax lingo) set at a specific store view that is different than that set at the global configuration scope, the specific store view value will be ignored and the global configuration value will be used. This problem does not exist when tax is being calculated for a cart/quote or order. This could result in a customer being charged a certain tax value during checkout and then the tax value being different when it is submitted to AvaTax via the invoice/creditmemo.

This issue is caused by the fact that the AvaTax extension is currently loading the tax_class_id value by calling $item->getOrderItem()->getProduct() (see \ClassyLlama\AvaTax\Framework\Interaction\Line::convertInvoiceItemToData and \ClassyLlama\AvaTax\Framework\Interaction\Line::convertCreditMemoItemToData). The core Magento code does not load the product using a store ID filter, so the global configuration value is used. This is essentially a bug in the core Magento framework.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant