Incorrect calcluations of discount


  • Default avatar
    mags1892    
     13 years ago
    0

    Ive created a discount voucher for 7%
    the products are 220.22
    tax is 20% = 40.34 ????

    Discount taken off for 7% is 18.50 ?????

    what has happened is it has added 220.22 + 20% = 264.26 -7%

    what SHOULD happen is 220.22 - 7% THEN add 20% tax.

    Anyone know how to solve this?

  • Your avatar
    seyi    
     13 years ago
    0

    you want to use discount before tax option. Caution: there will likely be problems with it and you would have to update your code to get it working correctly. I wrote a blog on it a while ago for virtuemart 1.1.4, but some of it has been fixed:
    https://awodev.com/blog/virtuemart-coupon-error-discount-before-tax
  • Default avatar
    mags1892    
     13 years ago
    0

    Thats already switched on so the calculations are all incorrect.

    Its still taking discount after tax then recalculating the tax amount.
  • Your avatar
    seyi    
     13 years ago
    0

    no sure then. what version of virtuemart and awocoupon are you using?
  • Default avatar
    mags1892    
     13 years ago
    0

    Virtuemart 1.1.8

    AWO Coupon 1.1.10

    Ive noticed some of what u ask to be commented out put has been commented out, but not all in this version.
  • Your avatar
    seyi    
     13 years ago
    0

    just did some testing, I get the same results whether using AwoCoupon or Virtuemart coupon system. It obviously still has problems. At the very least, this solution was not implemented:
    https://awodev.com/blog/virtuemart-coupon-error-discount-before-tax#solution2
  • Default avatar
    mags1892    
     13 years ago
    0

    Used your code and this is working fine.

    SO for everyone else in 1.1.8 virtuemart you still need to implement the code fix.


    Works great now many thanks


    Ken