Incorrect billTotal


  • Default avatar
    simon82    
     7 days ago
    0

    Hi,


    On Joomla ‎5.4.1 with VirtueMart 4.6.4 11226, VP One Page Checkout 7.35 and AwoCoupon 4.1.0.1

    When applying a coupon the total calculation is incorrect, for example I have a salesPrice of $425 and salesPricePayment of 6.472081218274127, the billTotal comes to 431.4720812182741

    After applying a coupon of 30% created via AwoCoupon, the salesPriceCoupon would be at -127.5 and salesPricePayment at 4.530456852791872 which are correct but the billTotal is 300.0888324873097 when it should be 302.0304568527919

    Applying a 30% coupon created via virtuemart would have the correct billTotal.

    I have tried changing the Tax calculation (Coupons) to both Discount after tax and Discount before tax but neither changes this figure.

    Would you know what other settings that could be affecting this?


    Best regards


  • Your avatar
    seyi    
     7 days ago
    0

    Hello,

    Would need info on how your tax rules are set up and what causes salesPricePayment.
  • Default avatar
    simon82    
     6 days ago  last edited 6 days ago
    0

    Thanks for getting back, the salesPricePayment is the transaction fee via Stripe of 1.5%, as for tax rules, there's a Marge of 15 added to each individual item.

    The billTotal is correct for an older version (Awocoupon 3.6.0.12, VirtueMart 4.0.12 10777)

    For the current version to circumvent the issue commenting out the line

    $this->vmcartPrices['billTotal'] -= ( $orig_sales_price - $this->vmcartPrices['salesPricePayment'] );

    on line 546 in the file  \administrator\components\com_awocoupon\helper\estore\virtuemart\class-awocoupon-helper-estore-virtuemart-discount.php would solve the issue

  • Default avatar
    simon82    
     5 days ago
    0

    Any chance of some assistance on this? On rebuilding a staging version of our system we have determined that the issue appears when simply updating AWO Coupon from 4.0.0.8 and the latest 4.1.0.1. Can we test with releases between these versions (if you have links for download?) or thoroughly check changes log for a clue?
  • Your avatar
    seyi    
     4 days ago
    0

    Hello,

    Your update of the code is fine.  That block of code is not needed as it is taken care of in another section.
  • Default avatar
    simon82    
     a day ago
    0

    Thanks for the update, by any chance would that block be removed in the next update?
  • Your avatar
    seyi    
     16 hours ago
    0

    The next version will be updated.