# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- uc_discounts.module
+++ uc_discounts.module
@@ -289,28 +289,6 @@
 }
 
  /**
- * Returns the price for a product including Tax, if using uc_vat module
- *
- * @param object $item
- */
-function get_uc_price($item)
-{
-  $price_info = array(
-    'price' => $item->price,
-    'qty' => $item->qty,
-  );
-  $context = array(
-    'type' => 'cart_item',
-    'revision' => 'altered',
-    'subject' => array(
-      'cart_item' => $item,
-      'node' => node_load($item->nid),
-    ),
-  );
-  return uc_price($price_info, $context);
-}
-
-/**
  * Implementation of hook_cart_pane().
  *
  * @see hook_cart_pane()
@@ -1022,7 +1000,7 @@
       }
 
       uc_discounts_add_to_existing_map_number_value($order_product_id_subtotal_map,
-        $nid, get_uc_price($product)
+        $nid, $product->price * $product->qty
       );
       uc_discounts_add_to_existing_map_number_value($order_product_id_quantity_map, $nid, $product->qty);
 
@@ -1033,7 +1011,7 @@
       $a[] = $product;
       $order_product_id_product_array_map[$nid] = $a;
 
-      $order_subtotal += get_uc_price($product);
+      $order_subtotal += $product->price * $product->qty;
     }
     if (is_array($kits) &&  !empty($kits)) {
       foreach ($kits as $kit_id => $value) {
@@ -1531,7 +1509,7 @@
         if (count($discount_product_ids) > 0) {
           $discounted_products_amount = 0;
           foreach ($order_and_discount_products as $product) {
-            $discounted_products_amount += get_uc_price($product);
+            $discounted_products_amount += $product->price * $product->qty;
           }
           $discount->amount = $discounted_products_amount * $discount->discount_amount;
           // Discount the subtotal so far
