Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Order
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Jan 2017 at 01:07 UTC
Updated:
19 Sep 2017 at 21:19 UTC
Jump to comment: Most recent
While working with adjustments, and specifically tax adjustments, I realize we need the ability to get an order item's adjusted price, not just the total (unit price * qty). For example, if there are order item adjustments, the unit price will be recorded with qty as the order item total, but the adjusted price will take those order item adjustments into account. Tax calculation, in this case, is concerned with the adjusted price. The order will apply those adjustments in their own adjustment item on the order, but the tax service needs the adjusted price.
Add getTotalAdjustedPrice to OrderItemInterface
Implement getTotalAdjustedPrice as order item total price + adjustments
Comments
Comment #2
steveoliver commentedQuestion: do we also save the adjusted price as a field, or leave it as a runtime getter only?
Comment #3
steveoliver commentedSee https://github.com/drupalcommerce/commerce/pull/598
Comment #4
finneSee my comment on github
Comment #7
bojanz commentedFinally :)