Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SI: Tax calculation performed in wrong order #91

Closed
WillStrohl opened this issue Feb 21, 2018 · 2 comments
Closed

SI: Tax calculation performed in wrong order #91

WillStrohl opened this issue Feb 21, 2018 · 2 comments
Labels
Milestone

Comments

@WillStrohl
Copy link
Member

WillStrohl commented Feb 21, 2018

In some instances, the tax calculation step is performed in the wrong order, causing the customer to be over-charged for taxes.

Steps to Reproduce:

  1. Clean installation of DNN 07.04.02 with clean installation of Hotcakes 02.00.07 installed. (Also able to be reproduced in Hotcakes 03.01.00.)
  2. Create a shipping method: flat rate per order of $5.95.
  3. Create a tax schedule and set at 6% each for subtotal and shipping for California.
  4. Create a product for $65 that's shippable and assigned to the California tax schedule.
  5. Create a promotion to discount the entire order by 10% if a specific coupon code is entered.
  6. (In a new web browser...)
  7. Add a quantity of 4 the new product to the cart.
  8. In the cart, enter the coupon code for the discount.
  9. In the checkout, enter an address matching the shipping zone.

Expected Behavior:
The tax is $15.96 without a coupon, and it's $14.40 with the coupon since the taxable amount for the line item is lower due to the 10% discount.

... without the coupon
6% of $260 = $15.60
6% of $5.95 = $00.36
Grand Total = $15.96

... with the coupon
6% of $234 = $14.04
6% of $5.95 = $00.36
Grand Total = $14.40

Actual Behavior:
The tax is $15.96 regardless of the coupon.

@WillStrohl WillStrohl added the bug label Feb 21, 2018
@WillStrohl WillStrohl added this to the 03.02.00 milestone Feb 21, 2018
@WillStrohl
Copy link
Member Author

In the case of VAT, it appears that taxes are applied differently:

https://informi.co.uk/articles/how-vat-affected-discounts

The tax is calculated on the price before discount.

WillStrohl pushed a commit that referenced this issue Mar 29, 2018
Tax Calculation after discount get deducted to resolved issue #91
@WillStrohl
Copy link
Member Author

Merged into dev and verified during testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant