Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

TOPIC: 18,79 % tax?
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: TOPIC: 18,79 % tax?

TOPIC: 18,79 % tax? 12 years, 11 months ago #26029

For those who are experiencing the same issue as reported in this post:
www.artio.net/support-forums/vm-invoice/...er-support/18-79-tax

This might help:
From: forum.virtuemart.net/index.php?topic=78957.0

I dug in and did some debugging. It turns out that even with the new subtraction method of calculating tax, the value that is being sent to paypal for zero tax ends up looking something like this:

5.3290705182E-15

Obviously a very small number. I'm not sure WHY this is happening for a zero, but it is actually a relatively easy fix. You need to put it in two places. The file you need to edit is:

/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php

First search for this line:

Code: [Select]
$taxamt = $amt - $shippingamt - $order_totals['item_total'];


In my file it is around line #1526

Put the following immediately after that line:
Code: [Select]
if ($taxamt < 0.01){
$taxamt = 0.00;
}


Next, search for this line:

Code: [Select]
$taxamt = $amt - $order_totals['item_total'] - $shippingamt;

You'll find it AROUND line# 1640

And again, put this code right after it:
Code: [Select]
if ($taxamt < 0.01){
$taxamt = 0.00;
}


Saver your file and you shouldn't get that tax problem again. Now there might be precision issues. I haven't run into that, but if anyone does, let me know and I'll add a string formatting function in there to take care of that.
The topic has been locked.

Re: TOPIC: 18,79 % tax? 12 years, 11 months ago #26030

Posted this as a pointer to where some of the VM issues lie. not as a resolution to above post.
The topic has been locked.
  • Page:
  • 1
User Login Empty