I am new to drupal and ubercart so forgive me if this is a stupid question but isn't tax supposed to be calculated after a discount is applied?

I have created a role based percentage discount which is working perfectly other than tax is being calculated prior to the discount. If I have a 10% discount on all orders and I order $100 my subtotal excluding taxes is $90 and with a tax rate of 6.85% my total should be $96.17 but instead it is showing as $96.85

Calculate shipping cost
Free shipping on orders over $100: $0.00
Payment method
Subtotal: $100.00
10% discount: -$10.00
Free shipping on orders over $100: $0.00
Subtotal excluding taxes: $90.00
Utah sales tax: $6.85
Total: $96.85

Any ideas?

CommentFileSizeAuthor
#6 ucdiscountsalttaxfix.zip9.04 KBmegachriz

Comments

ryangroe’s picture

Generally stores charge tax on the full amount then apply a discount. I'm not sure if this is because stores want to get a little bit more money or if this is required by tax law. If you'd like to tax on the discounted amount you need to go into the Ubercart tax configuration and tell that module to tax the uc_discount line item. This is a bit counter-intuitive but this tells the tax module to include the -$10 in its totalling, so it taxes $90 and not $100.

cdeniro’s picture

I will check on the tax law but your recommendation changes it to work as I expect it to. Thanks for the quick reply and the great module!

adshill’s picture

Hi there,

This doesn't actually solve the issue when having both taxed and tax free items in your cart. In effect what happens is the entire discount amount is taxed, however this gives an inaccurate tax amount if the discount is both on tax and tax free items.

Is there any way to deal with this? Its quite important to larger stores that feature tax and tax-free items!

Thanks,

Adam

adshill’s picture

Is it possible this module will be made compatible with the tax module and provide discounts on taxed, and non-taxable items in the same order? Possible bounty available depending on the work needed!

Thanks,

Adam

pixelsweatshop’s picture

Stores do NOT generally apply the tax, then provide a discount. They apply the discount and tax the remainder. They do not make more money as the tax is remitted to the government. This module should apply the discount first, then tax the remainder.

megachriz’s picture

StatusFileSize
new9.04 KB

I attempted to made a fix for this in a submodule. This module basically asks the uc_taxes module to recalculate the taxes after the discount is applied. It does so by asking the discount module for the discount for each product. This fix will not work for order based discounts. It may also not work correctly for time based discounts.

Features:
- Calculates taxes based on the discounted product price.
- Adds a price alterer which should be set as the last one in the list.
/admin/store/settings/price-handlers
- Works with product based discounts only (not with order based discounts).
- Integrates with Ubercart VAT module (actually, it undoes some actions of that module).

Important note: Be sure to test this module throughly, before you use it on a production website. Using this module may lead to inaccurate tax amounts when you use other modules that influence taxes (with the exception of uc_vat).

christelle41’s picture

I tried your module but as I have drupal 7, it doesn't seem to work...

christelle41’s picture

In fact, il works !

bruiseviolet’s picture

I'm having the same problem. It's applying the tax on the FREE items. You don't collect sales tax on FREE items, because there is no money transaction/"sale"- it's FREE.

p.s. Just downloaded the 'fix' up above- hoping it works, as we do product discounts =)

bartezz’s picture

@nicoz #5: rather bold statement! If you get your passport out and travel a bit you'll notice that in a lot, if not most, countries shops show prices including VAT and don't add this at checkout. That means discounts are calculated on VAT inclusive prices in these countries. If the discounts would have a price_handler folks would be able to set the order and apply discounts either before or after VAT is applied.

Also see: http://drupal.org/node/476348

leevh’s picture

The fix module posted seems to be working well for me, Hopefully this functionality can be fixed in the module itself... seems pretty necessary. Thanks MegaChriz!

hockey2112’s picture

Could the submodule be modified to work for order based discounts?

matthijs_hofstede’s picture

I have been testing and applying patches quite a lot the last couple off weeks. A lot off cases are solved but there is just one scenario that has not been fixed for the discount module (alt). Hoping someone can fix this, i'm using coupons in the meantime.

  • Discounts
  • Multiple VAT percentages
  • Multiple products in one order with different VAT percentages

When a discount is applied the VAT percentage is calculated on the discount, the module doesn't have the possibility to calculate vat on every discount that has been applied.

For info how this should work see: http://drupal.org/node/476348#comment-5538090

hockey2112’s picture

The fix in #6 does not work at all for me, with any combinations of discount settings.

hockey2112’s picture