File: /home/nexper/www/67.225.167.226/public_html/crm/cache/modules/ModuleBuilder/Opportunityvardefs.php
<?php
// created: 2010-11-02 15:49:42
$GLOBALS["dictionary"]["Opportunity"] = array (
'table' => 'opportunities',
'audited' => true,
'unified_search' => true,
'duplicate_merge' => true,
'comment' => 'An opportunity is the target of selling activities',
'fields' =>
array (
'id' =>
array (
'name' => 'id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => true,
'reportable' => false,
'comment' => 'Unique identifier',
),
'name' =>
array (
'name' => 'name',
'vname' => 'LBL_OPPORTUNITY_NAME',
'type' => 'name',
'dbType' => 'varchar',
'len' => '50',
'unified_search' => true,
'comment' => 'Name of the opportunity',
'importable' => 'required',
),
'date_entered' =>
array (
'name' => 'date_entered',
'vname' => 'LBL_DATE_ENTERED',
'type' => 'datetime',
'group' => 'created_by_name',
'comment' => 'Date record created',
'importable' => 'false',
),
'date_modified' =>
array (
'name' => 'date_modified',
'vname' => 'LBL_DATE_MODIFIED',
'type' => 'datetime',
'group' => 'modified_by_name',
'comment' => 'Date record last modified',
'importable' => 'false',
),
'modified_user_id' =>
array (
'name' => 'modified_user_id',
'rname' => 'user_name',
'id_name' => 'modified_user_id',
'vname' => 'LBL_MODIFIED_ID',
'type' => 'assigned_user_name',
'table' => 'users',
'isnull' => 'false',
'group' => 'modified_by_name',
'dbType' => 'id',
'reportable' => true,
'comment' => 'User who last modified record',
),
'modified_by_name' =>
array (
'name' => 'modified_by_name',
'vname' => 'LBL_MODIFIED_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'rname' => 'user_name',
'table' => 'users',
'id_name' => 'modified_user_id',
'module' => 'Users',
'link' => 'modified_user_link',
'duplicate_merge' => 'disabled',
),
'created_by' =>
array (
'name' => 'created_by',
'rname' => 'user_name',
'id_name' => 'modified_user_id',
'vname' => 'LBL_CREATED_ID',
'type' => 'assigned_user_name',
'table' => 'users',
'isnull' => 'false',
'dbType' => 'id',
'group' => 'created_by_name',
'comment' => 'User who created record',
),
'created_by_name' =>
array (
'name' => 'created_by_name',
'vname' => 'LBL_CREATED',
'type' => 'relate',
'reportable' => false,
'link' => 'created_by_link',
'rname' => 'user_name',
'source' => 'non-db',
'table' => 'users',
'id_name' => 'created_by',
'module' => 'Users',
'duplicate_merge' => 'disabled',
'importable' => 'false',
),
'description' =>
array (
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'type' => 'text',
'comment' => 'Full text of the note',
),
'deleted' =>
array (
'name' => 'deleted',
'vname' => 'LBL_DELETED',
'type' => 'bool',
'default' => '0',
'reportable' => false,
'comment' => 'Record deletion indicator',
),
'created_by_link' =>
array (
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'opportunities_created_by',
'vname' => 'LBL_CREATED_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'modified_user_link' =>
array (
'name' => 'modified_user_link',
'type' => 'link',
'relationship' => 'opportunities_modified_user',
'vname' => 'LBL_MODIFIED_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'assigned_user_id' =>
array (
'name' => 'assigned_user_id',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'vname' => 'LBL_ASSIGNED_TO_ID',
'group' => 'assigned_user_name',
'type' => 'relate',
'table' => 'users',
'module' => 'Users',
'reportable' => true,
'isnull' => 'false',
'dbType' => 'id',
'audited' => true,
'comment' => 'User ID assigned to record',
'duplicate_merge' => 'disabled',
),
'assigned_user_name' =>
array (
'name' => 'assigned_user_name',
'link' => 'assigned_user_link',
'vname' => 'LBL_ASSIGNED_TO_NAME',
'rname' => 'user_name',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'users',
'id_name' => 'assigned_user_id',
'module' => 'Users',
'duplicate_merge' => 'disabled',
),
'assigned_user_link' =>
array (
'name' => 'assigned_user_link',
'type' => 'link',
'relationship' => 'opportunities_assigned_user',
'vname' => 'LBL_ASSIGNED_TO_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
'duplicate_merge' => 'enabled',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'table' => 'users',
),
'opportunity_type' =>
array (
'name' => 'opportunity_type',
'vname' => 'LBL_TYPE',
'type' => 'enum',
'options' => 'opportunity_type_dom',
'len' => '255',
'audited' => true,
'comment' => 'Type of opportunity (ex: Existing, New)',
),
'account_name' =>
array (
'name' => 'account_name',
'rname' => 'name',
'id_name' => 'account_id',
'vname' => 'LBL_ACCOUNT_NAME',
'type' => 'relate',
'table' => 'accounts',
'join_name' => 'accounts',
'isnull' => 'true',
'module' => 'Accounts',
'dbType' => 'varchar',
'link' => 'accounts',
'len' => '255',
'source' => 'non-db',
'unified_search' => true,
'required' => true,
'importable' => 'required',
),
'account_id' =>
array (
'name' => 'account_id',
'vname' => 'LBL_ACCOUNT_ID',
'type' => 'id',
'source' => 'non-db',
'audited' => true,
),
'campaign_id' =>
array (
'name' => 'campaign_id',
'comment' => 'Campaign that generated lead',
'vname' => 'LBL_CAMPAIGN_ID',
'rname' => 'id',
'type' => 'id',
'dbType' => 'id',
'table' => 'campaigns',
'isnull' => 'true',
'module' => 'Campaigns',
'reportable' => false,
'massupdate' => false,
'duplicate_merge' => 'disabled',
),
'campaign_name' =>
array (
'name' => 'campaign_name',
'rname' => 'name',
'id_name' => 'campaign_id',
'vname' => 'LBL_CAMPAIGN',
'type' => 'relate',
'link' => 'campaign_opportunities',
'isnull' => 'true',
'table' => 'campaigns',
'module' => 'Campaigns',
'source' => 'non-db',
),
'campaign_opportunities' =>
array (
'name' => 'campaign_opportunities',
'type' => 'link',
'vname' => 'LBL_CAMPAIGN_OPPORTUNITY',
'relationship' => 'campaign_opportunities',
'source' => 'non-db',
),
'lead_source' =>
array (
'name' => 'lead_source',
'vname' => 'LBL_LEAD_SOURCE',
'type' => 'enum',
'options' => 'lead_source_dom',
'len' => '50',
'comment' => 'Source of the opportunity',
),
'amount' =>
array (
'name' => 'amount',
'vname' => 'LBL_AMOUNT',
'type' => 'currency',
'dbType' => 'double',
'comment' => 'Unconverted amount of the opportunity',
'duplicate_merge' => 'disabled',
'importable' => 'required',
),
'amount_usdollar' =>
array (
'name' => 'amount_usdollar',
'vname' => 'LBL_AMOUNT_USDOLLAR',
'type' => 'currency',
'group' => 'amount',
'dbType' => 'double',
'disable_num_format' => true,
'audited' => true,
'comment' => 'Formatted amount of the opportunity',
),
'currency_id' =>
array (
'name' => 'currency_id',
'type' => 'id',
'group' => 'currency_id',
'vname' => 'LBL_CURRENCY_ID',
'function' =>
array (
'name' => 'getCurrencyDropDown',
'returns' => 'html',
),
'reportable' => false,
'comment' => 'Currency used for display purposes',
),
'currency_name' =>
array (
'name' => 'currency_name',
'rname' => 'name',
'id_name' => 'currency_id',
'vname' => 'LBL_CURRENCY_NAME',
'type' => 'relate',
'isnull' => 'true',
'table' => 'currencies',
'module' => 'Currencies',
'source' => 'non-db',
'function' =>
array (
'name' => 'getCurrencyNameDropDown',
'returns' => 'html',
),
'studio' => 'false',
),
'currency_symbol' =>
array (
'name' => 'currency_symbol',
'rname' => 'symbol',
'id_name' => 'currency_id',
'vname' => 'LBL_CURRENCY_SYMBOL',
'type' => 'relate',
'isnull' => 'true',
'table' => 'currencies',
'module' => 'Currencies',
'source' => 'non-db',
'function' =>
array (
'name' => 'getCurrencySymbolDropDown',
'returns' => 'html',
),
),
'date_closed' =>
array (
'name' => 'date_closed',
'vname' => 'LBL_DATE_CLOSED',
'type' => 'date',
'audited' => true,
'comment' => 'Expected or actual date the oppportunity will close',
'importable' => 'required',
),
'next_step' =>
array (
'name' => 'next_step',
'vname' => 'LBL_NEXT_STEP',
'type' => 'varchar',
'len' => '100',
'comment' => 'The next step in the sales process',
),
'sales_stage' =>
array (
'name' => 'sales_stage',
'vname' => 'LBL_SALES_STAGE',
'type' => 'enum',
'options' => 'sales_stage_dom',
'len' => '25',
'audited' => true,
'comment' => 'Indication of progression towards closure',
'importable' => 'required',
),
'probability' =>
array (
'name' => 'probability',
'vname' => 'LBL_PROBABILITY',
'type' => 'int',
'dbType' => 'double',
'audited' => true,
'comment' => 'The probability of closure',
'validation' =>
array (
'type' => 'range',
'min' => 0,
'max' => 100,
),
),
'accounts' =>
array (
'name' => 'accounts',
'type' => 'link',
'relationship' => 'accounts_opportunities',
'source' => 'non-db',
'link_type' => 'one',
'module' => 'Accounts',
'bean_name' => 'Account',
'vname' => 'LBL_ACCOUNTS',
),
'contacts' =>
array (
'name' => 'contacts',
'type' => 'link',
'relationship' => 'opportunities_contacts',
'source' => 'non-db',
'module' => 'Contacts',
'bean_name' => 'Contact',
'vname' => 'LBL_CONTACTS',
),
'tasks' =>
array (
'name' => 'tasks',
'type' => 'link',
'relationship' => 'opportunity_tasks',
'source' => 'non-db',
'vname' => 'LBL_TASKS',
),
'notes' =>
array (
'name' => 'notes',
'type' => 'link',
'relationship' => 'opportunity_notes',
'source' => 'non-db',
'vname' => 'LBL_NOTES',
),
'meetings' =>
array (
'name' => 'meetings',
'type' => 'link',
'relationship' => 'opportunity_meetings',
'source' => 'non-db',
'vname' => 'LBL_MEETINGS',
),
'calls' =>
array (
'name' => 'calls',
'type' => 'link',
'relationship' => 'opportunity_calls',
'source' => 'non-db',
'vname' => 'LBL_CALLS',
),
'emails' =>
array (
'name' => 'emails',
'type' => 'link',
'relationship' => 'emails_opportunities_rel',
'source' => 'non-db',
'vname' => 'LBL_EMAILS',
),
'project' =>
array (
'name' => 'project',
'type' => 'link',
'relationship' => 'projects_opportunities',
'source' => 'non-db',
'vname' => 'LBL_PROJECTS',
),
'leads' =>
array (
'name' => 'leads',
'type' => 'link',
'relationship' => 'opportunity_leads',
'source' => 'non-db',
'vname' => 'LBL_LEADS',
),
'campaigns' =>
array (
'name' => 'campaigns',
'type' => 'link',
'relationship' => 'opportunities_campaign',
'module' => 'CampaignLog',
'bean_name' => 'CampaignLog',
'source' => 'non-db',
'vname' => 'LBL_CAMPAIGNS',
),
'campaign_link' =>
array (
'name' => 'campaign_link',
'type' => 'link',
'relationship' => 'opportunities_campaign',
'vname' => 'LBL_CAMPAIGNS',
'link_type' => 'one',
'module' => 'Campaigns',
'bean_name' => 'Campaign',
'source' => 'non-db',
),
'currencies' =>
array (
'name' => 'currencies',
'type' => 'link',
'relationship' => 'opportunity_currencies',
'source' => 'non-db',
'vname' => 'LBL_CURRENCIES',
),
'opportunities_fact_facturas' =>
array (
'name' => 'opportunities_fact_facturas',
'type' => 'link',
'relationship' => 'opportunities_fact_facturas',
'source' => 'non-db',
),
'amount_referente_c' =>
array (
'required' => '0',
'source' => 'custom_fields',
'name' => 'amount_referente_c',
'vname' => 'LBL_AMOUNT_REFERENTE',
'type' => 'currency',
'massupdate' => '0',
'default' => '0',
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => 0,
'reportable' => 0,
'len' => '26',
'id' => 'Opportunitiesamount_referente_c',
'custom_module' => 'Opportunities',
),
),
'indices' =>
array (
'id' =>
array (
'name' => 'opportunitiespk',
'type' => 'primary',
'fields' =>
array (
0 => 'id',
),
),
0 =>
array (
'name' => 'idx_opp_name',
'type' => 'index',
'fields' =>
array (
0 => 'name',
),
),
1 =>
array (
'name' => 'idx_opp_assigned',
'type' => 'index',
'fields' =>
array (
0 => 'assigned_user_id',
),
),
),
'relationships' =>
array (
'opportunities_modified_user' =>
array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Opportunities',
'rhs_table' => 'opportunities',
'rhs_key' => 'modified_user_id',
'relationship_type' => 'one-to-many',
),
'opportunities_created_by' =>
array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Opportunities',
'rhs_table' => 'opportunities',
'rhs_key' => 'created_by',
'relationship_type' => 'one-to-many',
),
'opportunities_assigned_user' =>
array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Opportunities',
'rhs_table' => 'opportunities',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many',
),
'opportunity_calls' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Calls',
'rhs_table' => 'calls',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Opportunities',
),
'opportunity_meetings' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Meetings',
'rhs_table' => 'meetings',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Opportunities',
),
'opportunity_tasks' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Tasks',
'rhs_table' => 'tasks',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Opportunities',
),
'opportunity_notes' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Notes',
'rhs_table' => 'notes',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Opportunities',
),
'opportunity_emails' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Emails',
'rhs_table' => 'emails',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Opportunities',
),
'opportunity_leads' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'id',
'rhs_module' => 'Leads',
'rhs_table' => 'leads',
'rhs_key' => 'opportunity_id',
'relationship_type' => 'one-to-many',
),
'opportunity_currencies' =>
array (
'lhs_module' => 'Opportunities',
'lhs_table' => 'opportunities',
'lhs_key' => 'currency_id',
'rhs_module' => 'Currencies',
'rhs_table' => 'currencies',
'rhs_key' => 'id',
'relationship_type' => 'one-to-many',
),
'opportunities_campaign' =>
array (
'lhs_module' => 'campaigns',
'lhs_table' => 'campaigns',
'lhs_key' => 'id',
'rhs_module' => 'Opportunities',
'rhs_table' => 'opportunities',
'rhs_key' => 'campaign_id',
'relationship_type' => 'one-to-many',
),
),
'optimistic_locking' => true,
'templates' =>
array (
'assignable' => 'assignable',
'basic' => 'basic',
),
'custom_fields' => true,
);
?>