Files

948 lines
33 KiB
PHP
Raw Permalink Normal View History

2025-05-12 15:44:39 +00:00
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/**
* ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License.
* You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ******************************************************************************
*/
$dictionary['EcmAgreement'] = array(
'table' => "ecmagreements",
'comment' => 'EcmAgreements',
'duplicate_merge' => true,
'unified_search' => true,
// FIELDS SECTION
'fields' => array(
// STANDARD FIELDS SECTION
'id' => array(
'name' => 'id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => true,
'reportable' => false,
'comment' => 'Unique identifier'
),
/* 'amount' => array(
'name' => 'amount',
'vname' => 'LBL_AMOUNT',
'type' => 'name',
'required' => true,
'dbType' => 'decimal',
'len' => '15,2',
'unified_search' => true,
'comment' => 'The short description of the record contents',
'massupdate' => true,
'merge_filter' => 'selected'
),*/
'wz_id' => array(
'name' => 'wz_id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => false,
'reportable' => false,
'comment' => 'Unique identifier'
),
'so_id' => array(
'name' => 'so_id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => false,
'reportable' => false,
'comment' => 'Unique identifier'
),
'wz_name' => array(
'name' => 'wz_name',
'vname' => 'LBL_NAME',
'type' => 'name',
'required' => false,
'dbType' => 'varchar',
'len' => 255,
'unified_search' => true,
'comment' => 'The short description of the record contents',
'massupdate' => true,
'merge_filter' => 'selected'
),
'description' => array(
'type' => 'text',
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'comment' => 'Description',
'unified_search' => true
// 'required' => true,
),
'pdf_text' => array(
'type' => 'text',
'name' => 'pdf_text',
'vname' => 'LBL_PDF_TEXT',
'comment' => 'pdf_text',
'unified_search' => false,
// 'required' => true,
),
'date_entered' => array(
'name' => 'date_entered',
'vname' => 'LBL_DATE_ENTERED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record created'
),
'date_end' => array(
'name' => 'date_end',
'vname' => 'LBL_DATE_END',
'type' => 'date',
'required' => true,
'comment' => 'Date record created'
),
'date_modified' => array(
'name' => 'date_modified',
'vname' => 'LBL_DATE_MODIFIED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record last modified'
),
'modified_user_id' => array(
'name' => 'modified_user_id',
'rname' => 'user_name',
'id_name' => 'modified_user_id',
'vname' => 'LBL_MODIFIED',
'type' => 'assigned_user_name',
'table' => 'modified_user_id_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'required' => true,
'reportable' => true,
'comment' => 'User who last modified record'
),
'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',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => true,
'comment' => 'User ID assigned to record',
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'assigned_user_name' => array(
'name' => 'assigned_user_name',
'vname' => 'LBL_ASSIGNED_TO',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'users',
'id_name' => 'assigned_user_id',
'module' => 'Users',
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'created_by' => array(
'name' => 'created_by',
'rname' => 'user_name',
'id_name' => 'created_by',
'vname' => 'LBL_CREATED',
'type' => 'assigned_user_name',
'table' => 'created_by_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'comment' => 'User that created the record'
),
'created_by_link' => array(
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'ecmagreements' . '_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' => 'ecmagreements' . '_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' => 'ecmagreements' . '_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'
),
'deleted' => array(
'name' => 'deleted',
'vname' => 'LBL_DELETED_BY',
'type' => 'bool',
'required' => true,
'reportable' => false,
'comment' => 'Record deletion indicator'
),
// NEW FIELDS SECTION
'number' => array(
'name' => 'number',
'vname' => 'LBL_NUMBER',
'type' => 'varchar',
'required_option' => true,
'unified_search' => true,
'required' => true,
'len' => '20'
),
'document_no' => array(
'name' => 'document_no',
'vname' => 'LBL_DOCUMENT_NO',
'type' => 'varchar',
'required_option' => true,
'unified_search' => true,
'required' => true,
'len' => '30'
),
'parent_id' => array(
'name' => 'parent_id',
'rname' => 'name',
'id_name' => 'parent_id',
'vname' => 'LBL_PARENT_ID',
'group' => 'parent_name',
'type' => 'relate',
'table' => 'accounts',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => true,
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'parent_name' => array(
'name' => 'parent_name',
'vname' => 'LBL_PARENT_NAME',
'type' => 'relate',
'reportable' => false,
'required' => true,
'source' => 'non-db',
'table' => 'accounts',
'id_name' => 'parent_id',
'module' => 'Accounts',
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'type' => array(
'name' => 'type',
'vname' => 'LBL_TYPE',
'required' => true,
'default' => 'normal',
'type' => 'enum',
'options' => 'ecmagreements_type_dom',
'massupdate' => false
),
'ecmagreement_id' => array(
'name' => 'ecmagreement_id',
'type' => 'id',
'vname' => 'LBL_ECMINVOICEOUT_ID',
'group' => 'ecmagreement_name',
'reportable' => false
),
'ecmagreement_name' => array(
'name' => 'ecmagreement_name',
'rname' => 'document_no',
// 'db_concat_fields'=> array(0=>'name'),
// 'source' => 'non-db',
'dbType' => 'varchar',
'len' => '255',
'group' => 'ecmagreement_name',
'vname' => 'LBL_ECMINVOICEOUT_NAME',
'reportable' => false,
'id_name' => 'ecmagreement_id',
'join_name' => 'ecmagreements',
'type' => 'relate',
'module' => 'EcmAgreements',
'link' => 'ecmagreements'
),
'date_of_the_loan' => array(
'name' => 'date_of_the_loan',
'vname' => 'LBL_DATE_OF_THE_LOAN',
'type' => 'date',
'reportable' => false,
'showFormats' => true,
'massupdate' => false,
'required' => true
),
'stock_name' => array(
'name' => 'stock_name',
'vname' => 'LBL_STOCK_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'ecmstocks',
'id_name' => 'stock_id',
'module' => 'EcmStocks',
'group' => 'stock_name',
'massupdate' => false,
'required' => false
),
'stock_id' => array(
'name' => 'stock_id',
'type' => 'enum',
'module' => 'EcmStocks',
'table' => 'ecmstocks',
'vname' => 'LBL_STOCK_NAME',
'group' => 'stock_name',
'options' => 'ecmstocks_list_dom',
'required' => false,
'massupdate' => false
),
'interest_rate' => array(
'name' => 'interest_rate',
'vname' => 'LBL_INTEREST_RATE',
'type' => 'decimal',
'required' => true,
'len' => '2,2'
),
'rate_of_commission' => array(
'name' => 'rate_of_commission',
'vname' => 'LBL_RAFE_OF_COMMISSION',
'type' => 'decimal',
'required' => true,
'len' => '2,2'
),
'status' => array(
'name' => 'status',
'vname' => 'LBL_STATUS',
'type' => 'enum',
'size' => '3',
'options' => 'ecmagreements_status_dom',
'massupdate' => false
),
'register_date' => array(
'name' => 'register_date',
'vname' => 'LBL_REGISTER_DATE',
'type' => 'date',
'reportable' => false,
'showFormats' => true,
'massupdate' => false,
'required' => true
),
'parent_name_copy' => array(
'name' => 'parent_name_copy',
'vname' => 'LBL_PARENT_NAME_COPY',
'type' => 'varchar',
'source' => 'non-db'
),
'parent_address_street' => array(
'name' => 'parent_address_street',
'vname' => 'LBL_PARENT_ADDRESS_STREET',
'type' => 'varchar',
'len' => '150',
'comment' => 'The street address used for parent address',
'group' => 'parent_address',
'merge_filter' => 'enabled'
),
'documents' => array(
'name' => 'documents',
'type' => 'link',
'relationship' => 'ecmagreement_documents',
'source' => 'non-db',
'vname' => 'LBL_NOTES'
),
'parent_address_city' => array(
'name' => 'parent_address_city',
'vname' => 'LBL_PARENT_ADDRESS_CITY',
'type' => 'varchar',
'len' => '100',
'comment' => 'The city used for parent address',
'group' => 'parent_address',
'merge_filter' => 'enabled'
),
'parent_address_postalcode' => array(
'name' => 'parent_address_postalcode',
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
'type' => 'varchar',
'len' => '20',
'group' => 'parent_address',
'comment' => 'The postal code used for parent address',
'merge_filter' => 'enabled'
),
'parent_address_country' => array(
'name' => 'parent_address_country',
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
'type' => 'varchar',
'group' => 'parent_address',
'comment' => 'The country used for the parent address',
'merge_filter' => 'enabled'
),
'total_interest_rate' => array(
'name' => 'total_interest_rate',
'vname' => 'LBL_SUBTOTAL',
'type' => 'varchar',
'len' => '20'
),
'total_total' => array(
'name' => 'total_total',
'vname' => 'LBL_VAT',
'type' => 'varchar',
'len' => '20'
),
'rate' => array(
'name' => 'rate',
'vname' => 'LBL_RATE',
'type' => 'varchar',
'len' => '20'
),
'total_rate_of_commission' => array(
'name' => 'total_rate_of_commission',
'vname' => 'LBL_TOTAL',
'type' => 'varchar',
'len' => '20'
),
'total_principal_value' => array(
'name' => 'total_principal_value',
'vname' => 'LBL_TOTAL',
'type' => 'varchar',
'len' => '20'
),
'parent_nip' => array(
'name' => 'parent_nip',
'vname' => 'LBL_PARENT_NIP',
'type' => 'varchar',
'len' => 15
),
'contact_position' => array(
'name' => 'contact_position',
'vname' => 'LBL_CONTACT_POSITION',
'type' => 'varchar',
'len' => 15
),
'parent_regon' => array(
'name' => 'parent_regon',
'vname' => 'LBL_PARENT_REGON',
'type' => 'varchar',
'len' => 15
),
'parent_nip_unformated' => array(
'name' => 'parent_nip_unformated',
'vname' => 'LBL_PARENT_NIP',
'type' => 'varchar',
'len' => 15
),
'ecmlanguage' => array(
'name' => 'ecmlanguage',
'vname' => 'LBL_ECMLANGUAGE',
'type' => 'enum',
'options' => 'ecmlanguages_dom',
'required' => true,
'len' => 35,
'massupdate' => false
),
'no_tax' => array(
'massupdate' => false,
'name' => 'no_tax',
'vname' => 'LBL_NO_TAX',
'type' => 'bool',
'default' => '0'
),
'number_of_installments' => array(
'name' => 'number_of_installments',
'vname' => 'LBL_NUMBER_OF_INSTALLMENTS',
'type' => 'decimal',
'required' => true,
'len' => '10'
),
//prices
'ecmprice_id' => array(
'name' => 'ecmprice_id',
'type' => 'varchar',
'len' => '36',
'vname' => 'LBL_PRICE',
'source' => 'non_db'
),
'ecmprice_name' => array(
'name' => 'ecmprice_name',
'type' => 'relate',
'id_name' => 'ecmprice_id',
'module' => 'EcmPrices',
'len' => '30',
'vname' => 'LBL_PRICE',
'source' => 'non-db',
'rname' => 'name'
),
//end prices
'contact_id' => array(
'name' => 'contact_id',
'rname' => 'name',
'id_name' => 'contact_id',
'vname' => 'LBL_CONTACT_ID',
'group' => 'contact_name',
'type' => 'relate',
'table' => 'contacts',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => false,
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'contact_name' => array(
'name' => 'contact_name',
'vname' => 'LBL_CONTACT_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'contacts',
'id_name' => 'contact_id',
'module' => 'Contacts',
'duplicate_merge' => 'disabled',
'massupdate' => false,
'other_data' => array(
'from_relation' => array(
'module' => 'Accounts',
'rel_name' => 'contacts',
'rel_bean_name' => 'Contact',
'field_id_name' => 'parent_id',
'field_name' => 'parent_name',
'field_id_value' => ''
)
),
'initial_filter_fields' => array(
'account_name' => 'parent_name'
)
),
'currency_id' => array(
'name' => 'currency_id',
'type' => 'enum',
'options' => 'currency_dom',
'label' => 'LBL_CURRENCY'
),
'principal_value' => array(
'name' => 'principal_value',
'type' => 'decimal',
'len' => '14,2',
'vname' => 'LBL_PRINCIPAL_VALUE',
'reportable' => false,
'required' => true
),
'parent_shipping_address_name' => array(
'name' => 'parent_shipping_address_name',
'vname' => 'LBL_PARENT_NAME',
'type' => 'varchar',
'len' => '100'
),
'parent_shipping_address_street' => array(
'name' => 'parent_shipping_address_street',
'vname' => 'LBL_PARENT_ADDRESS_STREET',
'type' => 'varchar',
'len' => '100'
),
'parent_shipping_address_city' => array(
'name' => 'parent_shipping_address_city',
'vname' => 'LBL_PARENT_ADDRESS_CITY',
'type' => 'varchar',
'len' => '100'
),
'parent_shipping_address_postalcode' => array(
'name' => 'parent_shipping_address_id',
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
'type' => 'varchar',
'len' => '100'
),
'parent_shipping_address_country' => array(
'name' => 'parent_shipping_address_country',
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
'type' => 'varchar',
'len' => '100'
),
'pdf_template' => array(
'name' => 'pdf_template',
'vname' => 'Szablon PDF',
'type' => 'varchar',
'len' => '100',
),
'parent_payer_address_name' => array(
'name' => 'parent_payer_address_name',
'vname' => 'LBL_PARENT_NAME',
'type' => 'varchar',
'len' => '100'
),
'a2_5' => array(
'name' => 'a2_5',
'vname' => 'LBL_2_5',
'type' => 'text',
'default' => 'Strony uzgadniają, że przedmiot pożyczki będzie spłacany co miesiąc, począwszy już od pierwszego miesiąca co najmniej w kwocie xxx w stosunku miesięcznym (minimalna rata kapitałowa). Harmonogram spłaty pożyczki stanowi zał. nr 3 do umowy.'
),
'a7_1' => array(
'name' => 'a7_1',
'vname' => 'LBL_7_1',
'type' => 'text',
'default' => 'Strony zgodnie ustalają, w celu zabezpieczenia spłaty pożyczki Pożyczkobiorca ustanawia na rzecz
Pożyczkodawcy zabezpieczenie w postaci wpisu na hipotekę, sporządzonego odrębną umową.'
),
'parent_payer_address_street' => array(
'name' => 'parent_payer_address_street',
'vname' => 'LBL_PARENT_ADDRESS_STREET',
'type' => 'varchar',
'len' => '100'
),
'parent_payer_address_city' => array(
'name' => 'parent_payer_address_city',
'vname' => 'LBL_PARENT_ADDRESS_CITY',
'type' => 'varchar',
'len' => '100'
),
'parent_payer_address_postalcode' => array(
'name' => 'parent_payer_address_id',
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
'type' => 'varchar',
'len' => '100'
),
'parent_payer_address_country' => array(
'name' => 'parent_payer_address_country',
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
'type' => 'varchar',
'len' => '100'
),
'paid_val' => array(
'name' => 'paid_val',
'vname' => 'LBL_PAID',
'type' => 'decimal',
'len' => '15,2',
'required' => false
),
'prepaid' => array(
'name' => 'prepaid',
'vname' => 'LBL_PREPAID',
'type' => 'decimal',
'len' => '15,2',
'required' => false
),
'prepaid_nr' => array(
'name' => 'prepaid_nr',
'vname' => 'LBL_PREPAID_NR',
'type' => 'varchar',
'len' => 100
),
'payment_date_d' => array(
'name' => 'payment_date_d',
'vname' => 'LBL_DAYS',
'type' => 'varchar',
'len' => 5
),
'payment_method' => array(
'name' => 'payment_method',
'vname' => 'LBL_PAYMENT_METHOD',
'type' => 'enum',
'options' => 'payment_method_dom'
),
'payment_method_paid' => array(
'name' => 'payment_method_paid',
'vname' => 'LBL_PAYMENT_METHOD_PAID',
'type' => 'enum',
'options' => 'ecmpaymentconditions_payment_method_dom',
'massupdate' => false
),
'payment_date' => array(
'name' => 'payment_date',
'vname' => 'LBL_PAYMENT_DATE',
'type' => 'date',
'reportable' => false,
'showFormats' => true,
'massupdate' => false,
'required' => false
),
'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,
'required' => false
),
'ecmpaymentcondition_text' => array(
'name' => 'ecmpaymentcondition_text',
'vname' => 'LBL_PAYMENTCONDITION_TEXT',
'type' => 'text',
'reportable' => false,
'module' => 'EcmPaymentConditions',
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'pricebook_id' => array(
'name' => 'pricebook_id',
'vname' => 'LBL_PRICEBOOK_NAME',
'type' => 'id',
'source' => 'non-db'
),
'to_informations' => array(
'name' => 'to_informations',
'vname' => 'LBL_TO_INFORMATIONS',
'type' => 'text',
'source' => 'non-db'
),
'items_list_panel' => array(
'name' => 'items_list_panel',
'vname' => '',
'type' => 'text',
'source' => 'non-db'
),
'preview_panel' => array(
'name' => 'preview_panel',
'vname' => 'LBL_PREVIEW',
'type' => 'text',
'source' => 'non-db'
),
// FOR SUBPANELS
'account' => array(
'name' => 'account',
'type' => 'link',
'relationship' => 'ecmagreements_account',
'source' => 'non-db',
'vname' => 'LBL_ACCOUNTS'
),
'contact' => array(
'name' => 'contact',
'type' => 'link',
'relationship' => 'ecmagreements_contact',
'source' => 'non-db',
'vname' => 'LBL_CONTACTS'
),
'bugs' => array(
'name' => 'bugs',
'type' => 'link',
'relationship' => 'ecmagreements_bug',
'source' => 'non-db',
'vname' => 'LBL_BUGS'
),
'notes' => array(
'name' => 'notes',
'type' => 'link',
'relationship' => 'ecmagreements_notes',
'source' => 'non-db',
'vname' => 'LBL_NOTES'
),
'emails' => array(
'name' => 'emails',
'type' => 'link',
'relationship' => 'ecmagreements_emails',
'source' => 'non-db',
'vname' => 'LBL_EMAILS'
),
'tasks' => array(
'name' => 'tasks',
'type' => 'link',
'relationship' => 'ecmagreements_task',
'source' => 'non-db',
'vname' => 'LBL_TASKS'
)
),
// INDICES SECTION
'indices' => array(
array(
'name' => 'ecmagreements' . 'pk',
'type' => 'primary',
'fields' => array(
'id'
)
),
array(
'name' => 'idx_' . 'ecmagreements' . '_document_no',
'type' => 'index',
'fields' => array(
'document_no'
)
)
),
// RELATIONSHIPS SECTION
'relationships' => array(
'ecmagreements' . '_assigned_user' => array(
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_modified_user' => array(
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'modified_user_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_created_by' => array(
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'created_by',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_account' => array(
'lhs_module' => 'Accounts',
'lhs_table' => 'accounts',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_contact' => array(
'lhs_module' => 'Contacts',
'lhs_table' => 'contacts',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'contact_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_project' => array(
'lhs_module' => 'Project',
'lhs_table' => 'project',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_bug' => array(
'lhs_module' => 'Bugs',
'lhs_table' => 'bugs',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
),
'ecmagreement_documents' => array(
'lhs_module' => 'EcmAgreements',
'lhs_table' => 'ecmagreements',
'lhs_key' => 'id',
'rhs_module' => 'Documents',
'rhs_table' => 'documents',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'EcmAgreements'
),
'ecmagreements_notes' => array(
'lhs_module' => 'EcmAgreements',
'lhs_table' => 'ecmagreements',
'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' => 'EcmAgreements'
),
'ecmagreements' . '_case' => array(
'lhs_module' => 'Cases',
'lhs_table' => 'cases',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
),
'ecmagreements' . '_task' => array(
'lhs_module' => 'Tasks',
'lhs_table' => 'tasks',
'lhs_key' => 'id',
'rhs_module' => 'EcmAgreements',
'rhs_table' => 'ecmagreements',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many'
)
),
// THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
'optimistic_locking' => true
);