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

sales_flat_quote_item.tax_percent set to 0 #286

Open joeldodge79 opened 5 years ago

joeldodge79 commented 5 years ago

https://github.com/onepica/avatax/blob/baac2b0515708bfab3f7abe0406648bd9f3942ea/app/code/community/OnePica/AvaTax/Helper/FixedTax.php#L59

summary: this line should be in_array($taxDetail->getTaxSubTypeId(), $landedCostSubtypes, true)

when $taxDetail->getTaxSubTypeId() returns null (as seems to be the case for most of my GetTax calls) and the config for fixed types is empty string making $landedCostSubtypes have a value of [''] (the default) this line reduces to

return in_array(null, [''])

which is TRUE in php when you leave the default $strict param as false.