wrong tax decimals an rounded on cart and invoice


  • Default avatar
    victor_manuel    
     8 years ago
    0

    on finishing cart taxes give me 5 decimal instead of 2 the default of virtuemart

    and the final price it's right at the fontend

    but in the invoice in backend rouded its makin an not exact final price
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Is this using virtuemart invoice or a commercial extension you are using for invoice?

    So just to better understand the problem, in the cart everything show fine, but in the invoice it does not?
  • Default avatar
    victor_manuel    
     8 years ago
    0

    just virtuemart 1.1.9 invoice system on 1.5 joomla
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    I do not remember virtuemart 1.1.x having an invoice system. Can you give me specifics of how you print an invoice, so I can locate it in a test system?
  • Default avatar
    victor_manuel    
     8 years ago
    0

    sorry for the mistake, it was on the order in backend
    please help with decimals on cart ... only happen when coupons its used
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    So the display of the order details in the backend shows 5 decimal places?

    Looking at the virtuemart code, the totals are automatically rounded to 2 decimal places, so you really should not see 5.

    Or maybe we are not talking about the same place. Is it possible to send a private message with temp admin access and instructions to see the problem?
  • Default avatar
    victor_manuel    
     8 years ago
    0

    not, the problem with 5 decimal occurs on clients cart ... fontend
    only when coupon its aplyed
    the problen on order its that the final price its not the same as in cart
    rouded its more or less .45 € of difference with price on cart
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    I really cannot say where the problem is without having a look at it and possibly debugging it directly.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    i send you a snapshot
    mundoarcoiris.com/snap28-.jpg
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    I do not see anything wrong with the image. You are using discount after tax. Your order total is $108 with a $3 discount, for a total of 105.

    As your have multiple tax in the cart, your tax is:

    105 - (105/1.1) = 9.55
    3 - (3/1.21) = 0.52

    These are also correct in the image.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    realy? can't you see that there are 5 decimals on taxes?
  • Your avatar
    seyi    
     8 years ago
    0

    This is really outside of AwoCoupon. I would think you would get the same rounding weather you are using awocoupon coupons or virtuemart coupons.

    In any case, the tax details are calculated in
    www/administrator/components/com_virtuemart/classes/ps_checkout.php

    function calc_order_tax

    If at the end of the function right before:
    <?php
            
    return( round$order_tax) );
    ?>


    You add something like
    <?php
            
    if(!empty($order_tax_details)) {
                foreach(
    $order_tax_details as $k=>$order_tax_detail$order_tax_details[$k] = $GLOBALS['CURRENCY']->convert$order_tax_detail ) ;
            }
    ?>


    I would think that would solve the problem.

  • Default avatar
    victor_manuel    
     8 years ago
    0

    still not working refresh image sended before
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Sorry to hear that. Cannot really help you without looking directly at it. For that I would need you to send me a private message with temp admin and ftp access.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    this happen on fontend at the display of checkout please give me a solution you can find me on skype and show you the problem
    skype "netme.es"
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Not possible to give you a solution without looking directly at your site files. I would need to debug it directly. This would require you to send me temp ftp and admin access.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    could you please contact me over email at --removed-- and i will send you back the credentials