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
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
-
Accepted Answer
0Hello,
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 Campsmore than a month agoplease, send me access at support@ joomlathat.com and I'll take a look
-
-
Accepted Answer
0NWDecorativePainting 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! -
Accepted Answer
0The 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 Campsmore than a month agook, thanks for clarifying. if you can send me joomla and ftp access I'll take a look at this.
sorry for the trouble...
-
-
Accepted Answer
-
Accepted Answer
0It 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:ercentCurrency($currency));
break;
case "static":
$tax_value = $tax->value ;
$print_tax_value = InvoicesHelper::format($tax->value, $currency);
break;
} -
Accepted Answer
0Germinal 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! -
Accepted Answer
-
Accepted Answer
0The 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! -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
0oh 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)."%";
-
Accepted Answer
0Germinal 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 -
Accepted Answer
-
Accepted Answer
0yes 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?-
vittoriobrunomore than a month agohello, I have just provided you the details via email.
Thanks
-
-
Accepted Answer
0Hi,
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 -
Accepted Answer
0Hello,
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?
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »