[Vtigercrm-commits] [vtiger-commits] r10044 - in /vtigercrm/branches/5.0.3/modules: Accounts/Accounts.php Contacts/Contacts.php HelpDesk/HelpDesk.php Invoice/Invoice.php Potentials/Potentials.php PurchaseOrder/PurchaseOrder.php Quotes/Quotes.php SalesOrder/SalesOrder.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Jan 12 02:25:22 EST 2007
Author: richie
Date: Fri Jan 12 00:25:11 2007
New Revision: 10044
Log:
Group name not displayed in inventory history - fixed
Modified:
vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php
vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php
vtigercrm/branches/5.0.3/modules/Invoice/Invoice.php
vtigercrm/branches/5.0.3/modules/Potentials/Potentials.php
vtigercrm/branches/5.0.3/modules/PurchaseOrder/PurchaseOrder.php
vtigercrm/branches/5.0.3/modules/Quotes/Quotes.php
vtigercrm/branches/5.0.3/modules/SalesOrder/SalesOrder.php
Modified: vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/Accounts.php Fri Jan 12 00:25:11 2007
@@ -289,8 +289,7 @@
vtiger_activity.status, vtiger_activity.eventstatus,
vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date,
vtiger_crmentity.modifiedtime, vtiger_crmentity.createdtime,
- vtiger_crmentity.description,
- vtiger_users.user_name
+ vtiger_crmentity.description,case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
FROM vtiger_activity
INNER JOIN vtiger_seactivityrel
ON vtiger_seactivityrel.activityid = vtiger_activity.activityid
@@ -300,8 +299,8 @@
ON vtiger_activitygrouprelation.activityid = vtiger_activity.activityid
LEFT JOIN vtiger_groups
ON vtiger_groups.groupname = vtiger_activitygrouprelation.groupname
- INNER JOIN vtiger_users
- ON vtiger_crmentity.smcreatorid = vtiger_users.id
+ LEFT JOIN vtiger_users
+ ON vtiger_users.id=vtiger_crmentity.smownerid
WHERE (vtiger_activity.activitytype = 'Meeting'
OR vtiger_activity.activitytype = 'Call'
OR vtiger_activity.activitytype = 'Task')
Modified: vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php Fri Jan 12 00:25:11 2007
@@ -397,10 +397,7 @@
{
global $log;
$log->debug("Entering get_history(".$id.") method ...");
- $query = "SELECT vtiger_activity.activityid, vtiger_activity.subject, vtiger_activity.status, vtiger_activity.eventstatus,
- vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date,vtiger_contactdetails.contactid, vtiger_contactdetails.firstname,
- vtiger_contactdetails.lastname, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ $query = "SELECT vtiger_activity.activityid, vtiger_activity.subject, vtiger_activity.status, vtiger_activity.eventstatus,vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date,vtiger_contactdetails.contactid, vtiger_contactdetails.firstname,vtiger_contactdetails.lastname, vtiger_crmentity.modifiedtime,vtiger_crmentity.createdtime, vtiger_crmentity.description, case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid
inner join vtiger_contactdetails on vtiger_contactdetails.contactid= vtiger_cntactivityrel.contactid
@@ -408,7 +405,7 @@
left join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where (vtiger_activity.activitytype = 'Meeting' or vtiger_activity.activitytype='Call' or vtiger_activity.activitytype='Task')
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred' or (vtiger_activity.eventstatus = 'Held' and vtiger_activity.eventstatus != ''))
and vtiger_cntactivityrel.contactid=".$id;
@@ -553,15 +550,9 @@
else
$returnset = '&return_module=Contacts&return_action=CallRelatedList&return_id='.$id;
- $query = 'select vtiger_products.productid, vtiger_products.productname, vtiger_products.productcode, vtiger_products.commissionrate, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_contactdetails.lastname
- FROM vtiger_products
- INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid
- INNER JOIN vtiger_seproductsrel ON vtiger_seproductsrel.productid=vtiger_products.productid
- INNER JOIN vtiger_contactdetails on vtiger_seproductsrel.crmid = vtiger_contactdetails.contactid
- where vtiger_crmentity.deleted = 0 and vtiger_contactdetails.contactid = '.$id;
-
+ $query = 'select vtiger_products.productid, vtiger_products.productname, vtiger_products.productcode, vtiger_products.commissionrate, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_contactdetails.lastname from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid left outer join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_products.contactid where vtiger_contactdetails.contactid = '.$id.' and vtiger_crmentity.deleted = 0';
$log->debug("Exiting get_products method ...");
- return GetRelatedList('Contacts','Products',$focus,$query,$button,$returnset);
+ return GetRelatedList('Contacts','Products',$focus,$query,$button,$returnset);
}
/**
Modified: vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php (original)
+++ vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php Fri Jan 12 00:25:11 2007
@@ -536,16 +536,15 @@
{
global $log;
$log->debug("Entering get_history(".$id.") method ...");
- $query = "SELECT vtiger_activity.activityid, vtiger_activity.subject, vtiger_activity.status, vtiger_activity.eventstatus, vtiger_activity.date_start, vtiger_activity.due_date,
- vtiger_activity.activitytype, vtiger_troubletickets.ticketid, vtiger_troubletickets.title, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ $query = "SELECT vtiger_activity.activityid, vtiger_activity.subject, vtiger_activity.status, vtiger_activity.eventstatus, vtiger_activity.date_start, vtiger_activity.due_date,vtiger_activity.activitytype, vtiger_troubletickets.ticketid, vtiger_troubletickets.title, vtiger_crmentity.modifiedtime,vtiger_crmentity.createdtime, vtiger_crmentity.description,
+case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid= vtiger_activity.activityid
inner join vtiger_troubletickets on vtiger_troubletickets.ticketid = vtiger_seactivityrel.crmid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where (vtiger_activity.activitytype = 'Meeting' or vtiger_activity.activitytype='Call' or vtiger_activity.activitytype='Task')
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred' or (vtiger_activity.eventstatus = 'Held' and vtiger_activity.eventstatus != ''))
and vtiger_seactivityrel.crmid=".$id;
Modified: vtigercrm/branches/5.0.3/modules/Invoice/Invoice.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Invoice/Invoice.php (original)
+++ vtigercrm/branches/5.0.3/modules/Invoice/Invoice.php Fri Jan 12 00:25:11 2007
@@ -194,17 +194,15 @@
{
global $log;
$log->debug("Entering get_history(".$id.") method ...");
- $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,
- vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,vtiger_crmentity.createdtime, vtiger_crmentity.description, case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid
left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
- left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
+ left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where vtiger_activity.activitytype='Task'
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred')
and vtiger_seactivityrel.crmid=".$id;
Modified: vtigercrm/branches/5.0.3/modules/Potentials/Potentials.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Potentials/Potentials.php (original)
+++ vtigercrm/branches/5.0.3/modules/Potentials/Potentials.php Fri Jan 12 00:25:11 2007
@@ -376,13 +376,13 @@
$query = "SELECT vtiger_activity.activityid, vtiger_activity.subject, vtiger_activity.status,
vtiger_activity.eventstatus, vtiger_activity.activitytype,vtiger_activity.date_start,
vtiger_activity.due_date, vtiger_crmentity.modifiedtime, vtiger_crmentity.createdtime,
- vtiger_crmentity.description, vtiger_users.user_name
+ vtiger_crmentity.description,case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where (vtiger_activity.activitytype = 'Meeting' or vtiger_activity.activitytype='Call' or vtiger_activity.activitytype='Task')
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred' or (vtiger_activity.eventstatus = 'Held' and vtiger_activity.eventstatus != ''))
and vtiger_seactivityrel.crmid=".$id;
Modified: vtigercrm/branches/5.0.3/modules/PurchaseOrder/PurchaseOrder.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/PurchaseOrder/PurchaseOrder.php (original)
+++ vtigercrm/branches/5.0.3/modules/PurchaseOrder/PurchaseOrder.php Fri Jan 12 00:25:11 2007
@@ -172,17 +172,15 @@
{
global $log;
$log->debug("Entering get_history(".$id.") method ...");
- $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,
- vtiger_activity.* ,vtiger_seactivityrel.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,vtiger_activity.* ,vtiger_seactivityrel.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_crmentity.createdtime, vtiger_crmentity.description,case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid
left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where vtiger_activity.activitytype='Task'
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred')
and vtiger_seactivityrel.crmid=".$id;
Modified: vtigercrm/branches/5.0.3/modules/Quotes/Quotes.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Quotes/Quotes.php (original)
+++ vtigercrm/branches/5.0.3/modules/Quotes/Quotes.php Fri Jan 12 00:25:11 2007
@@ -217,16 +217,16 @@
vtiger_activity.eventstatus, vtiger_activity.activitytype,vtiger_activity.date_start,
vtiger_activity.due_date, vtiger_contactdetails.contactid,
vtiger_contactdetails.firstname,vtiger_contactdetails.lastname, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ vtiger_crmentity.createdtime, vtiger_crmentity.description, case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid
left join vtiger_contactdetails on vtiger_contactdetails.contactid= vtiger_cntactivityrel.contactid
- inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
- where vtiger_activity.activitytype='Task'
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
+ where vtiger_activity.activitytype='Task'
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred')
and vtiger_seactivityrel.crmid=".$id;
//Don't add order by, because, for security, one more condition will be added with this query in include/RelatedListView.php
Modified: vtigercrm/branches/5.0.3/modules/SalesOrder/SalesOrder.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/SalesOrder/SalesOrder.php (original)
+++ vtigercrm/branches/5.0.3/modules/SalesOrder/SalesOrder.php Fri Jan 12 00:25:11 2007
@@ -189,17 +189,15 @@
{
global $log;
$log->debug("Entering get_history(".$id.") method ...");
- $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,
- vtiger_activity.*, vtiger_seactivityrel.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,
- vtiger_crmentity.createdtime, vtiger_crmentity.description, vtiger_users.user_name
+ $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid,vtiger_activity.*, vtiger_seactivityrel.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_crmentity.createdtime, vtiger_crmentity.description, case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name
from vtiger_activity
inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid
inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid
left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid
left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid
- inner join vtiger_users on vtiger_crmentity.smcreatorid=vtiger_users.id
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
+ left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid
where activitytype='Task'
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred')
and vtiger_seactivityrel.crmid=".$id;
More information about the vtigercrm-commits
mailing list