--- uc_taxes/uc_taxes.module.orig	2011-07-30 08:00:20.000000000 +1000
+++ uc_taxes/uc_taxes.module	2011-10-06 21:46:08.000000000 +1100
@@ -557,7 +571,19 @@
       $taxable_amount += $other_tax->amount;
     }
   }
-  $amount = $taxable_amount * $tax->rate;
+
+  //
+  // taxable amount
+  //
+  if (variable_get('uc_vat_sell_price_inclusive', FALSE)) {
+    // taxable_amount is INCLUSIVE of tax.
+    // used by uc_vat.
+    $amount = $taxable_amount * (1 - (1 / (1 + $tax->rate)));
+  } else {
+    // taxable_amount is EXCLUSIVE of tax.
+    $amount = $taxable_amount * $tax->rate;
+  }
+
   if ($amount) {
     $line_item = (object)array(
       'id' => $tax->id,
