[Vtigercrm-commits] [vtiger-commits] r10591 - /vtigercrm/branches/5.0.3/include/utils/InventoryUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 9 04:12:27 EDT 2007


Author: richie
Date: Mon Apr  9 02:12:22 2007
New Revision: 10591

Log:
* Moved if condition at first in the loop to avoid retrieve the deleted product id, Fixed #3541

Modified:
    vtigercrm/branches/5.0.3/include/utils/InventoryUtils.php

Modified: vtigercrm/branches/5.0.3/include/utils/InventoryUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/InventoryUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/InventoryUtils.php Mon Apr  9 02:12:22 2007
@@ -496,6 +496,10 @@
 	$prod_seq=1;
 	for($i=1; $i<=$tot_no_prod; $i++)
 	{
+		//if the product is deleted then we should avoid saving the deleted products
+		if($_REQUEST["deleted".$i] == 1)
+			continue;
+
 	        $prod_id = $_REQUEST['hdnProductId'.$i];
 		if(isset($_REQUEST['productDescription'.$i]))
 			$description = $_REQUEST['productDescription'.$i];
@@ -510,10 +514,6 @@
 
 		$comment = addslashes($_REQUEST['comment'.$i]);
 
-		//if the product is deleted then we should avoid saving the deleted products
-		if($_REQUEST["deleted".$i] == 1)
-			continue;
-
 		//we have to update the Product stock for PurchaseOrder if $update_prod_stock is true
 		if($module == 'PurchaseOrder' && $update_prod_stock == 'true')
 		{





More information about the vtigercrm-commits mailing list