0
Hi,
in my Virtuemart shop I have only a 22% tax percentage on all products. I also set 22% as "default tax % on items" in "general" tab of IM options.
When I receive an order by a customer, total order price is different between Virtuemart and IM. I noticed that for some products, IM sets 21,98% rather than 22,01% or similar percentages. Is there some "communication" with Virtuemart roundings/calculations?
Could you explain to me how to avoid this? I would like to have always 22.00.

Thanks
Responses (20)
  • Accepted Answer

    Wednesday, December 23 2015, 11:00 AM - #Permalink
    0
    Hello,

    This is due to VirtueMart roundings, indeed. VM calculates taxes and roundings in a special way and that's probably afecting the total rounding, that's why you get 22,01 instead of 22%. I have seen this a couple times before. it should be easy to fix.
    can you send me joomla and FTP access at support@ joomlathat.com so I can take a look?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 23 2015, 12:00 PM - #Permalink
    0
    Hi,
    I found this: in Virtuemart there is "rounding only on video" option in the configuration --> prices: according to its value, I solve a problem but I find another about final total price. I try to explain:
    - case 1: if I unset the option, taxes rounding issue is present: on IM I see 21.98%, 22.01%, but even 22.00% repeated more than once! Furthermore, Virtuemart and IM show two different order totals (difference is just some euro cents);
    - case 2: if I set the option, I do not have the issue: I see always 22% on IM; problem is that both Virtuemart and IM show the same but "wrong" prices due to approximation.

    Let's do a numeric example: an item have a base price of 8.88. Calculating a recharge of 30% means a total of 11.544. Now, provided a 2 decimals rounding on all prices on Virtuemart, if a customer orders 3 items --> in case 1 VM shows 11.54 x 3 = 34.62 while in case 2 VM shows 11.544 x 3 = 34.63. Instead, IM shows always 34.63 in both cases.
    So in case 2 VM and IM prices are equal but "wrong", because user sees subtotal of 11.54 in invoice, that multiplied by 3 gives 34.62. This is just user perception.

    So fixing the tax percentage rounding is actually easy: I just need to set the option mentioned at the beginning. Now the problem has become: how to show "correct" price?

    Let me know if, even after this post, you need the ftp access.

    Regards
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 24 2015, 11:20 AM - #Permalink
    0
    yes I would need FTP access.

    the key here is WHEN the rounding is made (before "multiplying" or after). I think I can work a way around this if you can provide me joomla and FTP.

    also, besides of that, you have the option to work with more decimals in IM. have you tried that?
    • vittoriobruno
      more than a month ago
      hello, I have just provided you the details via email.
      Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 18 2017, 07:54 AM - #Permalink
    0
    I got a question in regards to the tax

    For e.g. I have tax set at 9.5% but for whatever reason it rounds it to 10% for the overall tax.
    I have removed item taxes because they're not being used. Is there an option to make it round 1 decimal point?
    Thank you!
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 18 2017, 11:01 AM - #Permalink
    0
    where do you see this rounding? can you make a screenshot?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 19 2017, 04:43 AM - #Permalink
    0
    Germinal Camps wrote:

    where do you see this rounding? can you make a screenshot?

    here is screenshot of the field. I have it set at 9.5%
    http://prntscr.com/dxhszw

    and the output on the invoice saying 10%:
    http://prntscr.com/dxht8c
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 19 2017, 12:47 PM - #Permalink
    0
    oh I see. You can change this in one line of code.

    are you OK modifying a PHP file?

    it's file /components/com_invoices/views/tmpl/default.php on line 175:

    $print_tax_value = InvoicesHelper::format($tax->value, "", "", 0)."%";


    you can set it to 1 decimal:

    $print_tax_value = InvoicesHelper::format($tax->value, "", "", 1)."%";
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 19 2017, 03:31 PM - #Permalink
    0
    Oh thank you I will try that whenever I get a chance. I thought it was an entry within a database.
    Now when in case of an update, all those small changes will be overwritten?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 19 2017, 04:03 PM - #Permalink
    0
    that worked thank you! the path was just little bit different:
    /components/com_invoices/views/invoice/tmpl
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 19 2017, 06:43 PM - #Permalink
    0
    yes exactly :) sorry, I typed too fast!
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 24 2017, 08:39 AM - #Permalink
    0
    The rounding worked great. Now one little issue I'm facing is that the created taxes are not applying.
    For instance, I have created two different tax zones.
    http://prntscr.com/dzlpim

    When I select either one of them, the percentage no longer automatically fills.
    http://prntscr.com/dzlpdi

    curious what could have caused that.
    Thank you!
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 24 2017, 05:20 PM - #Permalink
    0
    because you're not setting the tax value....

    the value you enter on tax manager is just the DEFAULT value.

    in each invoice you have to specify what specific value they will have. in this case 9,5.

    for new invoices it will fill it up for you automatically. try it.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 25 2017, 07:52 PM - #Permalink
    0
    Germinal Camps wrote:

    because you're not setting the tax value....

    the value you enter on tax manager is just the DEFAULT value.

    in each invoice you have to specify what specific value they will have. in this case 9,5.

    for new invoices it will fill it up for you automatically. try it.


    Oh I see that makes sense. I was wondering how it filled in the first time. It was due to creation of a new invoice.
    Thank you for clarification!
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 28 2018, 07:15 AM - #Permalink
    0
    It looks like in the new version the code has changed, thus rounds decimal points. Could you please point me on how I could prevent rounding taxes?
    Thanks!
    switch($tax->type){
    case "percent":

    if($tax->ordering == 1){ //first group of taxes
    if($tax->calculate_on == 1) $tax_value = ( $tax->value / 100 ) * $subtotal_items_less_discount ;
    else $tax_value = ( $tax->value / 100 ) * $subtotal ;
    }
    else if($tax->ordering == 2){ //second group of taxes
    if($tax->calculate_on == 1) $tax_value = ( $tax->value / 100 ) * $subtotal1_items ;
    else $tax_value = ( $tax->value / 100 ) * $subtotal1 ;
    }
    $print_tax_value = InvoicesHelper::format($tax->value, InvoicesHelper::percentCurrency($currency));
    break;
    case "static":
    $tax_value = $tax->value ;
    $print_tax_value = InvoicesHelper::format($tax->value, $currency);
    break;
    }
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 28 2018, 07:16 AM - #Permalink
    0
    Can't edit post, here's a better sniping
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, July 31 2018, 07:58 PM - #Permalink
    0
    NWDecorativePainting wrote:

    The problem I’m facing is that all of the tax fields using integer rather than double. All taxes (e.g. 8.5%) get rounded to the nearest number (9%).
    Sorry don’t know about php much. At least in database it doesn’t appear that you use int.
    Thanks!


    I sent you creds among other details.
    Thanks!
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 30 2018, 10:21 AM - #Permalink
    0
    sorry, I don't understand the question.. where is that you want to round the taxes?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 30 2018, 01:37 PM - #Permalink
    0
    The problem I’m facing is that all of the tax fields using integer rather than double. All taxes (e.g. 8.5%) get rounded to the nearest number (9%).
    Sorry don’t know about php much. At least in database it doesn’t appear that you use int.
    Thanks!
    • Germinal Camps
      more than a month ago
      ok, thanks for clarifying. if you can send me joomla and ftp access I'll take a look at this.
      sorry for the trouble...
    The reply is currently minimized Show
  • Accepted Answer

    caloute
    caloute
    Offline
    Saturday, September 15 2018, 11:45 PM - #Permalink
    0
    Hello,

    I have the same problem as NWdecorativePainting:
    I am faced with the fact that all tax fields use a whole number rather than double. All taxes (eg 5.5%) are rounded to the nearest number (6%).
    Also, I have no parameters in the control panel: it lacks "decimal point symbol", "Thousands separation symbol".

    Thanking you in advance,

    Kévin
    • Germinal Camps
      more than a month ago
      please, send me access at support@ joomlathat.com and I'll take a look
    The reply is currently minimized Show
  • Accepted Answer

    Anita
    Anita
    Offline
    Friday, August 25 2023, 12:18 PM - #Permalink
    0
    Dear all,
    I've the same problem with hikashop since I had an update to version 4.7.5. of Hikashop business. How can I solve the rounding differences. Screenshots attached.Anita
    The reply is currently minimized Show
Your Reply