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.