PHP Code:
<?php
/*********************************************************************************
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2011 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['Comms_Commissions'] = array(
'table'=>'comms_commissions',
'audited'=>true,
'fields'=>array (
'currency_id' =>
array (
'required' => false,
'name' => 'currency_id',
'vname' => 'LBL_CURRENCY',
'type' => 'id',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => true,
'len' => 36,
'size' => '20',
'studio' => 'visible',
'function' =>
array (
'name' => 'getCurrencyDropDown',
'returns' => 'html',
),
),
'type_of_product' =>
array (
'required' => true,
'name' => 'type_of_product',
'vname' => 'LBL_TYPE_OF_PRODUCT',
'type' => 'enum',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'len' => 100,
'size' => '20',
'options' => 'type_of_product_list',
'studio' => 'visible',
'dependency' => false,
),
'cot_date' =>
array (
'required' => false,
'name' => 'cot_date',
'vname' => 'LBL_COT_DATE',
'type' => 'date',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'size' => '20',
'enable_range_search' => false,
),
'supplier_eac' =>
array (
'required' => false,
'name' => 'supplier_eac',
'vname' => 'LBL_SUPPLIER_EAC',
'type' => 'varchar',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'len' => '20',
'size' => '20',
),
'commission_type' =>
array (
'required' => true,
'name' => 'commission_type',
'vname' => 'LBL_COMMISSION_TYPE',
'type' => 'enum',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'len' => 100,
'size' => '20',
'options' => 'commission_type_list',
'studio' => 'visible',
'dependency' => false,
),
'amount' =>
array (
'required' => false,
'name' => 'amount',
'vname' => 'LBL_AMOUNT',
'type' => 'currency',
'massupdate' => 0,
'comments' => '',
'help' => 'Ensure to use - sign where negative balences',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'len' => 26,
'size' => '20',
'enable_range_search' => false,
),
'date_of_payment' =>
array (
'required' => true,
'name' => 'date_of_payment',
'vname' => 'LBL_DATE_OF_PAYMENT',
'type' => 'date',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => true,
'reportable' => true,
'size' => '20',
'enable_range_search' => false,
),
'telesales_payable_c_link' =>
array (
'name' => 'telesales_payable_c_link',
'type' => 'link',
'relationship' => 'telesales_payable_c_user',
'vname' => 'LBL_TELESALES_PAYABLE_C',
'link_type' => 'one',
'module'=>'Users',
'bean_name'=>'User',
'source'=>'non-db',
'duplicate_merge'=>'enabled',
'rname' => 'user_name',
'id_name' => 'telesales_payable_c',
'table' => 'users',
),
'relationships'=>array (
'comm_telesales_payable_c' =>
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'Comms', 'rhs_table'=> 'Commissions', 'rhs_key' => 'telesales_payable_c',
'relationship_type'=>'one-to-many'),
),
'optimistic_locking'=>true,
'unified_search'=>true,
);
if (!class_exists('VardefManager')){
require_once('include/SugarObjects/VardefManager.php');
}
VardefManager::createVardef('Comms_Commissions','Comms_Commissions', array('basic','assignable'));
Bookmarks