[Vtigercrm-commits] [vtiger-commits] r7624 - in /vtigercrm/trunk/modules: Accounts/Account.php Contacts/Contact.php Leads/Lead.php Potentials/Opportunity.php Products/Product.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 28 08:27:48 EDT 2006


Author: saraj
Date: Wed Jun 28 06:27:31 2006
New Revision: 7624

Log:
* Fixed the issues in the export query

Modified:
    vtigercrm/trunk/modules/Accounts/Account.php
    vtigercrm/trunk/modules/Contacts/Contact.php
    vtigercrm/trunk/modules/Leads/Lead.php
    vtigercrm/trunk/modules/Potentials/Opportunity.php
    vtigercrm/trunk/modules/Products/Product.php

Modified: vtigercrm/trunk/modules/Accounts/Account.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/Account.php (original)
+++ vtigercrm/trunk/modules/Accounts/Account.php Wed Jun 28 06:27:31 2006
@@ -590,10 +590,10 @@
 	{
 		global $log;
                 $log->debug("Entering create_export_query(".$order_by.",".$where.") method ...");
-		if($this->checkIfCustomTableExists('accountscf'))
-		{
-
-			$query = $this->constructCustomQueryAddendum('accountscf','Accounts') . "
+		if($this->checkIfCustomTableExists('vtiger_accountscf'))
+		{
+
+			$query = $this->constructCustomQueryAddendum('vtiger_accountscf','Accounts') . "
 				vtiger_account.*,
 					".$this->entity_table.".*,
 				vtiger_accountbillads.city AS billing_city,

Modified: vtigercrm/trunk/modules/Contacts/Contact.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.php (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.php Wed Jun 28 06:27:31 2006
@@ -513,9 +513,9 @@
         {
 		global $log;
 		$log->debug("Entering create_export_query(".$order_by.",".$where.") method ...");
-		if($this->checkIfCustomTableExists('contactscf'))
+		if($this->checkIfCustomTableExists('vtiger_contactscf'))
 		{
-			$query =  $this->constructCustomQueryAddendum('contactscf','Contacts') ."
+			$query =  $this->constructCustomQueryAddendum('vtiger_contactscf','Contacts') ."
                                 vtiger_contactdetails.*, vtiger_contactaddress.*,
                                 vtiger_account.accountname account_name,
                                 vtiger_users.user_name assigned_user_name

Modified: vtigercrm/trunk/modules/Leads/Lead.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.php (original)
+++ vtigercrm/trunk/modules/Leads/Lead.php Wed Jun 28 06:27:31 2006
@@ -125,10 +125,10 @@
 	{
 		global $log;
 		$log->debug("Entering create_export_query(".$order_by.",".$where.") method ...");
-		if($this->checkIfCustomTableExists('leadscf'))
+		if($this->checkIfCustomTableExists('vtiger_leadscf'))
 		{
 
-			$query = $this->constructCustomQueryAddendum('leadscf','Leads') . " 
+			$query = $this->constructCustomQueryAddendum('vtiger_leadscf','Leads') . " 
 			vtiger_leaddetails.*, ".$this->entity_table.".*, vtiger_leadsubdetails.*,vtiger_leadaddress.city city, vtiger_leadaddress.state state,vtiger_leadaddress.code code,vtiger_leadaddress.country country, vtiger_leadaddress.phone phone, vtiger_users.user_name, vtiger_users.status user_status
 				FROM ".$this->entity_table."
 				INNER JOIN vtiger_leaddetails

Modified: vtigercrm/trunk/modules/Potentials/Opportunity.php
==============================================================================
--- vtigercrm/trunk/modules/Potentials/Opportunity.php (original)
+++ vtigercrm/trunk/modules/Potentials/Opportunity.php Wed Jun 28 06:27:31 2006
@@ -167,28 +167,31 @@
 		global $log;
 		$log->debug("Entering create_export_query(".$order_by.",". $where.") method ...");
 
-		if($this->checkIfCustomTableExists('potentialscf'))
-		{
-			$query = $this->constructCustomQueryAddendum('potentialscf','Potentials') ."
+		if($this->checkIfCustomTableExists('vtiger_potentialscf'))
+		{
+			$query = $this->constructCustomQueryAddendum('vtiger_potentialscf','Potentials') ."
 			vtiger_potential.*,
 			vtiger_account.accountname account_name,
 			vtiger_users.user_name assigned_user_name
-					FROM vtiger_potential
-					INNER JOIN vtiger_crmentity
-					ON vtiger_crmentity.crmid=vtiger_potential.potentialid
-					LEFT JOIN vtiger_account on vtiger_potential.accountid=vtiger_account.accountid
-					left join vtiger_potentialscf on vtiger_potentialscf.potentialid=vtiger_potential.potentialid
-					left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id where vtiger_crmentity.deleted=0 ";
+				FROM vtiger_potential
+				INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_potential.potentialid
+				LEFT JOIN vtiger_account on vtiger_potential.accountid=vtiger_account.accountid
+				left join vtiger_potentialscf on vtiger_potentialscf.potentialid=vtiger_potential.potentialid
+				left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id 
+			where vtiger_crmentity.deleted=0 ";
 		}
 		else
 		{
 			$query = "SELECT
 			vtiger_potential.*,
-			vtiger_account.accountname vtiger_account_name,
+			vtiger_account.accountname account_name,
 			vtiger_users.user_name assigned_user_name
-					FROM vtiger_potential inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_potential.potentialid                                LEFT JOIN vtiger_users
-					ON vtiger_crmentity.smownerid=vtiger_users.id
-					LEFT JOIN vtiger_account on vtiger_potential.accountid=vtiger_account.accountid  LEFT JOIN vtiger_potentialscf on vtiger_potentialscf.potentialid=vtiger_potential.potentialid where vtiger_crmentity.deleted=0 ";
+				FROM vtiger_potential 
+				inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_potential.potentialid 
+				LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid=vtiger_users.id
+				LEFT JOIN vtiger_account on vtiger_potential.accountid=vtiger_account.accountid  
+				LEFT JOIN vtiger_potentialscf on vtiger_potentialscf.potentialid=vtiger_potential.potentialid 
+			where vtiger_crmentity.deleted=0 ";
 		}	
 
 		$log->debug("Exiting create_export_query method ...");

Modified: vtigercrm/trunk/modules/Products/Product.php
==============================================================================
--- vtigercrm/trunk/modules/Products/Product.php (original)
+++ vtigercrm/trunk/modules/Products/Product.php Wed Jun 28 06:27:31 2006
@@ -23,9 +23,9 @@
 
 	 // Josh added for importing and exporting -added in patch2
         var $unit_price;
-        var $table_name = "products";
+        var $table_name = "vtiger_products";
         var $object_name = "Product";
-        var $entity_table = "crmentity";
+        var $entity_table = "vtiger_crmentity";
         var $required_fields = Array(
                 'productname'=>1
         );
@@ -440,16 +440,16 @@
 	{
 		global $log;
 		$log->debug("Entering create_export_query(".$order_by.",".$where.") method ...");
-		if($this->checkIfCustomTableExists('productcf'))
+		if($this->checkIfCustomTableExists('vtiger_productcf'))
 		{
 
-		$query = $this->constructCustomQueryAddendum('productcf','Products') ."    
+		$query = $this->constructCustomQueryAddendum('vtiger_productcf','Products') ."    
 			vtiger_products.productid AS productid,
 			vtiger_products.productname AS productname,
 			vtiger_products.productcode AS productcode,
-			vtiger_products.productcategory AS vtiger_productcategory,
-			vtiger_products.manufacturer AS vtiger_manufacturer,
-			vtiger_products.product_description AS product_description,
+			vtiger_products.productcategory AS productcategory,
+			vtiger_products.manufacturer AS manufacturer,
+			vtiger_crmentity.description AS product_description,
 			vtiger_products.qty_per_unit AS qty_per_unit,
 			vtiger_products.unit_price AS unit_price,
 			vtiger_products.weight AS weight,
@@ -462,16 +462,16 @@
 			vtiger_products.discontinued AS discontinued,
 			vtiger_products.sales_start_date AS sales_start_date,
 			vtiger_products.sales_end_date AS sales_end_date,
-			vtiger_products.usageunit AS vtiger_usageunit,
+			vtiger_products.usageunit AS usageunit,
 			vtiger_products.serialno AS serialno,
-			vtiger_products.currency AS vtiger_currency,
+			vtiger_products.currency AS currency,
 			vtiger_products.reorderlevel AS reorderlevel,
 			vtiger_products.website AS website,
-			vtiger_products.taxclass AS vtiger_taxclass,
+			vtiger_products.taxclass AS taxclass,
 			vtiger_products.mfr_part_no AS mfr_part_no,
-			vtiger_products.vendor_part_no AS vtiger_vendor_part_no,
+			vtiger_products.vendor_part_no AS vendor_part_no,
 			vtiger_products.qtyinstock AS qtyinstock,
-			vtiger_products.productsheet AS vtiger_productsheet,
+			vtiger_products.productsheet AS productsheet,
 			vtiger_products.qtyindemand AS qtyindemand
 			FROM ".$this->entity_table."
 			INNER JOIN vtiger_products
@@ -487,9 +487,9 @@
 			$query = "SELECT vtiger_products.productid AS productid,
 			vtiger_products.productname AS productname,
 			vtiger_products.productcode AS productcode,
-			vtiger_products.productcategory AS vtiger_productcategory,
-			vtiger_products.manufacturer AS vtiger_manufacturer,
-			vtiger_products.product_description AS product_description,
+			vtiger_products.productcategory AS productcategory,
+			vtiger_products.manufacturer AS manufacturer,
+			vtiger_crmentity.description AS product_description,
 			vtiger_products.qty_per_unit AS qty_per_unit,
 			vtiger_products.unit_price AS unit_price,
 			vtiger_products.weight AS weight,
@@ -502,16 +502,16 @@
 			vtiger_products.discontinued AS discontinued,
 			vtiger_products.sales_start_date AS sales_start_date,
 			vtiger_products.sales_end_date AS sales_end_date,
-			vtiger_products.usageunit AS vtiger_usageunit,
+			vtiger_products.usageunit AS usageunit,
 			vtiger_products.serialno AS serialno,
 			vtiger_products.currency AS vtiger_currency,
 			vtiger_products.reorderlevel AS reorderlevel,
 			vtiger_products.website AS website,
-			vtiger_products.taxclass AS vtiger_taxclass,
+			vtiger_products.taxclass AS taxclass,
 			vtiger_products.mfr_part_no AS mfr_part_no,
-			vtiger_products.vendor_part_no AS vtiger_vendor_part_no,
+			vtiger_products.vendor_part_no AS vendor_part_no,
 			vtiger_products.qtyinstock AS qtyinstock,
-			vtiger_products.productsheet AS vtiger_productsheet,
+			vtiger_products.productsheet AS productsheet,
 			vtiger_products.qtyindemand AS qtyindemand
 			FROM ".$this->table_name ."
 			INNER JOIN vtiger_crmentity





More information about the vtigercrm-commits mailing list