[Vtigercrm-commits] [vtiger-commits] r10997 - in /vtigercrm/branches/5.0.3/modules: Products/Products.php Vendors/Vendors.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 23 16:42:07 EDT 2007
Author: richie
Date: Wed May 23 14:41:59 2007
New Revision: 10997
Log:
fix for - contact Related list --> add potentials --->the potential related Account name doesn't display in contact related list, Fixes #3845 -sri
Modified:
vtigercrm/branches/5.0.3/modules/Products/Products.php
vtigercrm/branches/5.0.3/modules/Vendors/Vendors.php
Modified: vtigercrm/branches/5.0.3/modules/Products/Products.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Products/Products.php (original)
+++ vtigercrm/branches/5.0.3/modules/Products/Products.php Wed May 23 14:41:59 2007
@@ -350,7 +350,7 @@
else
$returnset = '&return_module=Products&return_action=CallRelatedList&return_id='.$id;
- $query = "SELECT vtiger_contactdetails.firstname, vtiger_contactdetails.lastname, vtiger_contactdetails.title, vtiger_contactdetails.accountid, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, case when (vtiger_users.user_name not like \"\") then vtiger_users.user_name else vtiger_groups.groupname end as user_name, vtiger_crmentity.smownerid, vtiger_products.productname, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_products.expiry_date
+ $query = "SELECT vtiger_contactdetails.firstname, vtiger_contactdetails.lastname, vtiger_contactdetails.title, vtiger_contactdetails.accountid, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, case when (vtiger_users.user_name not like \"\") then vtiger_users.user_name else vtiger_groups.groupname end as user_name, vtiger_crmentity.smownerid, vtiger_products.productname, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_products.expiry_date,vtiger_account.accountname
FROM vtiger_contactdetails
INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid
INNER JOIN vtiger_seproductsrel ON vtiger_seproductsrel.crmid=vtiger_contactdetails.contactid
@@ -358,6 +358,7 @@
LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid
LEFT JOIN vtiger_contactgrouprelation ON vtiger_contactdetails.contactid = vtiger_contactgrouprelation.contactid
LEFT JOIN vtiger_groups ON vtiger_groups.groupname = vtiger_contactgrouprelation.groupname
+ LEFT JOIN vtiger_account ON vtiger_account.accountid = vtiger_contactdetails.accountid
WHERE vtiger_crmentity.deleted = 0 AND vtiger_products.productid = ".$id;
$log->debug("Exiting get_contacts method ...");
Modified: vtigercrm/branches/5.0.3/modules/Vendors/Vendors.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Vendors/Vendors.php (original)
+++ vtigercrm/branches/5.0.3/modules/Vendors/Vendors.php Wed May 23 14:41:59 2007
@@ -143,7 +143,7 @@
else
$returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
- $query = 'SELECT case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_contactdetails.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_vendorcontactrel.vendorid from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid inner join vtiger_vendorcontactrel on vtiger_vendorcontactrel.contactid=vtiger_contactdetails.contactid left join vtiger_contactgrouprelation on vtiger_contactdetails.contactid=vtiger_contactgrouprelation.contactid left join vtiger_groups on vtiger_groups.groupname=vtiger_contactgrouprelation.groupname left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 and vtiger_vendorcontactrel.vendorid = '.$id;
+ $query = 'SELECT case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_contactdetails.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_vendorcontactrel.vendorid,vtiger_account.accountname from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid inner join vtiger_vendorcontactrel on vtiger_vendorcontactrel.contactid=vtiger_contactdetails.contactid left join vtiger_contactgrouprelation on vtiger_contactdetails.contactid=vtiger_contactgrouprelation.contactid left join vtiger_groups on vtiger_groups.groupname=vtiger_contactgrouprelation.groupname left join vtiger_account on vtiger_account.accountid = vtiger_contactdetails.accountid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 and vtiger_vendorcontactrel.vendorid = '.$id;
$log->debug("Exiting get_contacts method ...");
return GetRelatedList('Vendors','Contacts',$focus,$query,$button,$returnset);
More information about the vtigercrm-commits
mailing list