diff --git a/uc_taxes.module b/uc_taxes.module index fab79e1..cf8edd4 100644 --- a/uc_taxes.module +++ b/uc_taxes.module @@ -557,7 +557,13 @@ function uc_taxes_apply_tax($order, $tax) { $taxable_amount += $other_tax->amount; } } - $amount = $taxable_amount * $tax->rate; + //$taxable_amount is inclusive of VAT if uc_vat module installed and enabled (due to uc_price alter in uc_vat and as patch #898776-9 was applied to ubercart 6.x-2.6) + if (module_exists('uc_vat')) { + $amount = $taxable_amount - ($taxable_amount / (1 + $tax->rate)); + } + else { + $amount = $taxable_amount * $tax->rate; + } if ($amount) { $line_item = (object)array( 'id' => $tax->id,