[Vtigercrm-commits] [vtiger development] #138: Huge print during Step 5 of Installation Wizard
vtiger development
vtiger-tickets at vtiger.fosslabs.com
Tue Apr 18 04:56:33 EDT 2006
#138: Huge print during Step 5 of Installation Wizard
-----------------------+----------------------------------------------------
Reporter: gopal | Owner: developer
Type: defect | Status: new
Priority: critical | Milestone: 5.0.0
Component: vtigercrm | Version: 5.0.0
Keywords: |
-----------------------+----------------------------------------------------
I am using Windows XP SP2 with WAMP 1.6 (Apache/2.0.55, PHP 5.1.1, and
MySQL 5.0.17-nt with Zend debug on)
Following message is printed at the end of installation:
Creating Core tables: Tables Successfully created. 'Account and Contact
Reports'), Array('Lead Reports'=>'Lead Reports'), Array('Potential
Reports'=>'Potential Reports'), Array('Activity Reports'=>'Activity
Reports'), Array('HelpDesk Reports'=>'HelpDesk Reports'), Array('Product
Reports'=>'Product Reports'), Array('Quote Reports' =>'Quote Reports'),
Array('PurchaseOrder Reports'=>'PurchaseOrder Reports'), Array('Invoice
Reports'=>'Invoice Reports') ); $reportmodules =
Array(Array('primarymodule'=>'Contacts','secondarymodule'=>'Accounts'),
Array('primarymodule'=>'Contacts','secondarymodule'=>'Accounts'),
Array('primarymodule'=>'Contacts','secondarymodule'=>'Potentials'),
Array('primarymodule'=>'Leads','secondarymodule'=>''),
Array('primarymodule'=>'Leads','secondarymodule'=>''),
Array('primarymodule'=>'Potentials','secondarymodule'=>''),
Array('primarymodule'=>'Potentials','secondarymodule'=>''),
Array('primarymodule'=>'Activities','secondarymodule'=>''),
Array('primarymodule'=>'Activities','secondarymodule'=>''),
Array('primarymodule'=>'HelpDesk','secondarymodule'=>'Products'),
Array('primarymodule'=>'HelpDesk','secondarymodule'=>''),
Array('primarymodule'=>'HelpDesk','secondarymodule'=>''),
Array('primarymodule'=>'Products','secondarymodule'=>''),
Array('primarymodule'=>'Products','secondarymodule'=>'Contacts'),
Array('primarymodule'=>'Quotes','secondarymodule'=>''),
Array('primarymodule'=>'Quotes','secondarymodule'=>''),
Array('primarymodule'=>'PurchaseOrder','secondarymodule'=>'Contacts'),
Array('primarymodule'=>'PurchaseOrder','secondarymodule'=>''),
Array('primarymodule'=>'Invoice','secondarymodule'=>'') ); $selectcolumns
= Array(Array('contactdetails:firstname:Contacts_First_Name:firstname:V',
'contactdetails:lastname:Contacts_Last_Name:lastname:V',
'contactsubdetails:leadsource:Contacts_Lead_Source:leadsource:V',
'accountContacts:accountname:Contacts_Account_Name:account_id:I',
'account:industry:Accounts_industry:industry:V',
'contactdetails:email:Contacts_Email:email:V'),
Array('contactdetails:firstname:Contacts_First_Name:firstname:V',
'contactdetails:lastname:Contacts_Last_Name:lastname:V',
'contactsubdetails:leadsource:Contacts_Lead_Source:leadsource:V',
'accountContacts:accountname:Contacts_Account_Name:account_id:I',
'account:industry:Accounts_industry:industry:V',
'contactdetails:email:Contacts_Email:email:V'),
Array('contactdetails:firstname:Contacts_First_Name:firstname:V',
'contactdetails:lastname:Contacts_Last_Name:lastname:V',
'accountContacts:accountname:Contacts_Account_Name:account_id:I',
'contactdetails:email:Contacts_Email:email:V',
'potential:potentialname:Potentials_Potential_Name:potentialname:V',
'potential:sales_stage:Potentials_Sales_Stage:sales_stage:V'),
Array('leaddetails:firstname:Leads_First_Name:firstname:V',
'leaddetails:lastname:Leads_Last_Name:lastname:V',
'leaddetails:company:Leads_Company:company:V',
'leaddetails:email:Leads_Email:email:V'),
Array('leaddetails:firstname:Leads_First_Name:firstname:V',
'leaddetails:lastname:Leads_Last_Name:lastname:V',
'leaddetails:company:Leads_Company:company:V',
'leaddetails:email:Leads_Email:email:V',
'leaddetails:leadsource:Leads_Lead_Source:leadsource:V'),
Array('potential:potentialname:Potentials_Potential_Name:potentialname:V',
'potential:amount:Potentials_Amount:amount:N',
'potential:potentialtype:Potentials_Type:opportunity_type:V',
'potential:leadsource:Potentials_Lead_Source:leadsource:V',
'potential:sales_stage:Potentials_Sales_Stage:sales_stage:V'),
Array('potential:potentialname:Potentials_Potential_Name:potentialname:V',
'potential:amount:Potentials_Amount:amount:N',
'potential:potentialtype:Potentials_Type:opportunity_type:V',
'potential:leadsource:Potentials_Lead_Source:leadsource:V',
'potential:sales_stage:Potentials_Sales_Stage:sales_stage:V'),
Array('activity:subject:Activities_Subject:subject:V',
'contactdetailsActivities:lastname:Activities_Contact_Name:contact_id:I',
'activity:status:Activities_Status:taskstatus:V',
'activity:priority:Activities_Priority:taskpriority:V',
'usersActivities:user_name:Activities_Assigned_To:assigned_user_id:V'),
Array('activity:subject:Activities_Subject:subject:V',
'contactdetailsActivities:lastname:Activities_Contact_Name:contact_id:I',
'activity:status:Activities_Status:taskstatus:V',
'activity:priority:Activities_Priority:taskpriority:V',
'usersActivities:user_name:Activities_Assigned_To:assigned_user_id:V'),
Array('troubletickets:title:HelpDesk_Title:ticket_title:V',
'troubletickets:status:HelpDesk_Status:ticketstatus:V',
'products:productname:Products_Product_Name:productname:V',
'products:discontinued:Products_Product_Active:discontinued:V',
'products:productcategory:Products_Product_Category:productcategory:V',
'products:manufacturer:Products_Manufacturer:manufacturer:V',
'contactdetailsProducts:lastname:Products_Contact_Name:contact_id:I'),
Array('troubletickets:title:HelpDesk_Title:ticket_title:V',
'troubletickets:priority:HelpDesk_Priority:ticketpriorities:V',
'troubletickets:severity:HelpDesk_Severity:ticketseverities:V',
'troubletickets:status:HelpDesk_Status:ticketstatus:V',
'troubletickets:category:HelpDesk_Category:ticketcategories:V',
'usersHelpDesk:user_name:HelpDesk_Assigned_To:assigned_user_id:V'),
Array('troubletickets:title:HelpDesk_Title:ticket_title:V',
'troubletickets:priority:HelpDesk_Priority:ticketpriorities:V',
'troubletickets:severity:HelpDesk_Severity:ticketseverities:V',
'troubletickets:status:HelpDesk_Status:ticketstatus:V',
'troubletickets:category:HelpDesk_Category:ticketcategories:V',
'usersHelpDesk:user_name:HelpDesk_Assigned_To:assigned_user_id:V'),
Array('products:productname:Products_Product_Name:productname:V',
'products:productcode:Products_Product_Code:productcode:V',
'products:discontinued:Products_Product_Active:discontinued:V',
'products:productcategory:Products_Product_Category:productcategory:V',
'contactdetailsProducts:lastname:Products_Contact_Name:contact_id:I',
'products:website:Products_Website:website:V',
'vendorRel:vendorname:Products_Vendor_Name:vendor_id:I',
'products:mfr_part_no:Products_Mfr_PartNo:mfr_part_no:V'),
Array('products:productname:Products_Product_Name:productname:V',
'products:manufacturer:Products_Manufacturer:manufacturer:V',
'products:productcategory:Products_Product_Category:productcategory:V',
'contactdetails:firstname:Contacts_First_Name:firstname:V',
'contactdetails:lastname:Contacts_Last_Name:lastname:V',
'contactsubdetails:leadsource:Contacts_Lead_Source:leadsource:V'),
Array('quotes:subject:Quotes_Subject:subject:V',
'potentialRel:potentialname:Quotes_Potential_Name:potential_id:I',
'quotes:quotestage:Quotes_Quote_Stage:quotestage:V',
'contactdetailsQuotes:lastname:Quotes_Contact_Name:contact_id:V',
'usersRel1:user_name:Quotes_Inventory_Manager:assigned_user_id1:I',
'accountQuotes:accountname:Quotes_Account_Name:account_id:I'),
Array('quotes:subject:Quotes_Subject:subject:V',
'potentialRel:potentialname:Quotes_Potential_Name:potential_id:I',
'quotes:quotestage:Quotes_Quote_Stage:quotestage:V',
'contactdetailsQuotes:lastname:Quotes_Contact_Name:contact_id:V',
'usersRel1:user_name:Quotes_Inventory_Manager:assigned_user_id1:I',
'accountQuotes:accountname:Quotes_Account_Name:account_id:I',
'quotes:carrier:Quotes_Carrier:carrier:V',
'quotes:shipping:Quotes_Shipping:shipping:V'),
Array('purchaseorder:subject:PurchaseOrder_Subject:subject:V',
'vendorRel:vendorname:PurchaseOrder_Vendor_Name:vendor_id:I',
'purchaseorder:tracking_no:PurchaseOrder_Tracking_Number:tracking_no:V',
'contactdetails:firstname:Contacts_First_Name:firstname:V',
'contactdetails:lastname:Contacts_Last_Name:lastname:V',
'contactsubdetails:leadsource:Contacts_Lead_Source:leadsource:V',
'contactdetails:email:Contacts_Email:email:V'),
Array('purchaseorder:subject:PurchaseOrder_Subject:subject:V',
'vendorRel:vendorname:PurchaseOrder_Vendor_Name:vendor_id:I',
'purchaseorder:requisition_no:PurchaseOrder_Requisition_No:requisition_no:V',
'purchaseorder:tracking_no:PurchaseOrder_Tracking_Number:tracking_no:V',
'contactdetailsPurchaseOrder:lastname:PurchaseOrder_Contact_Name:contact_id:I',
'purchaseorder:carrier:PurchaseOrder_Carrier:carrier:V',
'purchaseorder:salescommission:PurchaseOrder_Sales_Commission:salescommission:N',
'purchaseorder:exciseduty:PurchaseOrder_Excise_Duty:exciseduty:N',
'usersPurchaseOrder:user_name:PurchaseOrder_Assigned_To:assigned_user_id:V'),
Array('invoice:subject:Invoice_Subject:subject:V',
'invoice:salesorderid:Invoice_Sales_Order:salesorder_id:I',
'invoice:customerno:Invoice_Customer_No:customerno:V',
'invoice:notes:Invoice_Notes:notes:V',
'invoice:invoiceterms:Invoice_Invoice_Terms:invoiceterms:V',
'invoice:exciseduty:Invoice_Excise_Duty:exciseduty:N',
'invoice:salescommission:Invoice_Sales_Commission:salescommission:N',
'accountInvoice:accountname:Invoice_Account_Name:account_id:I') );
$reports = Array(Array('reportname'=>'Contacts by Accounts',
'reportfolder'=>'Account and Contact Reports', 'description'=>'Contacts
related to Accounts', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'0'),
Array('reportname'=>'Contacts without Accounts', 'reportfolder'=>'Account
and Contact Reports', 'description'=>'Contacts not related to Accounts',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'1'),
Array('reportname'=>'Contacts by Potentials', 'reportfolder'=>'Account and
Contact Reports', 'description'=>'Contacts related to Potentials',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'2'),
Array('reportname'=>'Lead by Source', 'reportfolder'=>'Lead Reports',
'description'=>'Lead by Source', 'reporttype'=>'summary',
'sortid'=>'0','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Lead Status Report', 'reportfolder'=>'Lead Reports',
'description'=>'Lead Status Report', 'reporttype'=>'summary',
'sortid'=>'1','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Potential Pipeline', 'reportfolder'=>'Potential
Reports', 'description'=>'Potential Pipline', 'reporttype'=>'summary',
'sortid'=>'2','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Closed Potentials', 'reportfolder'=>'Potential
Reports', 'description'=>'Potential that have Won',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'3'),
Array('reportname'=>'Last Month Activities', 'reportfolder'=>'Activity
Reports', 'description'=>'Last Month Activites', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'0','advfilterid'=>''),
Array('reportname'=>'This Month Activities', 'reportfolder'=>'Activity
Reports', 'description'=>'This Month Activites', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'1','advfilterid'=>''),
Array('reportname'=>'Tickets by Products', 'reportfolder'=>'HelpDesk
Reports', 'description'=>'Tickets related to Products',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Tickets by Priority', 'reportfolder'=>'HelpDesk
Reports', 'description'=>'Tickets by Priority', 'reporttype'=>'summary',
'sortid'=>'3','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Open Tickets', 'reportfolder'=>'HelpDesk Reports',
'description'=>'Tickets that are Open', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'4'),
Array('reportname'=>'Product Details', 'reportfolder'=>'Product Reports',
'description'=>'Product Detailed Report', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Products by Contacts', 'reportfolder'=>'Product
Reports', 'description'=>'Products related to Contacts',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Open Quotes', 'reportfolder'=>'Quote Reports',
'description'=>'Quotes that are Open', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>'5'),
Array('reportname'=>'Quotes Detailed Report', 'reportfolder'=>'Quote
Reports', 'description'=>'Quotes detailed report',
'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'PurchaseOrder by Contacts',
'reportfolder'=>'PurchaseOrder Reports', 'description'=>'PurchaseOrder
related to Contacts', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'PurchaseOrder Detailed Report',
'reportfolder'=>'PurchaseOrder Reports', 'description'=>'PurchaseOrder
detailed report', 'reporttype'=>'tabular',
'sortid'=>'','stdfilterid'=>'','advfilterid'=>''),
Array('reportname'=>'Invoice Detailed Report', 'reportfolder'=>'Invoice
Reports', 'description'=>'Invoice detailed report',
'reporttype'=>'tabular', 'sortid'=>'','stdfilterid'=>'','advfilterid'=>'')
); $sortorder = Array( Array(
Array('columnname'=>'leaddetails:leadsource:Leads_Lead_Source:leadsource:V',
'sortorder'=>'Ascending' ) ), Array(
Array('columnname'=>'leaddetails:leadstatus:Leads_Lead_Status:leadstatus:V',
'sortorder'=>'Ascending' ) ), Array(
Array('columnname'=>'potential:sales_stage:Potentials_Sales_Stage:sales_stage:V',
'sortorder'=>'Ascending' ) ), Array(
Array('columnname'=>'troubletickets:priority:HelpDesk_Priority:ticketpriorities:V',
'sortorder'=>'Ascending' ) ) ); $stdfilters =
Array(Array('columnname'=>'crmentityActivities:modifiedtime:Activities_Modified_Time',
'datefilter'=>'lastmonth', 'startdate'=>'2005-05-01', 'enddate'=>'2005-05-
31'),
Array('columnname'=>'crmentityActivities:modifiedtime:Activities_Modified_Time',
'datefilter'=>'thismonth', 'startdate'=>'2005-06-01', 'enddate'=>'2005-06-
30') ); $advfilters = Array( Array(
Array('columnname'=>'accountContacts:accountname:Contacts_Account_Name:account_id:I',
'comparator'=>'n', 'value'=>'' ) ), Array(
Array('columnname'=>'accountContacts:accountname:Contacts_Account_Name:account_id:I',
'comparator'=>'e', 'value'=>'' ) ), Array(
Array('columnname'=>'potential:potentialname:Potentials_Potential_Name:potentialname:V',
'comparator'=>'n', 'value'=>'' ) ), Array(
Array('columnname'=>'potential:sales_stage:Potentials_Sales_Stage:sales_stage:V',
'comparator'=>'e', 'value'=>'Closed Won' ) ), Array(
Array('columnname'=>'troubletickets:status:HelpDesk_Status:ticketstatus:V',
'comparator'=>'n', 'value'=>'Closed' ) ), Array(
Array('columnname'=>'quotes:quotestage:Quotes_Quote_Stage:quotestage:V',
'comparator'=>'n', 'value'=>'Accepted' ),
Array('columnname'=>'quotes:quotestage:Quotes_Quote_Stage:quotestage:V',
'comparator'=>'n', 'value'=>'Rejected' ) ) );
//quotes:quotestage:Quotes_Quote_Stage:quotestage:V foreach($rptfolder as
$key=>$rptarray) { foreach($rptarray as $foldername=>$folderdescription) {
PopulateReportFolder($foldername,$folderdescription);
$reportid[$foldername] = $key+1; } } foreach($reports as $key=>$report) {
$queryid = insertSelectQuery();
insertReports($queryid,$reportid[$report['reportfolder']],$report['reportname'],$report['description'],$report['reporttype']);
insertSelectColumns($queryid,$selectcolumns[$key]);
insertReportModules($queryid,$reportmodules[$key]['primarymodule'],$reportmodules[$key]['secondarymodule']);
if(isset($stdfilters[$report['stdfilterid']])) { $i =
$report['stdfilterid'];
insertStdFilter($queryid,$stdfilters[$i]['columnname'],$stdfilters[$i]['datefilter'],$stdfilters[$i]['startdate'],$stdfilters[$i]['enddate']);
} if(isset($advfilters[$report['advfilterid']])) {
insertAdvFilter($queryid,$advfilters[$report['advfilterid']]); }
if($report['reporttype'] == "summary") {
insertSortColumns($queryid,$sortorder[$report['sortid']]); } } /**
Function to store the foldername and folderdescription to database * This
function accepts the given folder name and description * ans store it in
db as SAVED */ function PopulateReportFolder($fldrname,$fldrdescription) {
global $adb; $sql = "INSERT INTO reportfolder "; $sql .=
"(FOLDERID,FOLDERNAME,DESCRIPTION,STATE) "; $sql .= "VALUES
(null,'".$fldrname."','".$fldrdescription."','SAVED')"; $result =
$adb->query($sql); } /** Function to add an entry in selestquery table *
*/ function insertSelectQuery() { global $adb; $genQueryId =
$adb->getUniqueID("selectquery"); if($genQueryId != "") { $iquerysql =
"insert into selectquery (QUERYID,STARTINDEX,NUMOFOBJECTS) values
(".$genQueryId.",0,0)"; $iquerysqlresult = $adb->query($iquerysql); }
return $genQueryId; } /** Function to store the field names selected for a
report to a database * * */ function
insertSelectColumns($queryid,$columnname) { global $adb; if($queryid !=
"") { for($i=0;$i < count($columnname);$i++) { $icolumnsql = "insert into
selectcolumn (QUERYID,COLUMNINDEX,COLUMNNAME) values
(".$queryid.",".$i.",'".$columnname[$i]."')"; $icolumnsqlresult =
$adb->query($icolumnsql); } } } /** Function to store the report details
to database * This function accepts
queryid,folderid,reportname,description,reporttype * as arguments and
store the informations in report table */ function
insertReports($queryid,$folderid,$reportname,$description,$reporttype) {
global $adb; if($queryid != "") { $ireportsql = "insert into report
(REPORTID,FOLDERID,REPORTNAME,DESCRIPTION,REPORTTYPE,QUERYID,STATE)";
$ireportsql .= " values
(".$queryid.",".$folderid.",'".$reportname."','".$description."','".$reporttype."',".$queryid.",'SAVED')";
$ireportresult = $adb->query($ireportsql); } } /** Function to store the
report modules to database * This function accepts queryid,primary module
and secondary module * as arguments and store the informations in
reportmodules table */ function
insertReportModules($queryid,$primarymodule,$secondarymodule) { global
$adb; if($queryid != "") { $ireportmodulesql = "insert into reportmodules
(REPORTMODULESID,PRIMARYMODULE,SECONDARYMODULES) values
(".$queryid.",'".$primarymodule."','".$secondarymodule."')";
$ireportmoduleresult = $adb->query($ireportmodulesql); } } /** Function to
store the report sortorder to database * This function accepts
queryid,sortlists * as arguments and store the informations sort columns
and * and sortorder in reportsortcol table */ function
insertSortColumns($queryid,$sortlists) { global $adb; if($queryid != "") {
foreach($sortlists as $i=>$sort) { $sort_bysql = "insert into
reportsortcol (SORTCOLID,REPORTID,COLUMNNAME,SORTORDER) values
(".($i+1).",".$queryid.",'".$sort['columnname']."','".$sort['sortorder']."')";
$sort_byresult = $adb->query($sort_bysql); } } } /** Function to store the
report sort date details to database * This function accepts
queryid,filtercolumn,datefilter,startdate,enddate * as arguments and store
the informations in reportdatefilter table */ function
insertStdFilter($queryid,$filtercolumn,$datefilter,$startdate,$enddate) {
global $adb; if($queryid != "") { $ireportmodulesql = "insert into
reportdatefilter
(DATEFILTERID,DATECOLUMNNAME,DATEFILTER,STARTDATE,ENDDATE) values
(".$queryid.",'".$filtercolumn."','".$datefilter."','".$startdate."','".$enddate."')";
$ireportmoduleresult = $adb->query($ireportmodulesql); } } /** Function to
store the report conditions to database * This function accepts
queryid,filters * as arguments and store the informations in relcriteria
table */ function insertAdvFilter($queryid,$filters) { global $adb;
if($queryid != "") { foreach($filters as $i=>$filter) { $irelcriteriasql =
"insert into relcriteria(QUERYID,COLUMNINDEX,COLUMNNAME,COMPARATOR,VALUE)
values
(".$queryid.",".$i.",'".$filter['columnname']."','".$filter['comparator']."','".$filter['value']."')";
$irelcriteriaresult = $adb->query($irelcriteriasql); } } } ?> 'All',
'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Leads','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Hot Leads', 'setdefault'=>'0','setmetrics'=>'1',
'cvmodule'=>'Leads','stdfilterid'=>'','advfilterid'=>'0'),
Array('viewname'=>'This Month Leads', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Leads','stdfilterid'=>'0','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Accounts','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Prospect Accounts',
'setdefault'=>'0','setmetrics'=>'1',
'cvmodule'=>'Accounts','stdfilterid'=>'','advfilterid'=>'1'),
Array('viewname'=>'New This Week', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Accounts','stdfilterid'=>'1','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Contacts','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Contacts Address', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Contacts','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Todays Birthday', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Contacts','stdfilterid'=>'2','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Potentials Won', 'setdefault'=>'0','setmetrics'=>'1',
'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>'2'),
Array('viewname'=>'Prospecting', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>'3'),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Open Tickets', 'setdefault'=>'0','setmetrics'=>'1',
'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>'4'),
Array('viewname'=>'High Prioriy Tickets',
'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>'5'),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'Open Quotes', 'setdefault'=>'0','setmetrics'=>'1',
'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>'6'),
Array('viewname'=>'Rejected Quotes', 'setdefault'=>'0','setmetrics'=>'0',
'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>'7'),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Activities','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Emails','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Invoice','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Notes','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'PriceBooks','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Products','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'PurchaseOrder','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'SalesOrder','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Vendors','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Faq','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Campaigns','stdfilterid'=>'','advfilterid'=>''),
Array('viewname'=>'All', 'setdefault'=>'1','setmetrics'=>'0',
'cvmodule'=>'Webmails','stdfilterid'=>'','advfilterid'=>''), ); $cvcolumns
= Array(Array('leaddetails:lastname:lastname:Leads_Last_Name:V',
'leaddetails:firstname:firstname:Leads_First_Name:V',
'leaddetails:company:company:Leads_Company:V',
'leadaddress:phone:phone:Leads_Phone:V',
'leadsubdetails:website:website:Leads_Website:V',
'leaddetails:email:email:Leads_Email:E',
'crmentity:smownerid:assigned_user_id:Leads_Assigned_To:V'),
Array('leaddetails:firstname:firstname:Leads_First_Name:V',
'leaddetails:lastname:lastname:Leads_Last_Name:V',
'leaddetails:company:company:Leads_Company:V',
'leaddetails:leadsource:leadsource:Leads_Lead_Source:V',
'leadsubdetails:website:website:Leads_Website:V',
'leaddetails:email:email:Leads_Email:E'),
Array('leaddetails:firstname:firstname:Leads_First_Name:V',
'leaddetails:lastname:lastname:Leads_Last_Name:V',
'leaddetails:company:company:Leads_Company:V',
'leaddetails:leadsource:leadsource:Leads_Lead_Source:V',
'leadsubdetails:website:website:Leads_Website:V',
'leaddetails:email:email:Leads_Email:E'),
Array('account:accountname:accountname:Accounts_Account_Name:V',
'accountbillads:city:bill_city:Accounts_City:V',
'account:website:website:Accounts_Website:V',
'account:phone:phone:Accounts_Phone:V',
'crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'),
Array('account:accountname:accountname:Accounts_Account_Name:V',
'account:phone:phone:Accounts_Phone:V',
'account:website:website:Accounts_Website:V',
'account:rating:rating:Accounts_Rating:V',
'crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'),
Array('account:accountname:accountname:Accounts_Account_Name:V',
'account:phone:phone:Accounts_Phone:V',
'account:website:website:Accounts_Website:V',
'accountbillads:city:bill_city:Accounts_City:V',
'crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'),
Array('contactdetails:firstname:firstname:Contacts_First_Name:V',
'contactdetails:lastname:lastname:Contacts_Last_Name:V',
'contactdetails:title:title:Contacts_Title:V',
'contactdetails:accountid:account_id:Contacts_Account_Name:I',
'contactdetails:email:email:Contacts_Email:E',
'contactdetails:phone:phone:Contacts_Office_Phone:V',
'crmentity:smownerid:assigned_user_id:Contacts_Assigned_To:V'),
Array('contactdetails:firstname:firstname:Contacts_First_Name:V',
'contactdetails:lastname:lastname:Contacts_Last_Name:V',
'contactaddress:mailingstreet:mailingstreet:Contacts_Mailing_Street:V',
'contactaddress:mailingcity:mailingcity:Contacts_City:V',
'contactaddress:mailingstate:mailingstate:Contacts_State:V',
'contactaddress:mailingzip:mailingzip:Contacts_Zip:V',
'contactaddress:mailingcountry:mailingcountry:Contacts_Country:V'),
Array('contactdetails:firstname:firstname:Contacts_First_Name:V',
'contactdetails:lastname:lastname:Contacts_Last_Name:V',
'contactdetails:title:title:Contacts_Title:V',
'contactdetails:accountid:account_id:Contacts_Account_Name:I',
'contactdetails:email:email:Contacts_Email:E',
'contactsubdetails:otherphone:otherphone:Contacts_Phone:V',
'crmentity:smownerid:assigned_user_id:Contacts_Assigned_To:V'),
Array('potential:potentialname:potentialname:Potentials_Potential_Name:V',
'potential:accountid:account_id:Potentials_Account_Name:V',
'potential:sales_stage:sales_stage:Potentials_Sales_Stage:V',
'potential:leadsource:leadsource:Potentials_Lead_Source:V',
'potential:closingdate:closingdate:Potentials_Expected_Close_Date:D',
'crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'),
Array('potential:potentialname:potentialname:Potentials_Potential_Name:V',
'potential:accountid:account_id:Potentials_Account_Name:V',
'potential:amount:amount:Potentials_Amount:N',
'potential:closingdate:closingdate:Potentials_Expected_Close_Date:D',
'crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'),
Array('potential:potentialname:potentialname:Potentials_Potential_Name:V',
'potential:accountid:account_id:Potentials_Account_Name:V',
'potential:amount:amount:Potentials_Amount:N',
'potential:leadsource:leadsource:Potentials_Lead_Source:V',
'potential:closingdate:closingdate:Potentials_Expected_Close_Date:D',
'crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'),
Array('crmentity:crmid::HelpDesk_Ticket_ID:I',
'troubletickets:title:ticket_title:HelpDesk_Title:V',
'troubletickets:parent_id:parent_id:HelpDesk_Related_to:I',
'troubletickets:status:ticketstatus:HelpDesk_Status:V',
'troubletickets:priority:ticketpriorities:HelpDesk_Priority:V',
'crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'),
Array('troubletickets:title:ticket_title:HelpDesk_Title:V',
'troubletickets:parent_id:parent_id:HelpDesk_Related_to:I',
'troubletickets:priority:ticketpriorities:HelpDesk_Priority:V',
'troubletickets:product_id:product_id:HelpDesk_Product_Name:I',
'crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'),
Array('troubletickets:title:ticket_title:HelpDesk_Title:V',
'troubletickets:parent_id:parent_id:HelpDesk_Related_to:I',
'troubletickets:status:ticketstatus:HelpDesk_Status:V',
'troubletickets:product_id:product_id:HelpDesk_Product_Name:I',
'crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'),
Array('crmentity:crmid::Quotes_Quote_ID:I',
'quotes:subject:subject:Quotes_Subject:V',
'quotes:quotestage:quotestage:Quotes_Quote_Stage:V',
'quotes:potentialid:potential_id:Quotes_Potential_Name:I',
'quotes:accountid:account_id:Quotes_Account_Name:I',
'quotes:total:hdnGrandTotal:Quotes_Total:I',
'crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'),
Array('quotes:subject:subject:Quotes_Subject:V',
'quotes:quotestage:quotestage:Quotes_Quote_Stage:V',
'quotes:potentialid:potential_id:Quotes_Potential_Name:I',
'quotes:accountid:account_id:Quotes_Account_Name:I',
'quotes:validtill:validtill:Quotes_Valid_Till:D',
'crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'),
Array('quotes:subject:subject:Quotes_Subject:V',
'quotes:potentialid:potential_id:Quotes_Potential_Name:I',
'quotes:accountid:account_id:Quotes_Account_Name:I',
'quotes:validtill:validtill:Quotes_Valid_Till:D',
'crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'),
Array('activity:status:taskstatus:Activities_Status:V',
'activity:activitytype:activitytype:Activities_Type:V',
'activity:subject:subject:Activities_Subject:V',
'cntactivityrel:contactid:contact_id:Activities_Contact_Name:I',
'seactivityrel:crmid:parent_id:Activities_Related_To:V',
'activity:date_start:date_start:Activities_Start_Date:D',
'activity:due_date:due_date:Activities_End_Date:D',
'crmentity:smownerid:assigned_user_id:Activities_Assigned_To:V'),
Array('activity:subject:subject:Emails_Subject:V',
'seactivityrel:crmid:parent_id:Emails_Related_To:I',
'activity:date_start:date_start:Emails_Date_Sent:D',
'crmentity:smownerid:assigned_user_id:Emails_Assigned_To:V'),
Array('crmentity:crmid::Invoice_Invoice_Id:I',
'invoice:subject:subject:Invoice_Subject:V',
'invoice:salesorderid:salesorder_id:Invoice_Sales_Order:I',
'invoice:invoicestatus:invoicestatus:Invoice_Status:V',
'invoice:total:hdnGrandTotal:Invoice_Total:I',
'crmentity:smownerid:assigned_user_id:Invoice_Assigned_To:V'),
Array('notes:title:title:Notes_Title:V',
'notes:contact_id:contact_id:Notes_Contact_Name:I',
'senotesrel:crmid:parent_id:Notes_Related_To:I',
'notes:filename:filename:Notes_File:V',
'crmentity:modifiedtime:modifiedtime:Notes_Modified_Time:V'),
Array('pricebook:bookname:bookname:PriceBooks_Price_Book_Name:V',
'pricebook:active:active:PriceBooks_Active:V'),
Array('products:productname:productname:Products_Product_Name:V',
'products:productcode:productcode:Products_Product_Code:V',
'products:commissionrate:commissionrate:Products_Commission_Rate:V',
'products:qty_per_unit:qty_per_unit:Products_Qty/Unit:V',
'products:unit_price:unit_price:Products_Unit_Price:V'),
Array('crmentity:crmid::PurchaseOrder_Order_Id:I',
'purchaseorder:subject:subject:PurchaseOrder_Subject:V',
'purchaseorder:vendorid:vendor_id:PurchaseOrder_Vendor_Name:I',
'purchaseorder:tracking_no:tracking_no:PurchaseOrder_Tracking_Number:V',
'crmentity:smownerid:assigned_user_id:PurchaseOrder_Assigned_To:V'),
Array('crmentity:crmid::SalesOrder_Order_Id:I',
'salesorder:subject:subject:SalesOrder_Subject:V',
'account:accountid:account_id:SalesOrder_Account_Name:V',
'quotes:quoteid:quote_id:SalesOrder_Quote_Name:I',
'salesorder:total:hdnGrandTotal:SalesOrder_Total:V',
'crmentity:smownerid:assigned_user_id:SalesOrder_Assigned_To:V'),
Array('vendor:vendorname:vendorname:Vendors_Vendor_Name:V',
'vendor:phone:phone:Vendors_Phone:V',
'vendor:email:email:Vendors_Email:E',
'vendor:category:category:Vendors_Category:V'),
Array('faq:id::Faq_FAQ_Id:I', 'faq:question:question:Faq_Question:V',
'faq:category:faqcategories:Faq_Category:V',
'faq:product_id:product_id:Faq_Product_Name:I',
'crmentity:createdtime:createdtime:Faq_Created_Time:D',
'crmentity:modifiedtime:modifiedtime:Faq_Modified_Time:D'), //this
sequence has to be maintained
Array('campaign:campaignname:campaignname:Campaigns_Campaign_Name:V',
'campaign:campaigntype:campaigntype:Campaigns_Campaign_Type:N',
'campaign:campaignstatus:campaignstatus:Campaigns_Campaign_Status:N',
'campaign:expectedrevenue:expectedrevenue:Campaigns_Expected_Revenue:V',
'campaign:closingdate:closingdate:Campaigns_Expected_Close_Date:D',
'crmentity:smownerid:assigned_user_id:Campaigns_Assigned_To:V'),
Array('subject:subject:subject:Subject:V',
'from:fromname:fromname:From:N', 'to:tpname:toname:To:N',
'body:body:body:Body:V'), ); $cvstdfilters =
Array(Array('columnname'=>'crmentity:modifiedtime:modifiedtime:Leads_Modified_Time',
'datefilter'=>'thismonth', 'startdate'=>'2005-06-01', 'enddate'=>'2005-06-
30'),
Array('columnname'=>'crmentity:createdtime:createdtime:Accounts_Created_Time',
'datefilter'=>'thisweek', 'startdate'=>'2005-06-19', 'enddate'=>'2005-06-
25'),
Array('columnname'=>'contactsubdetails:birthday:birthday:Contacts_Birthdate',
'datefilter'=>'today', 'startdate'=>'2005-06-25', 'enddate'=>'2005-06-25')
); $cvadvfilters = Array( Array(
Array('columnname'=>'leaddetails:leadstatus:leadstatus:Leads_Lead_Status:V',
'comparator'=>'e', 'value'=>'Hot' ) ), Array(
Array('columnname'=>'account:account_type:accounttype:Accounts_Type:V',
'comparator'=>'e', 'value'=>'Prospect' ) ), Array(
Array('columnname'=>'potential:sales_stage:sales_stage:Potentials_Sales_Stage:V',
'comparator'=>'e', 'value'=>'Closed Won' ) ), Array(
Array('columnname'=>'potential:sales_s
tage:sales_stage:Potentials_Sales_Stage:V', 'comparator'=>'e',
'value'=>'Prospecting' ) ), Array(
Array('columnname'=>'troubletickets:status:ticketstatus:HelpDesk_Status:V',
'comparator'=>'n', 'value'=>'Closed' ) ), Array(
Array('columnname'=>'troubletickets:priority:ticketpriorities:HelpDesk_Priority:V',
'comparator'=>'e', 'value'=>'High' ) ), Array(
Array('columnname'=>'quotes:quotestage:quotestage:Quotes_Quote_Stage:V',
'comparator'=>'n', 'value'=>'Accepted' ),
Array('columnname'=>'quotes:quotestage:quotestage:Quotes_Quote_Stage:V',
'comparator'=>'n', 'value'=>'Rejected' ) ), Array(
Array('columnname'=>'quotes:quotestage:quotestage:Quotes_Quote_Stage:V',
'comparator'=>'e', 'value'=>'Rejected' ) ) ); foreach($customviews as
$key=>$customview) { $queryid =
insertCustomView($customview['viewname'],$customview['setdefault'],$customview['setmetrics'],$customview['cvmodule']);
insertCvColumns($queryid,$cvcolumns[$key]);
if(isset($cvstdfilters[$customview['stdfilterid']])) { $i =
$customview['stdfilterid'];
insertCvStdFilter($queryid,$cvstdfilters[$i]['columnname'],$cvstdfilters[$i]['datefilter'],$cvstdfilters[$i]['startdate'],$cvstdfilters[$i]['enddate']);
} if(isset($cvadvfilters[$customview['advfilterid']])) {
insertCvAdvFilter($queryid,$cvadvfilters[$customview['advfilterid']]); } }
function insertCustomView($viewname,$setdefault,$setmetrics,$cvmodule) {
global $adb; $genCVid = $adb->getUniqueID("customview"); if($genCVid !=
"") { $customviewsql = "insert into
customview(cvid,viewname,setdefault,setmetrics,entitytype)";
$customviewsql .= "
values(".$genCVid.",'".$viewname."',".$setdefault.",".$setmetrics.",'".$cvmodule."')";
$customviewresult = $adb->query($customviewsql); } return $genCVid; }
function insertCvColumns($CVid,$columnslist) { global $adb; if($CVid !=
"") { for($i=0;$iquery($columnsql); } } } function
insertCvStdFilter($CVid,$filtercolumn,$filtercriteria,$startdate,$enddate)
{ global $adb; if($CVid != "") { $stdfiltersql = "insert into
cvstdfilter(cvid,columnname,stdfilter,startdate,enddate)"; $stdfiltersql
.= " values (".$CVid.",'".$filtercolumn."',"; $stdfiltersql .=
"'".$filtercriteria."',"; $stdfiltersql .= "'".$startdate."',";
$stdfiltersql .= "'".$enddate."')"; $stdfilterresult =
$adb->query($stdfiltersql); } } function insertCvAdvFilter($CVid,$filters)
{ global $adb; if($CVid != "") { foreach($filters as $i=>$filter) {
$advfiltersql = "insert into
cvadvfilter(cvid,columnindex,columnname,comparator,value)"; $advfiltersql
.= " values (".$CVid.",".$i.",'".$filter['columnname']."',"; $advfiltersql
.= "'".$filter['comparator']."',"; $advfiltersql .=
"'".$filter['value']."')"; $advfilterresult = $adb->query($advfiltersql);
} } } ?> Populate seed data into vtigercrm5_beta1...done
Also there are no images displayed.
Thanks,
Gopal
--
Ticket URL: <http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/138>
vtiger development <http://vtiger.fosslabs.com/>
vtigerCRM
More information about the vtigercrm-commits
mailing list