Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Tax
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2011 at 19:03 UTC
Updated:
28 Jul 2011 at 13:01 UTC
The only workaround is to enable a VAT tax again (so that the inclusive select form element will show) and then re-save each affected product.
This probably only break existing carts.
Here's what it looks like:

| Comment | File | Size | Author |
|---|---|---|---|
| rfay_screenshot_sony_000.png | 7.32 KB | rfay |
Comments
Comment #1
rszrama commentedI'm going to make this issue a little more generic; what needs to happen is updating or deleting a tax rate should involve a batch recalculation if there are any prices saved including that tax rate.
Comment #2
rszrama commentedWell, I finally implemented a change that had been too long in coming. Instead of calculating the included tax prior to save and storing the actual components, we're now just storing the tax rate name that should be included in the price. The tax is then calculated on load via hook_field_attach_load(), so it's future safe. Tax rates can change, and as long as the field cache is cleared, taxes will be recalculated for all products on load. The only bummer here is that it's not worth it to try and write an update function. Product forms will have to be resubmitted to update to the new data model. This is a rarely used feature, and I know it will be disappointing for those who are using it, but it's just not worth the time and hassle of the crazy batch in an update function. Can't wait to get price components out of that serialized data column...
Commit: http://drupalcode.org/project/commerce.git/commitdiff/dbcbccb
Comment #3
rfayIt would be possible to do a VBO + rule to update all products....
Comment #5
rszrama commentedHmm, if Rules can execute a form. Good thought, though. I did realize after posting last night that while products will have outdated data arrays, at least they'll be outdated with tax included... so the main thing they'll be missing is "future proofness."