onepica / avatax

One Pica Magento extension for sales tax calculation performed by Avatax
http://www.magentocommerce.com/magento-connect/6760.html
29 stars 34 forks source link

add store filter for collection to load correct tax_class_id when called in admin area #269

Open ramzi-attoui opened 6 years ago

ramzi-attoui commented 6 years ago

When multisite architecture is implemented and tax_class_id is set per website. The global tax_class_id is sent to avatax. Added a store filter for both functions OnePica_AvaTax_Model_Service_Avatax_Invoice::invoice() and OnePica_AvaTax_Model_Service_Avatax_Invoice::creditmemo() to set up the correct store_id instead of the admin store.

The bug doesn't appear when estimating tax because the right front store will be set automatically (see Mage_Catalog_Model_Resource_Product_Collection ::_prepareProductLimitationFilters())