Needs review
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Tax
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2015 at 20:50 UTC
Updated:
23 Jan 2019 at 01:05 UTC
Jump to comment: Most recent
When you have non-product line items (such as shipping or custom fees) in an order and they have inclusive taxes, altering the prices from the order admin UI does not recalculate their taxes (unlike with product line items).
This is because the recalculation function commerce_tax_commerce_line_item_rebase_unit_price() checks that the first component name is "base_price", which is not true for non-product line items even though they too need recalculating.
Attached patch simply removes the check. I can't think of any situation where the check would be needed, myself, is there one?
| Comment | File | Size | Author |
|---|---|---|---|
| tax-non-product-alter-inclusive-taxes.patch | 782 bytes | AnssiH |
Comments
Comment #3
AnssiH commentedHmm, the test works fine locally. The log suggests there was an issue enabling the 'menu' module, which should be entirely unrelated to the patch. Re-marking as Needs review, feel free to tell me if I'm wrong and the failure is real :)
Comment #4
rszrama commentedIt's hard to say. I believe the restriction here is because core Drupal Commerce only knows how to tax product line items, which always do have a base_price component. The solution might rather be to add related support in the other line item type defining modules for rebasing unit prices.
Comment #5
chris matthews commentedThe 3 year old patch to commerce_tax.module applied cleanly to the latest commerce 7.x-1.x-dev, but needs additional reviews.