I am working on a site with Merchello and have a problem with discount coupons and tax.
I have a discount coupon which applies a 75% discount.
This discount is taken off the pre-tax price, but not the tax on the full price.
My tax is set to 20%
This is what is currently happening:
Product £40.00 ex tax
Sub Total: £40.00
Discount: (£30.00)
Tax: £8.00 - [20% of £40] (wrong ?)
Total: £18.00 inc Tax
This is what I think should be happening:
Product £40.00 ex tax
Sub Total: £40.00
Discount: (£30.00)
Tax: £2.00 = [ 20% of (£40 - £30) ]
Total: £12.00 inc Tax
Does anyone know of a setting or change I can make to get the behaviour I am after? Or I am misunderstanding how it is supposed to work?
From what you described, I agree does seem like a bug (assuming you are taxing by invoice and not including taxes in the product pricing ... correct). The fix for this will need to be done in the tax provider - which I think will be a really quick tweak as what is probably happening is the discount line items are not being included in the tax calculation.
Okay, having also run into this issue I've been doing some digging - the issue goes somewhat deeper than the taxation task, or even the taxation gateway provider.
On line 50 of the TaxableLineItemVisitor, it tests whether the line item has an extended data item marking it as taxable:
if (!lineItem.ExtendedData.GetTaxableValue()) return;
But discount line items (at least those created by the standard Coupon discounts) do not have this extended data item and so are incorrectly deemed not taxable by the visitor and not included in the tax calculation.
This wasn't fixed in 2.6 even though it seems like a show stopper (surely any store that's apply tax and using coupons is affected by this?). Does that mean that this issue is only triggered by a specific configuration?
As far as I can see no issue was ever opened for this, so I'll create one.
Merchello discount coupon and tax
Hello,
I am working on a site with Merchello and have a problem with discount coupons and tax.
I have a discount coupon which applies a 75% discount. This discount is taken off the pre-tax price, but not the tax on the full price. My tax is set to 20%
This is what is currently happening:
This is what I think should be happening:
Does anyone know of a setting or change I can make to get the behaviour I am after? Or I am misunderstanding how it is supposed to work?
Many thanks, David
Any thoughts?
This seems to be to be really fundamental flaw in the way discounts are applied.
I don't understand why tax would be calculated on the full (un-discounted) amount?
But hopefully I'm being stupid there is an easy way round it.
Hey David,
You can override the tax application by replacing this task with your own version: https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.FastTrack.Ui/App_Plugins/Merchello/config/merchello.config#L161
From what you described, I agree does seem like a bug (assuming you are taxing by invoice and not including taxes in the product pricing ... correct). The fix for this will need to be done in the tax provider - which I think will be a really quick tweak as what is probably happening is the discount line items are not being included in the tax calculation.
We would need to create an issue on http://issues.merchello.com for that.
Hi Rusty,
Thanks a lot for getting back to to me. What I did (before I saw you message) was to override the FixedRateTaxCalculationStrategy as below.
Which got me out of the hole I was in, but didn't feel like I was doing it the right way.
I'll take a look at the way you suggest.
Thanks again for getting back to me, and for Merchello - it is excellent!
Okay, having also run into this issue I've been doing some digging - the issue goes somewhat deeper than the taxation task, or even the taxation gateway provider.
On line 50 of the TaxableLineItemVisitor, it tests whether the line item has an extended data item marking it as taxable:
But discount line items (at least those created by the standard Coupon discounts) do not have this extended data item and so are incorrectly deemed not taxable by the visitor and not included in the tax calculation.
This wasn't fixed in 2.6 even though it seems like a show stopper (surely any store that's apply tax and using coupons is affected by this?). Does that mean that this issue is only triggered by a specific configuration?
As far as I can see no issue was ever opened for this, so I'll create one.
Issue: https://github.com/Merchello/Merchello/issues/2153
FYI For anyone else suffering from this problem, please see my workaround posted on the issue tracker here:
https://github.com/Merchello/Merchello/issues/2153#issuecomment-393848144
is working on a reply...