Issue with negative tax when product is free and order-level discount is applied

Vote:
 

Hello,

I am running into a weird issue with oder form caluclations. The site I am working on has a lot of products that are free, but, they need to be shipped, so, there is a charge for the shipment. I came across an issue today with a test case involving an order-level discount. The coupon was for 1.00 off the total order cost. With a free product where this coupon is applied, the subtotal on the order form is -1.00. What is then happening is that it is calculating tax on the -1.00. The interesting thing is that it subtracts that negative tax amount from the order total, so this is what I am ending up with for the order form totals:

Coupon Discount: $1.00

SubTotal: -$1.00 (Product is Free)

Shiping: $7.25

Tax: -$0.06 (This is based on Illinois sales tax rate of 6.25%)

Total: $6.19 (should be $6.25)

We are using customized workflows on this project, but, I confirmed that the same thing happens with the default Commerce workflows. On this checkout page. I am running CartPrepare before the page loads. It seems to me that if the order total is <= 0.00, it shouldn't be applying any sales tax. am i missing something? any insight into this issue would be greatly appreciated.>

Here are the versions of Commerce and CMS I am running:

 
  
  
  
  
  
  
  
  

Thanks!

John

#154943
Edited, Sep 02, 2016 20:31
Vote:
 
#154945
Sep 02, 2016 21:30
Vote:
 

Hi,

Which promotion system (old/new) are you using? This sounds like a bug to me.

/Q

#154952
Sep 04, 2016 14:36
Vote:
 

Hi Quan,

How do you tell which promotion system is being used? Please let me know.

Thanks!

John

#154993
Sep 06, 2016 15:32
Vote:
 

Hi,

How did you configure the promotion (order-level discount)? Using the new marketing UI, or Commerce Manager?

#154994
Sep 06, 2016 15:35
Vote:
 

Hello,

I set up the promotion and discount through Commerce Manager.

Thanks!

John

#154995
Sep 06, 2016 15:38
Vote:
 

So it's the old promotion system.

Can you post the configuration of the promotion? A screenshot would be nice 

#154996
Sep 06, 2016 15:49
Vote:
 

Hi,

Here you go:

promotion setup

#154997
Edited, Sep 06, 2016 16:00
Vote:
 

In new promotion system we have check to ensure this never happens (one more reason to switch to the new one), but I guess this is missing from the old one.

I'll file a bug for this and we'll see if we can do something about it. But I think a workflow for this is to modify CalculateDiscountActivity.CalculateDiscounts() to set the OrderGroup.SubTotal & OrderForm.SubTotal to 0 if they are < 0.

Regards,

/Q

#154998
Sep 06, 2016 16:12
Vote:
 

Hi John,

As I understand in this case you still want to apply the discount because you said the Total should be $6.25.

Subtotal = $-1;  Shipping cost= $7.25, Tax=0 => Total: -1 + 7.25 = 6.25

But IMO Subtotal should be $0 in as Quan suggested above. So that the Total should be $7.25 (only shipping cost) instead.

Let imagine that if buyer go to store (shipping cost = 0) to pick free item seller might have to pay $1 for them with your approach.

What do you think?

Regards,

Ba

#155471
Sep 19, 2016 9:04
Vote:
 

Hi Ba,

Yes, I agree, I just was not sure if the discount was supposed to be applied to the shipment as well. It doesn't really make sense to give a discount on the shippmemt, unless it was a promotion specifically targeting shipping cost. 

Thanks!

John

#155500
Sep 19, 2016 15:54
Vote:
 

OK, this issue should be resolve in next release (should be Commerce 9.24.0 as usual).

Let check when you get it ;)

/B

#155511
Sep 20, 2016 5:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.