wrong coupon amount before tax


  • Default avatar
    maik    
     8 years ago
    0

    Hi

    discount before tax is not working...

    subtotal without tax: 105
    coupon discount 15%: 17 --> this should be 15,75
    tax 8%: 7,15 --> correct calculated with a new subtotal of 89,25
    total: 95,15 --> this should be 96,40

    so if you look the coupon discount of 17 is incl. 8% tax

    I've enabled discount before tax, but there is no difference if I enable or disable this option in awo coupon general settings



    Awo 2.4.0 pro
    VM 3.0.9
    Joomla 3.4.1
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Not producing that error in my tests. How do you have your calculation rules setup?

    Oh and one note, the tax price will display with tax, but the total should be 105*.85*1.08 = 96.39

    Looking more at your numbers. Your total is taxing the coupon twice and subtracting it, I think:

    96.39 - (15.75*.08) = 95.13

    Is this taxbill rule? If so, you need to go to awocoupon->configuration and enable the injection.
  • Default avatar
    maik    
     8 years ago
    0

    Yes, this is a taxbill rule and is configured with 8%.

    Both is enabled, injection mode and discount before tax, but there is no differece if one of this is enabled or disabled.

    Also enabled is Rappenrundung for switzerland, so the total must be 96,40

    No the tax is not twice. The total tax is calculated correct from the correct subtotal, but the coupon is taxed and this should not be with taxbill rules and a coupon with discount before tax.



  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    I am confused. So the total is correct, 96.39?

    The tax is also correct, 7.14?

    Then the discount was calculated correctly.

    In my teets locally, once discount before tax is set, and injection mode is set to yes, the coupon is displayed without tax.

    Have a look at awocoupon->awocoupon->installation check and verify the injection is actually installed.
  • Default avatar
    maik    
     8 years ago
    0

    Hello,

    here we have a problem:

    Warning: Illegal string offset 'pricetotal' in /var/www/vhosts/promo-schweiz.net/hwlve_rl15/administrator/components/com_awocoupon/models/installation.php on line 50

    not installed: file: www/administrator/components/com_virtuemart/helpers/calculationh.php

    installation not possible, file does not exist or not writable, but the file exists and there are default rights, component installation was possible
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Have you made customizations to your calculationh.php?

    It is looking for this line of code:
    <?php
                
    if($this->_cart->cartPrices['billTaxAmount'] < 0){
                    
    $this->_cart->cartPrices['billTaxAmount'] = 0.0;
                }
    ?>


    And trying to add this after:
    <?php
                
    # awocoupon_code ===============================================================
                    
    JPluginHelper::importPlugin('vmcoupon');
                    
    $dispatcher JDispatcher::getInstance();
                    
    $dispatcher->trigger('plgVmUpdateTotals', array(&$this->_cart->cartData, &$this->_cart->cartPrices));
                }
    ?>


    I test the installation my version of virtuemart 3.0.9.4, and it works without problems.

    Try adding it manually
  • Default avatar
    maik    
     8 years ago
    0

    Hello Seyi,

    sorry for the delay, I was I week on hollidays.

    Your code exists in my calculationhelper. Yes there are some customizations. I'm member of the vm developer team and I've written the tax calculation. This is rewritten in the latest vm version and I've included the changes in my 3.0.9 vm version.

    Can you test your component with latest vm version from the vm developer chat? As far as I know you are a member of this chat and so you have access to the latest version.

    And what is with the errors I get on install check of your component?

    Warning: Illegal string offset 'pricetotal' in /var/www/vhosts/promo-schweiz.net/hwlve_rl15/administrator/components/com_awocoupon/models/installation.php on line 50

    and

    Not Installed: File: www/administrator/components/com_virtuemart/helpers/calculationh.php

    the file still exists.

    Today I've installed the latest awo 2.4.1, same problems.

    Best Regards,
    Maik