Files
2025-05-12 15:44:39 +00:00

1075 lines
31 KiB
PHP

<?php
// if (!defined('sugarEntry') || !sugarEntry)
// die('Not A Valid Entry Point');
/**
* *******************************************************************************
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc.
* Copyright (C) 2004-2013 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
* ******************************************************************************
*/
$dictionary ['Account'] = array (
'table' => 'accounts',
'audited' => false,
'unified_search' => true,
'full_text_search' => true,
'unified_search_default_enabled' => true,
'duplicate_merge' => true,
'comment' => 'Accounts are organizations or entities that are the target of selling, support, and marketing activities, or have already purchased products or services',
'fields' => array (
'parent_id' => array (
'name' => 'parent_id',
'vname' => 'LBL_PARENT_ACCOUNT_ID',
'type' => 'id',
'required' => false,
'reportable' => false,
'audited' => true,
'comment' => 'Account ID of the parent of this account'
),
'name' => array (
'type' => 'text',
'name' => 'name',
'vname' => 'LBL_NAME',
'comment' => 'LBL_NAME',
'audited' => true,
'unified_search' => true
// 'required' => true,
),
'pdf_text' => array (
'type' => 'text',
'name' => 'pdf_text',
'vname' => 'Uwagi na fakturze',
'comment' => 'Uwagi na fakturze',
'audited' => true,
'unified_search' => true
// 'required' => true,
),
'index_dbf' => array (
'type' => 'varchar',
'name' => 'index_dbf',
'vname' => 'LBL_INDEX',
'comment' => 'LBL_INDEX',
'audited' => true,
'unified_search' => true,
'required' => true,
'len' => 145
// 'required' => true,
),
'sic_code' => array (
'name' => 'sic_code',
'vname' => 'LBL_SIC_CODE',
'type' => 'varchar',
'len' => 13,
'comment' => 'SIC code of the account'
),
// add mz
// www informations
'shop_user' => array (
'name' => 'shop_user',
'vname' => 'LBL_SHOP_USER',
'type' => 'enum',
'audited' => true,
'options' => 'account_www_type_dom',
'len' => 45
),
'industry' => array (
'name' => 'industry',
'vname' => 'Import z ',
'type' => 'enum',
'options' => 'account_itypes_dom',
'len' => 50
),
'ecmpricebook_id' => array (
'name' => 'ecmpricebook_id',
'type' => 'varchar',
'len' => 50,
'vname' => 'LBL_PRICEBOOK'
),
'ecmpricebook_name' => array (
'name' => 'ecmpricebook_name',
'type' => 'relate',
'id_name' => 'ecmpricebook_id',
'module' => 'EcmPriceBooks',
'len' => '30',
'vname' => 'LBL_PRICEBOOK',
'source' => 'non-db',
'rname' => 'name'
),
// end www informations
'maps' => array (
'name' => 'maps',
'vname' => 'LBL_MAPS',
'source' => 'non-db',
'type' => 'varchar'
),
'phone_office' => array (
'name' => 'phone_office',
'vname' => 'LBL_PHONE',
// 'source' => 'non-db',
'type' => 'varchar'
),
'to_vatid' => array (
'name' => 'to_vatid',
'audited' => true,
'vname' => 'LBL_TO_VATID',
'type' => 'varchar',
'len' => 50
),
'regon' => array (
'name' => 'regon',
'audited' => true,
'vname' => 'LBL_REGON',
'type' => 'varchar',
'len' => 100
),
'invoice_bank_account' => array (
'name' => 'invoice_bank_account',
'vname' => 'LBL_INVOICE_BANK_ACCOUNT',
'audited' => true,
'type' => 'varchar',
'len' => 50
),
'payment_date_days' => array (
'name' => 'payment_date_days',
'vname' => 'LBL_DAYS',
'audited' => true,
'type' => 'varchar',
'len' => 5
),
'payment_method' => array (
'name' => 'payment_method',
'vname' => 'LBL_PAYMENT_METHOD',
'audited' => true,
'type' => 'enum',
'options' => 'payment_method_dom'
),
'website2' => array (
'name' => 'website2',
'vname' => 'LBL_WEBSITE2',
'default' => 'http://',
'type' => 'url',
'len' => 255
),
'website3' => array (
'name' => 'website3',
'vname' => 'LBL_WEBSITE3',
'default' => 'http://',
'type' => 'url',
'len' => 255
),
'ks_account' => array (
'name' => 'ks_account',
'vname' => 'Konto KS',
'type' => 'varchar',
'len' => 50
),
'krs' => array (
'name' => 'krs',
'audited' => true,
'vname' => 'LBL_KRS',
'type' => 'varchar',
'len' => 100
),
'to_vatid_unformated' => array (
'name' => 'to_vatid_unformated',
'vname' => 'LBL_TO_VATID',
'type' => 'varchar',
'len' => 50
),
'auto_invoice' => array (
'name' => 'auto_invoice',
'vname' => 'LBL_AUTO_INVOICE',
'type' => 'bool'
),
'isHidden' => array (
'name' => 'isHidden',
'vname' => 'Czy ukryty?',
'type' => 'bool',
'checkbox'=>1
),
'isAllegroUser' => array (
'name' => 'isAllegroUser',
'vname' => 'Klient Allegro',
'type' => 'bool',
'checkbox'=>1
),
'vat_payer' => array (
'name' => 'vat_payer',
'vname' => 'LBL_VAT_PAYER',
'audited' => true,
'default' => true,
'type' => 'bool'
),
'allow_prevent' => array (
'name' => 'allow_prevent',
'vname' => 'Zezwalaj na przypomnienia',
'audited' => false,
'type' => 'bool'
),
'allow_debt_collection' => array (
'name' => 'allow_debt_collection',
'vname' => 'Zezwalaj na windykację',
'audited' => false,
'type' => 'bool'
),
'supplier_code' => array (
'name' => 'supplier_code',
'vname' => 'LBL_SUPPLIER_CODE',
'type' => 'varchar',
'len' => 255
),
'shop_number' => array (
'name' => 'shop_number',
'vname' => 'Kod dostawcy',
'type' => 'varchar',
'len' => 10,
),
'iln' => array (
'name' => 'iln',
'vname' => 'LBL_ILN',
'type' => 'varchar',
'len' => 255
),
/*
'number' => array (
'name' => 'number',
'vname' => 'LBL_SIC_CODE',
'type' => 'varchar',
'len' => 36,
'comment' => 'SIC code of the account'
),
*/
'currency_id' => array (
'name' => 'currency_id',
'type' => 'enum',
'audited' => true,
'options' => 'currency_dom',
'label' => 'LBL_CURRENCY',
'len' => 36
),
'invoice_type' => array (
'name' => 'invoice_type',
'vname' => 'LBL_INVOICE_TYPE',
'audited' => true,
'type' => 'enum',
'options' => 'account_invoice_type_dom',
'len' => 40
),
'account_type2' => array (
'name' => 'account_type2',
'vname' => 'LBL_TYPE_2',
'audited' => true,
'type' => 'enum',
'options' => 'account_type2_dom',
'len' => 45
),
'account_type' => array (
'name' => 'account_type',
'vname' => 'Rodzaj Kontrahenta',
'audited' => true,
'type' => 'enum',
'options' => 'account_type_dom',
'len' => 45
),
// end mz
'parent_name' => array (
'name' => 'parent_name',
'rname' => 'name',
'id_name' => 'parent_id',
'vname' => 'LBL_MEMBER_OF',
'type' => 'relate',
'isnull' => 'true',
'module' => 'Accounts',
'table' => 'accounts',
'massupdate' => false,
'source' => 'non-db',
'len' => 36,
'link' => 'member_of',
'unified_search' => true,
'importable' => 'true'
),
'natural_person' => array (
'type' => 'bool',
'name' => 'natural_person',
'vname' => 'LBL_NATURAL_PERSON',
'default' => '0'
),
'members' => array (
'name' => 'members',
'type' => 'link',
'relationship' => 'member_accounts',
'module' => 'Accounts',
'bean_name' => 'Account',
'source' => 'non-db',
'vname' => 'LBL_MEMBERS'
),
'member_of' => array (
'name' => 'member_of',
'type' => 'link',
'relationship' => 'member_accounts',
'module' => 'Accounts',
'bean_name' => 'Account',
'link_type' => 'one',
'source' => 'non-db',
'vname' => 'LBL_MEMBER_OF',
'side' => 'right'
),
'email_opt_out' => array (
'name' => 'email_opt_out',
'vname' => 'LBL_EMAIL_OPT_OUT',
'source' => 'non-db',
'type' => 'bool',
'massupdate' => false,
'studio' => 'false'
),
'invalid_email' => array (
'name' => 'invalid_email',
'vname' => 'LBL_INVALID_EMAIL',
'source' => 'non-db',
'type' => 'bool',
'massupdate' => false,
'studio' => 'false'
),
'cases' => array (
'name' => 'cases',
'type' => 'link',
'relationship' => 'account_cases',
'module' => 'Cases',
'bean_name' => 'aCase',
'source' => 'non-db',
'vname' => 'LBL_CASES'
),
// bug 42902
'email' => array (
'name' => 'email',
'type' => 'email',
'query_type' => 'default',
'source' => 'non-db',
'operator' => 'subquery',
'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE',
'db_field' => array (
'id'
),
'vname' => 'LBL_ANY_EMAIL',
'studio' => array (
'visible' => false,
'searchview' => true
)
),
'tasks' => array (
'name' => 'tasks',
'type' => 'link',
'relationship' => 'account_tasks',
'module' => 'Tasks',
'bean_name' => 'Task',
'source' => 'non-db',
'vname' => 'LBL_TASKS'
),
'notes' => array (
'name' => 'notes',
'type' => 'link',
'relationship' => 'account_notes',
'module' => 'Notes',
'bean_name' => 'Note',
'source' => 'non-db',
'vname' => 'LBL_NOTES'
),
'meetings' => array (
'name' => 'meetings',
'type' => 'link',
'relationship' => 'account_meetings',
'module' => 'Meetings',
'bean_name' => 'Meeting',
'source' => 'non-db',
'vname' => 'LBL_MEETINGS'
),
'calls' => array (
'name' => 'calls',
'type' => 'link',
'relationship' => 'account_calls',
'module' => 'Calls',
'bean_name' => 'Call',
'source' => 'non-db',
'vname' => 'LBL_CALLS'
),
'emails' => array (
'name' => 'emails',
'type' => 'link',
'relationship' => 'emails_accounts_rel',
/* reldef in emails */
'module' => 'Emails',
'bean_name' => 'Email',
'source' => 'non-db',
'vname' => 'LBL_EMAILS',
'studio' => array (
"formula" => false
)
),
'documents' => array (
'name' => 'documents',
'type' => 'link',
'relationship' => 'account_documents',
'source' => 'non-db',
'vname' => 'LBL_NOTES'
),
'bugs' => array (
'name' => 'bugs',
'type' => 'link',
'relationship' => 'accounts_bugs',
'module' => 'Bugs',
'bean_name' => 'Bug',
'source' => 'non-db',
'vname' => 'LBL_BUGS'
),
'contacts' => array (
'name' => 'contacts',
'type' => 'link',
'relationship' => 'accounts_contacts',
'module' => 'Contacts',
'bean_name' => 'Contact',
'source' => 'non-db',
'vname' => 'LBL_CONTACTS'
),
'email_addresses' => array (
'name' => 'email_addresses',
'type' => 'link',
'relationship' => 'accounts_email_addresses',
'source' => 'non-db',
'vname' => 'LBL_EMAIL_ADDRESSES',
'reportable' => false,
'unified_search' => true,
'rel_fields' => array (
'primary_address' => array (
'type' => 'bool'
)
),
'studio' => array (
"formula" => false
)
),
'email_addresses_primary' => array (
'name' => 'email_addresses_primary',
'type' => 'link',
'relationship' => 'accounts_email_addresses_primary',
'source' => 'non-db',
'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
'duplicate_merge' => 'disabled',
'studio' => array (
"formula" => false
)
),
'opportunities' => array (
'name' => 'opportunities',
'type' => 'link',
'relationship' => 'accounts_opportunities',
'module' => 'Opportunities',
'bean_name' => 'Opportunity',
'source' => 'non-db',
'vname' => 'LBL_OPPORTUNITY'
),
'project' => array (
'name' => 'project',
'type' => 'link',
'relationship' => 'projects_accounts',
'module' => 'Project',
'bean_name' => 'Project',
'source' => 'non-db',
'vname' => 'LBL_PROJECTS'
),
'leads' => array (
'name' => 'leads',
'type' => 'link',
'relationship' => 'account_leads',
'module' => 'Leads',
'bean_name' => 'Lead',
'source' => 'non-db',
'vname' => 'LBL_LEADS'
),
'campaigns' => array (
'name' => 'campaigns',
'type' => 'link',
'relationship' => 'account_campaign_log',
'module' => 'CampaignLog',
'bean_name' => 'CampaignLog',
'source' => 'non-db',
'vname' => 'LBL_CAMPAIGNLOG',
'studio' => array (
"formula" => false
)
),
'campaign_accounts' => array (
'name' => 'campaign_accounts',
'type' => 'link',
'vname' => 'LBL_CAMPAIGNS',
'relationship' => 'campaign_accounts',
'source' => 'non-db'
),
'created_by_link' => array (
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'accounts_created_by',
'vname' => 'LBL_CREATED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db'
),
'modified_user_link' => array (
'name' => 'modified_user_link',
'type' => 'link',
'relationship' => 'accounts_modified_user',
'vname' => 'LBL_MODIFIED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db'
),
'assigned_user_link' => array (
'name' => 'assigned_user_link',
'type' => 'link',
'relationship' => 'accounts_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'
),
'campaign_id' => array (
'name' => 'campaign_id',
'comment' => 'Campaign that generated Account',
'vname' => 'LBL_CAMPAIGN_ID',
'rname' => 'id',
'id_name' => 'campaign_id',
'type' => 'id',
'table' => 'campaigns',
'isnull' => 'true',
'module' => 'Campaigns',
'reportable' => false,
'massupdate' => false,
'duplicate_merge' => 'disabled'
),
'campaign_name' => array (
'name' => 'campaign_name',
'rname' => 'name',
'vname' => 'LBL_CAMPAIGN',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'campaigns',
'id_name' => 'campaign_id',
'link' => 'campaign_accounts',
'module' => 'Campaigns',
'duplicate_merge' => 'disabled',
'comment' => 'The first campaign name for Account (Meta-data only)'
),
'prospect_lists' => array (
'name' => 'prospect_lists',
'type' => 'link',
'relationship' => 'prospect_list_accounts',
'module' => 'ProspectLists',
'source' => 'non-db',
'vname' => 'LBL_PROSPECT_LIST'
),
// add mz
'ecmpaymentcondition_id' => array (
'name' => 'ecmpaymentcondition_id',
'rname' => 'name',
'id_name' => 'ecmpaymentcondition_id',
'vname' => 'LBL_PAYMENTCONDITION_ID',
'group' => 'ecmpaymentcondition_name',
'type' => 'relate',
'table' => 'ecmpaymentconditions',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => true,
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'ecmpaymentcondition_name' => array (
'name' => 'ecmpaymentcondition_name',
'vname' => 'LBL_PAYMENTCONDITION_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'ecmpaymentcondition',
'id_name' => 'ecmpaymentcondition_id',
'module' => 'EcmPaymentConditions',
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'ecmdeliverycondition_id' => array (
'name' => 'ecmdeliverycondition_id',
'rname' => 'name',
'id_name' => 'ecmdeliverycondition_id',
'vname' => 'LBL_DELIVERYCONDITION_ID',
'group' => 'ecmdeliverycondition_name',
'type' => 'relate',
'table' => 'ecmdeliveryconditions',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => true,
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'ecmdeliverycondition_name' => array (
'name' => 'ecmdeliverycondition_name',
'vname' => 'LBL_DELIVERYCONDITION_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'ecmdeliverycondition',
'id_name' => 'ecmdeliverycondition_id',
'module' => 'EcmDeliveryConditions',
'duplicate_merge' => 'disabled',
'massupdate' => false
)
),
'indices' => array (
array (
'name' => 'idx_accnt_id_del',
'type' => 'index',
'fields' => array (
'id',
'deleted'
)
),
array (
'name' => 'idx_accnt_name_del',
'type' => 'index',
'fields' => array (
'name',
'deleted'
)
), // bug #5530
array (
'name' => 'idx_accnt_assigned_del',
'type' => 'index',
'fields' => array (
'deleted',
'assigned_user_id'
)
),
array (
'name' => 'idx_accnt_parent_id',
'type' => 'index',
'fields' => array (
'parent_id'
)
)
),
'relationships' => array (
'member_accounts' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'Accounts',
'rhs_table' => 'accounts',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
),
'account_cases' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'Cases',
'rhs_table' => 'cases',
'rhs_key' => 'account_id',
'relationship_type' => 'one-to-many'
),
'account_tasks' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'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' => 'Accounts'
),
'account_notes' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'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' => 'Accounts'
),
'account_meetings' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'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' => 'Accounts'
),
'accounts_contacts' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'Contacts',
'rhs_table' => 'contacts',
'rhs_key' => 'account_id',
'relationship_type' => 'one-to-many'
),
'account_calls' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'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' => 'Accounts'
) /*,'accounts_emails' => array(
'rhs_module' => 'Emails',
'rhs_table' => 'emails',
'rhs_key' => 'id',
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'relationship_type' => 'many-to-many',
'join_table' => 'emails_accounts',
'join_key_rhs' => 'email_id',
'join_key_lhs' => 'account_id'
)
*/ ,
'account_emails' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'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' => 'Accounts'
),
'account_leads' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'Leads',
'rhs_table' => 'leads',
'rhs_key' => 'account_id',
'relationship_type' => 'one-to-many'
),
'accounts_assigned_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Accounts',
'rhs_table' => 'accounts',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'accounts_modified_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Accounts',
'rhs_table' => 'accounts',
'rhs_key' => 'modified_user_id',
'relationship_type' => 'one-to-many'
),
'account_documents' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'Documents',
'rhs_table' => 'documents',
'rhs_key' => 'id',
'relationship_type' => 'many-to-many',
'join_table' => 'documents_accounts',
'join_key_lhs' => 'parent_id',
'join_key_rhs' => 'document_id'
),
'accounts_created_by' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Accounts',
'rhs_table' => 'accounts',
'rhs_key' => 'created_by',
'relationship_type' => 'one-to-many'
),
'account_campaign_log' => array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'CampaignLog',
'rhs_table' => 'campaign_log',
'rhs_key' => 'target_id',
'relationship_type' => 'one-to-many'
)
),
// This enables optimistic locking for Saves From EditView
'optimistic_locking' => true
);
VardefManager::createVardef ( 'Accounts', 'Account', array (
'default',
'assignable',
'company'
) );
// jc - adding for refactor for import to not use the required_fields array
// defined in the field_arrays.php file
$dictionary ['Account'] ['fields'] ['name'] ['importable'] = 'required';
$dictionary ['Account'] ['fields'] ['ecmquotes'] = array (
'name' => 'ecmquotes',
'type' => 'link',
'relationship' => 'ecmquotes_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmquotes_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmQuotes',
'rhs_table' => 'ecmquotes',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmworkreports'] = array (
'name' => 'ecmworkreports',
'type' => 'link',
'relationship' => 'ecmworkreports_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['fields'] ['ecmdocs'] = array (
'name' => 'ecmdocs',
'type' => 'link',
'relationship' => 'ecmdocs_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmdocs_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmDocs',
'rhs_table' => 'ecmdocs',
'rhs_key' => 'account_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmworkitems'] = array (
'name' => 'ecmworkitems',
'type' => 'link',
'relationship' => 'ecmworkitems_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmworkitems_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmWorkItems',
'rhs_table' => 'ecmworkitems',
'rhs_key' => 'account_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['is_vat_free'] = array (
'massupdate' => false,
'name' => 'is_vat_free',
'vname' => 'LBL_IS_VAT_FREE',
'type' => 'bool',
'default' => '0',
'comment' => 'Is Account vat free?'
);
$dictionary ['Account'] ['fields'] ['ecmlanguage'] = array (
'name' => 'ecmlanguage',
'vname' => 'LBL_ECMLANGUAGE',
'type' => 'enum',
'options' => 'ecmlanguages_dom',
'required' => true,
'len' => 35
);
$dictionary ['Account'] ['fields'] ['vatid'] = array (
'name' => 'vatid',
'vname' => 'LBL_VATID',
'type' => 'varchar',
'len' => 15,
'comment' => 'VAT-ID of the account'
);
$dictionary ['Account'] ['fields'] ['ecmcalls'] = array (
'name' => 'ecmcalls',
'type' => 'link',
'relationship' => 'ecmcalls_accounts',
'source' => 'non-db'
);
$dictionary ['Account'] ['fields'] ['ecmquestionnaires'] = array (
'name' => 'ecmquestionnaires',
'type' => 'link',
'relationship' => 'ecmquestionnaires_accounts',
'source' => 'non-db'
);
$dictionary ['Account'] ['fields'] ['ecmsales'] = array (
'name' => 'ecmsales',
'type' => 'link',
'relationship' => 'ecmsales_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmsales_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmSales',
'rhs_table' => 'ecmsales',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmdeliverynotes'] = array (
'name' => 'ecmdeliverynotes',
'type' => 'link',
'relationship' => 'ecmdeliverynotes_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmdeliverynotes_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmDeliveryNotes',
'rhs_table' => 'ecmdeliverynotes',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmdocuments'] = array (
'name' => 'ecmdocuments',
'type' => 'link',
'relationship' => 'ecmdocuments_accounts',
'source' => 'non-db',
'vname' => 'LBL_ECMDOCUMENTS'
);
$dictionary ['Account'] ['fields'] ['ecminvoiceouts'] = array (
'name' => 'ecminvoiceouts',
'type' => 'link',
'relationship' => 'ecminvoiceouts_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['fields'] ['ecmprepaymentinvoices'] = array (
'name' => 'ecmprepaymentinvoices',
'type' => 'link',
'relationship' => 'ecmprepaymentinvoices_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecminvoiceouts_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmInvoiceOuts',
'rhs_table' => 'ecminvoiceouts',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['relationships'] ['ecmprepaymentinvoices_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmPrepaymentInvoices',
'rhs_table' => 'ecmprepaymentinvoices',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmstockdocouts'] = array (
'name' => 'ecmstockdocouts',
'type' => 'link',
'relationship' => 'ecmstockdocouts_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmstockdocouts_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmStockDocOuts',
'rhs_table' => 'ecmstockdocouts',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
$dictionary ['Account'] ['fields'] ['ecmstockdocins'] = array (
'name' => 'ecmstockdocins',
'type' => 'link',
'relationship' => 'ecmstockdocins_account',
'source' => 'non-db'
);
$dictionary ['Account'] ['relationships'] ['ecmstockdocins_account'] = array (
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmStockDocIns',
'rhs_table' => 'ecmstockdocins',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
);
?>