After having talked with Ryan on IRC, we came to the conclusion that we need to add the possibility for taxes on non product line items.
Right now the Tax system is based on the calculation of product sell price event. This work great for product line items where taxes is closely tied to the product, as the Tax can be included in the price displayed.
For all other types of line items, we need to be able to add taxes on the line item itself, which is way we believe that it would be a good idea to separate the two.
The essential plan of action from IRC:
GOOGLETORP: RSZRAMA: But I guess we need a new rules event... might not be as tricky as it could be
RSZRAMA: GOOGLETORP: yeah, I mean, it can fall anywhere between line item type specific hooks / events that and some sort of abstraction of the product pricing module
RSZRAMA: GOOGLETORP: in fact, I wonder if that's all that would really be required... line item types specifying whether or not they should have a "unit price calculation" event
RSZRAMA: GOOGLETORP: we'd just need some way to govern when a line item's unit price should be recalculated, perhaps based on the referenced order status or something ?
Comments
Comment #1
JurgenR CreditAttribution: JurgenR commentedSubscribing
Comment #2
latulipeblanche CreditAttribution: latulipeblanche commented@rszrama and @googletorp,
What is the status of the " tax handling for non product line items "
I know that you are very busy with DC but it would be a good thing when taxes could be calculated over (in my case e.g.) Shipping.
Comment #3
essbee CreditAttribution: essbee commentedI think pushing the tax calculation out of the product sell price event, or at least allowing it to be calculated at other points is also critical for this issue:
http://drupal.org/node/1124414 and the various other issues that were marked as duplicates. Not being able to recalculate accurate totals on changes to prices made outside the cart environment prevents various capabilities - especially at an administrative level.
Comment #4
AdamGerthel CreditAttribution: AdamGerthel commentedSubscribing
Comment #5
guy_schneerson CreditAttribution: guy_schneerson commentedSubscribing
Comment #6
geek-merlinthe issue mentioned in #3 seems to be fixed.
#1124414: Changing a unit price on a non-cart order preserves stale price data
can anyone summarize what this means for this issue?
Comment #7
googletorp CreditAttribution: googletorp commentedI'm marking this as won't fix.
I talked with Ryan again in IRC and we agreed that the module that created new line item types should also handle adding an event for when tax should be calculated. This is done in the commerce shipping module which has been the main case where people wanted this.
Comment #8
dwkitchen CreditAttribution: dwkitchen commentedI have found the details of the change to the Shipping Module here #1243218: Support for tax and is in the current dev version.
Now working out the best way to impliment them.
Comment #9
elax CreditAttribution: elax commentedWhat is the status of this then ? Actually it's "closed (won't fix)", is there a work around then ?
How do we get the TAX calculated on shipping ?
Comment #10
stewart.adam CreditAttribution: stewart.adam commentedAt the moment I do not believe there is a workaround. Unless I've missing something big and misconfigured something, my testing has shown that shipping module's method only seems to apply taxes to product line items.
Please, reconsider the current tax implementation. In my opinion, Ubercart's implementation actually made more sense where taxes applied to line items of specific types and the amount was automatically generated. As it stands, I believe taxes are calculated when the order is last saved (i.e. as the user adds or removes things to their cart, or when an admin last saved an order) and as per this issue there is little control as to where or when they apply.
Requires a rules configuration to apply taxes of a given type to a line item will result in bloating the rules tables as each line item type will need to configure Rules for each tax type necessary. Furthermore, the maintainers of modules that provide line item types now have to attempt to autogenerate rules configurations for tax types in place on the the site (and these types could vary).
I understand the rationale behind why rules was chosen in this case (how *could* a module possibly safely assume which tax types apply to its own line item type? That's up for the site owner to decide) but IMO we either need really good documentation on how this mechanic works and why it is this way, or like in Ubercart we should create a nice UI where we can select when taxes apply where and we can configure Rules in the back-end automatically based on that.
Comment #11
emptyvoid CreditAttribution: emptyvoid commentedCouldn't you just add a new calculation rule to the shipping section?
Event
Calculating a shipping rate
Condition
none
Action
Apply a tax rate to a line item.
Comment #12
stewart.adam CreditAttribution: stewart.adam commentedYes, my post was not commenting on how it was not possible, but rather that the framework is inconvenient (details as to why in the second paragraph).
Comment #13
jon_stewart CreditAttribution: jon_stewart commentedSubscribing.
Looks like moving from Ubercart to Commerce will be a bit of struggle!