Coupon calculated after VAT


  • Default avatar
    jgodek    
     12 years ago
    0

    Hey there

    I have just updated to the latest free version of the Coupon code.
    I have a system in VMART 1.1.3 where the Tax mode is European (I tried Vendor address too same issue)
    The products include 20% VAT in the Subtotal

    Check box for Subtract payment discount before tax/shipping? is Checked.

    But the coupon is coming off the total after VAT. We want the coupon code to come off the net product price instead of after the VAT is calculated. Any ideas?

    Jeff
  • Your avatar
    seyi    
     12 years ago
    0

    Hello,

    can you give numbers?

    Is this happening on all these screens or just certain ones:
    - shopping cart
    - confirmation page
    - back end order detail

    Did you look at the blog dealing with this issue:
    https://awodev.com/blog/virtuemart-coupon-error-discount-before-tax
  • Default avatar
    jgodek    
     12 years ago
    0

    Yeah I did look at that article and tried it but Im suing VMART 1.1.3 and some code wasnt there.

    here's our cart, coupon is 10% off.

    Subtotal: £4.15
    Coupon Discount: - £0.42
    Total: £3.73
    VAT Total: £0.62

    Strange this is, the end result seems to be correct!


  • Default avatar
    jgodek    
     12 years ago
    0

    Sorry, yeah its on all the checkout pages as well.
  • Your avatar
    seyi    
     12 years ago
    0

    Still not understanding, so this is correct or not?
    This is on all the checkout pages including the confirmation page?
    Is this also the result in the backend when you look at the order details?
    And what is the vat rate?
  • Default avatar
    jgodek    
     12 years ago
    0

    Well its not so simple as working or not.

    It is, I mean the end result is correct but the coupon discount shows on the check out page that the amount is taking off after VAT is added to the product.

    This is on all the checkout pages including the confirmation page?
    Yes it is, all the way through

    Is this also the result in the backend when you look at the order details?
    Yeah its showing the coupon code added after VAT is added.

    And what is the vat rate?
    20%
  • Your avatar
    seyi    
     12 years ago
    0

    I was doing a search for this problem and came across a topic with you. Does the same solution work?
    https://awodev.com/forum/awocoupon/help-section/coupon-incorrect#comment-2188

    This time the ps_coupon_process.php file has been moved to

    www/administrator/components/com_awocoupon/helpers/vm_coupon.php
  • Default avatar
    jgodek    
     12 years ago
    0

    I tried that fix, which did work on that issue.
    But still getting the same result:


    Subtotal: £4.15
    Coupon Discount: - £0.42
    Total: £3.73
    VAT Total: £0.62

    Its so strange, the end result is correct - just the Coupon Discount: - £0.42 is coming off the product after VAT
    The net product price is £3.46.

    So the discount should be £0.35 (it's a 10% discount)
  • Default avatar
    jgodek    
     12 years ago
    0

    Update: the amount is not correct now.
    Very strange. I cant seem to make sense of it as it was working

    New order just came in:
    SubTotal :
    GBP29.52

    Coupon Discount:
    - GBP5.90

    Shipping and Handling Fee :
    GBP3.90

    VAT Total :
    GBP4.59

    Total:
    GBP26.54

    --------------------------------------------------

    what it should be:

    Product: £25.50

    less 20% discount: £5.10

    ----------
    £20.40

    Carriage - £3.25
    ----------

    £23.65

    vat at 20%: £ 4.73

    ---------

    Total order: £28.38



    The customer has been undercharged by £1.84


  • Your avatar
    seyi    
     12 years ago
    0

    Took a look a this and I believe your product starting price is incorrect.

    If your subtotal (including tax) is 29.52, and your vat is 20%, then your product price excluding tax is 29.52/1.2 = 24.60. So, using this new number I get

    subtotal - 24.60
    discount - 4.92
    --------------------------
    19.68

    Shipping - 3.25
    ------------------------
    22.93


    Vat -> 4.586

    Total -> 27.516

    So the customer was undercharged 0.976.

    Using a little math this more or less turns out to be the tax of the coupon 4.92*.2 = 0.984

    I believe this solution deals with taking out the tax from the coupon before calculating the total:
    https://awodev.com/blog/virtuemart-coupon-error-discount-before-tax#solution3
  • Default avatar
    jgodek    
     12 years ago
    0

    Yeah that is what is happening
    But I tried the fix - even downloaded your files. But nothing has changed.
    I guess this doesn't work as we need it. Can you offer a paid development support?
  • Default avatar
    jgodek    
     12 years ago
    0

    OK that fix worked!
    Nevermind, we got it. Only problem is the way it shows the break down but its ok with the client
    Thank you!