Forums / Bug Reports / [Done 1.3.9b] One Time Charges Tax Calculation

[Done 1.3.9b] One Time Charges Tax Calculation

Locked

Views: 1,300

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
26 Apr 2010, 8:33 PM
#1
clide avatar

clide

New Zenner

Join Date:
Apr 2010
Posts:
1
Plugin Contributions:
0

[Done 1.3.9b] One Time Charges Tax Calculation

Hi, not sure if it was an issue in 1.3.8 or not, but there is a bug in the tax calculation for items with one time charges in 1.3.9. The total was being calculated correctly with tax being applied to both the item and the one time attribute charges, but line displaying the tax after the subtotal was not including one time charges.

Making the following changes to line 524 of includes\classes\order.php seems to fix it:

Original:

$taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate);

New:

$taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
     +  zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);