--- C:\xampp\htdocs\bat57\sites\all\modules\ubercart\contrib\uc_multi_stock\uc_multi_stock.module.org.bak	Sat Jun 07 01:17:08 2008
+++ C:\xampp\htdocs\bat57\sites\all\modules\ubercart\contrib\uc_multi_stock\uc_multi_stock.module	Fri Jun 20 22:28:16 2008
@@ -130,7 +130,7 @@
     	if($item['qty']>0){
     		$tmpError = uc_multi_stock_can_buy($product,$sku,$item['qty'],$data['attributes']);
     		if($tmpError) {
-    		 	 $error .= $tmpError . '<br><br>';
+    		 	 $error .= $tmpError . '<br /><br />';
     		}
     	}
     }
@@ -156,7 +156,8 @@
 			return $error;
 
 		// check for buying too many
-		$left = $stock->stock - $stock->threshold;
+		// changed by Al: We sell what is in stock - threshold is just the value where the admin can be informed
+		$left = $stock->stock;
 		$error = uc_multi_stock_not_enough_in_stock($qty,$left,$product,$attributes);
 		if($error) {
 			return $error;
@@ -168,7 +169,8 @@
  * test for product not in stock
  */
 function uc_multi_stock_not_in_stock($stock,$threshold,$product,$attributes){
-	if($stock <= $threshold){
+	// changed by Al: We sell what is in stock - threshold is just the value where the admin can be informed
+    if($stock <= '0'){
 		return theme('uc_multi_stock_out_of_stock_error',$product,$attributes);
 	}
 	return false;
@@ -189,19 +191,19 @@
  */
 function theme_uc_multi_stock_out_of_stock_error($product = null, $attributes){
 	if(is_array($attributes) and count($attributes) > 0){
-		return (t('We’re sorry. The ' . $product->title . ' in your selected size/color combination is out of stock.  Please consider another size/color in this style.'));
+		return (t("We're sorry. The @product in your selected size/color combination is out of stock.  Please consider another size/color in this style.", array('@product' => $product->title)));
 	}
 	else{
-		return (t('We’re sorry. The ' . $product->title .' is out of stock.'));
+    return (t("We're sorry. The @product is out of stock.", array('@product' => $product->title)));
 	}
 }
 
 function theme_uc_multi_stock_too_many_in_order_error($qty = 0,$product = null , $attributes){
 	if(is_array($attributes) and count($attributes) > 0){
-		return (t('We’re sorry.  We have only ' . $qty . ' unit(s) of the ' . $product->title . ' in your selected size/color combination left in stock.  Please try again with fewer units or consider another size/color in this style.'));
+		return (t("We're sorry.  We have only @qty unit(s) of the @product in your selected size/color combination left in stock.  Please try again with fewer units or consider another size/color in this style.", array('@qty' => $qty, '@product' => $product->title)));
 	}
 	else{
-		return (t('We’re sorry. We have only ' . $qty .' unit(s) of the ' . $product->title .' left in stock. Please try again with fewer units.'));
+		return (t("We're sorry. We have only @qty unit(s) of the @product left in stock. Please try again with less units.", array('@qty' => $qty, '@product' => $product->title)));
 	}
 }
 

