I have a MiscChrg representing non-taxable shipping. It has a TaxCatID for which there is no TaxRate. Sometimes, seemingly at random, OrderHed.TotalTax receives the value that would be calculated if the MiscChrg were taxed at the rate associated with OrderHed.TaxRegionCode.
Thanks for the replies. I broke it down further and found that an integration I wrote recently creates orders that consistently tax the misc charge that shouldn’t be taxable. Orders manually input in the UI are wrong in the same way as my integration. Orders created by an older integration occasionally have the correct tax amount, but usually have a different tax amount that is neither what it should be, nor what it would have been if the shipping were taxed. I suspect that the only problem with our Epicor setup is what Jason identified, and that if I dig into the older integration, I’ll find some stupid hack where it’s trying to override what Epicor is doing and usually getting it even more wrong.