Coupon applying to tax also, instead of before tax


  • Default avatar
    austin    
     5 months ago
    0

    I have a 10% coupon that supposed to discount the full order of the products and shipping. When it calculates though it is also applying 10% off on the tax. I have it set to calculate the discount before tax in the configuration but it still applies the discount to the tax. Here are my versions and settings:

    Joomla: 3.6.4
    AwoCoupon: 2.5.9.1
    Virtuemart: 3.0.18
    Rupostel One Page Checkout: 2.0.320.041116

    Product unit price & subtotal price at checkout on OPC: priceWithoutTax
    Coupon Price Settings on OPC: salesWithoutTax

    Virtuemart Tax setting for California, US: Tax per product

    Is there a setting I have misconfigured or is there something else causing the issue?
  • Your avatar
    seyi    
     5 months ago
    0

    Hello,

    One thing to note, is that the total discount on a percentage discount before or after tax is the same, what changes is the proportion to tax and the proportion to the products:
    http://awodev.com/blog/virtuemart-coupon-error-discount-before-tax#background

    So what are the actual numbers in the calculation?  If you disable opc does it calculate differently?
  • Default avatar
    austin    
     5 months ago
    0

    Actually after playing with it more and running throug hthe numbers, it appears the total on the order was correct, but the numbers leading up to that were incorrect.

    I changed the tax over to Vat Tax Per Product and it was displaying the correct numbers although the tax calculated number was incorrect when a coupon discount was applied.

    On my test here are the numbers that should be displayed:

    Inital product price - 2395.95

    2156.36 - taxable product after 10%
    2304.86 - subtotal before tax
    188.68 - tax amount of 8.75%
    2493.54 - final

    With the coupon the tax amount was showing as 187.36, as it was calculated as 10% off the tax amount of 2395.95 instead of just showing the tax amount of the discounted product price of 2156.36

    I disabled one page checkout and it still had the same incorrect tax value of 187.36, but the overall order total was correct at 2493.54.
  • Your avatar
    seyi    
     5 months ago
    0

    I do not understand "2304.86 - subtotal before tax", where did that amount come from?
  • Default avatar
    austin    
     5 months ago
    0

    The subtotal included the $165 shipping cost that was also discounted 10%, so $148.50 was added to the discounted product price of $2156.36
  • Your avatar
    seyi    
     5 months ago
    0

    Can you run it without shipping, need to verify it is an issue with just the product and not shipping
  • Default avatar
    austin    
     5 months ago
    0

    Seems that a direct 10% off all products is calculating correctly, so my 10% off the products and shipping seems to be causing the odd calulation. I have the coupon configured as:

    Coupon 1: 10% off all products if any of the certain 4 products are added to the cart
    Coupon 2: 10% off shipping
    Parent Coupon: Setup as auto discount of both coupons only if all apply
  • Your avatar
    seyi    
     5 months ago
    0

    Ok, try injection mode:

    - Go to admin->awocoupon->configuration
    - in the url add "&vmx=1" and load
    - you should now see the option "Use Injection Mode"
    - set it to 'yes' and save
    - go to awocoupon->installation check and verify it is installed

    Then try the coupon again in the front end.
  • Default avatar
    austin    
     5 months ago
    0

    Turning on injection mode changed the calculations to where they are now way off, even on a basic 10% discount coupon.

    Calculations after turning on injection mode:

    Product: $2,395.95
    Shipping: $165.00
    Coupon Discount (10% off product and shipping): $-256.10
    Tax 8.75%: $166.40 (should be about $201.67)
    Total: $2,216.48 (should be about $2,506.52)


    My 10% product coupon had the calculations of (correct):

    Product: $1,295.00
    10% coupon: $-129.50
    Tax 8.75%: $101.98
    Total: $1,267.48

    After Injection Mode (wrong):

    Product: $1,295.00
    10% coupon: $-129.50
    Tax 8.75%: $90.65
    Total: $1,226.65
  • Your avatar
    seyi    
     5 months ago
    0

    Hello,

    No idea, would have to debug it directly.  I can do that if you can send me temp admin and ftp access.