There's a small bug in calculating taxes:
in [FONT="Courier New"]ot_quantity_discount::calculate_deductions()[/FONT] you calculate individual tax group tax deductions, and the total tax deduction.
PHP Code:
$od_amount[$key] = $tod_amount = round((($od_amount['total'] * $tax_rate)) /100, 2) ;
$od_amount['tax'] += $tod_amount;
However, in [FONT="Courier New"]ot_quantity_discount[/FONT] you only update the tax groups, and not the total tax. This causes problems if further order total modules calculate further discount, because they need the base price with [FONT="Courier New"]$order->info['total'] - $order->info['tax'][/FONT], but the latter isn't correct anymore.
The fix is simple:
Add this line:
PHP Code:
$order->info['tax'] = $order->info['tax'] - $od_amount['tax'];
Just around this line:
PHP Code:
$order->info['total'] = $order->info['total'] - $od_amount['total'];
Bookmarks