[Vtigercrm-commits] [vtiger-commits] r9725 - /vtigercrm/branches/5.0.2/modules/SalesOrder/SalesOrder.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Oct 26 12:52:25 EDT 2006


Author: richie
Date: Thu Oct 26 10:52:17 2006
New Revision: 9725

Log:
Added function save_module

Modified:
    vtigercrm/branches/5.0.2/modules/SalesOrder/SalesOrder.php

Modified: vtigercrm/branches/5.0.2/modules/SalesOrder/SalesOrder.php
==============================================================================
--- vtigercrm/branches/5.0.2/modules/SalesOrder/SalesOrder.php (original)
+++ vtigercrm/branches/5.0.2/modules/SalesOrder/SalesOrder.php Thu Oct 26 10:52:17 2006
@@ -106,6 +106,23 @@
 		$this->db = new PearDatabase();
 		$this->column_fields = getColumnFields('SalesOrder');
 	}
+
+	function save_module($module)
+	{
+	
+		//Checking if quote_id is present and updating the quote status
+		if($this->column_fields["quote_id"] != '')
+		{
+        		$qt_id = $this->column_fields["quote_id"];
+        		$query1 = "update vtiger_quotes set quotestage='Accepted' where quoteid=".$qt_id;
+        		$this->db->query($query1);
+		}
+
+		//Based on the total Number of rows we will save the product relationship with this entity
+		saveInventoryProductDetails(&$this, 'SalesOrder');	
+
+		
+	}	
 	
 	/**	Function used to get the sort order for Sales Order listview
 	 *	@return string	$sorder	- first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['SALESORDER_SORT_ORDER'] if this session value is empty then default sort order will be returned. 





More information about the vtigercrm-commits mailing list