• Resolved nickfarelli

    (@nickfarelli)


    Hi there,

    searched for hours, but found nothing.

    Wocoommerce thinks our coupon codes contain tax, but they shouldn’t.
    The tax is calculated correctly, only the display of the amount of the coupon is wrong.

    Example:

    Shop displays all product sincluding VAT (19%).

    Users puts an item to the cart, worth 100 €.
    The 100€ already include 19% tax.

    User applies 50% coupon code.

    Has to pay 50 €. Everything good.

    But when i open the order, it does not show 50€ coupon, but 42,02 € coupon.
    This should not be like that.

    But it’s not just this mistake.

    The tax for the whole order is displayed correctly, like the coupon code would not have tax!

    Means:

    Woocommerce shows:
    Order value after coupon = 50
    tax 7,98 (correct)
    coupon 42,02 (wrong!)

    As you can see, this doesn’t make sense. The problem is: The information, that the coupon code is 42,02 and contains tax is sent to our warehouse system. It creates an invoice, with the wrong coupon value and 19% tax for the coupon, instead of the correct coupon value and 0% tax.

    You can find two screenshots here for what i mean:

    View post on imgur.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @nickfarelli The calculation here is actually correct. Taxes are added on to the amount that is actually being charged. Since the prices are entered as tax inclusive and the tax percentage is 19%, the tax is going to be: 15.966386554621849 (not rounded). This makes the price of the product: 84.033613445378151 (not rounded). This means that since the coupon is for 50%, it’s going to be half of that, which is 42.016806722689076, which is then rounded to 42.02.

    The calculation to get the tax, and then the price is:

    
    Tax = Line Price - Line Price / 1.19
    

    This is outlined on this page:
    https://github.com/woocommerce/woocommerce/wiki/How-Taxes-Work-in-WooCommerce#tax-calculations-simplified

    Thread Starter nickfarelli

    (@nickfarelli)

    Hi, thanks for your answer!

    “Taxes are added on to the amount that is actually being charged.”

    Correct until here.

    100 € incl. 15.97 tax
    84,03 without tax

    “This means that since the coupon is for 50%, it’s going to be half of that, which is 42.016806722689076, which is then rounded to 42.02.”

    This is wrong. The coupon is for 50%, and the coupon always goes for the price already including the tax.

    100 € incl. tax
    50 € coupon.

    When you visit a store and they are offering 50% on all shoes and you buy a pair of shoes which usually cost 100 €, then you pay 50 €.

    BUT (AND THIS IS THE IMPORTANT POINT)
    Coupons never include tax. Coupons are no vouchers, they are just a discount.
    So if you make a discount from 50€, it is wrong to think that this 50€ discount contains any tax. It has nothing to do with the 100 € price.

    Let me clarify:

    Woocommerce shows everyhting correct in the CHECKOUT, pls see here:

    View post on imgur.com

    100 €
    50 € coupon (0% tax)
    50 € total, tax is 7.98 €

    CORRECT.

    The problem begins when you lookup the ORDER:
    Now, Woocommerce assumes that the Coupon is 42.02, obviously because Woocommerce thinks that coupons contain tax, which is simply wrong.

    pls see here:

    View post on imgur.com

    I can also speak for my country: Germany, EU.

    I hope that now you understand my problem.

    In the order overview in the backend, the coupon should be shown as 50€ and Woocommerce should pass 0% tax if the order is pulled.

    But Woocomerce does not. It does show the coupon as 42.02 € and then says 19% should be added. Funny is, that the total tax is still 7.98 € So it doesn’t make any sense and contradicts itself.

    Thread Starter nickfarelli

    (@nickfarelli)

    • This reply was modified 4 years, 6 months ago by nickfarelli.
    Kenin

    (@kbassart)

    Automattic Happiness Engineer

    Hi there,

    The first response was correct as the coupon os off the product price not the tax amount. We’re closing this as resolved at this time. If you have any further questions, you can start a new thread.

    • This reply was modified 4 years, 5 months ago by Kenin.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WC applies tax to coupon codes, but doesn’t change’ is closed to new replies.