]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SugarObjects/templates/company/vardefs.php
Release 6.2.0
[Github/sugarcrm.git] / include / SugarObjects / templates / company / vardefs.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38 $vardefs= array (  
39 'fields' => array (
40    'name' => 
41   array (
42     'name' => 'name',
43     'type' => 'name',
44     'dbType' => 'varchar',
45     'vname' => 'LBL_NAME',
46     'len' => 150,
47     'comment' => 'Name of the Company',
48     'unified_search' => true,
49     'audited' => true,
50         'required'=>true,
51     'importable' => 'required',
52     'merge_filter' => 'selected',  //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
53                             //property value is case insensitive.
54   ),
55    
56    strtolower($object_name).'_type' => 
57   array (
58     'name' => strtolower($object_name).'_type',
59     'vname' => 'LBL_TYPE',
60     'type' => 'enum',
61     'options' => strtolower($object_name).'_type_dom',
62     'len'=>50,
63     'comment' => 'The Company is of this type',
64   ),  
65 'industry' => 
66   array (
67     'name' => 'industry',
68     'vname' => 'LBL_INDUSTRY',
69     'type' => 'enum',
70     'options' => 'industry_dom',
71     'len'=>50,
72     'comment' => 'The company belongs in this industry',
73     'merge_filter' => 'enabled',
74   ),
75     'annual_revenue' => 
76   array (
77     'name' => 'annual_revenue',
78     'vname' => 'LBL_ANNUAL_REVENUE',
79     'type' => 'varchar',
80     'len' => 100,
81     'comment' => 'Annual revenue for this company',
82     'merge_filter' => 'enabled',
83   ),
84   'phone_fax' => 
85   array (
86     'name' => 'phone_fax',
87     'vname' => 'LBL_FAX',
88     'type' => 'phone',
89     'dbType' => 'varchar',
90     'len' => 100,
91     'unified_search' => true,
92     'comment' => 'The fax phone number of this company',
93   ), 
94   
95   'billing_address_street' => 
96   array (
97     'name' => 'billing_address_street',
98     'vname' => 'LBL_BILLING_ADDRESS_STREET',
99     'type' => 'varchar',
100     'len' => '150',
101     'comment' => 'The street address used for billing address',
102     'group'=>'billing_address',
103     'merge_filter' => 'enabled',
104   ),
105   'billing_address_street_2' => 
106   array (
107     'name' => 'billing_address_street_2',
108     'vname' => 'LBL_BILLING_ADDRESS_STREET_2',
109     'type' => 'varchar',
110     'len' => '150',
111     'source'=>'non-db',
112   ),
113   'billing_address_street_3' => 
114   array (
115     'name' => 'billing_address_street_3',
116     'vname' => 'LBL_BILLING_ADDRESS_STREET_3',
117     'type' => 'varchar',
118     'len' => '150',
119     'source'=>'non-db',
120   ),
121   'billing_address_street_4' => 
122   array (
123     'name' => 'billing_address_street_4',
124     'vname' => 'LBL_BILLING_ADDRESS_STREET_4',
125     'type' => 'varchar',
126     'len' => '150',
127     'source'=>'non-db',
128   ),
129   'billing_address_city' => 
130   array (
131     'name' => 'billing_address_city',
132     'vname' => 'LBL_BILLING_ADDRESS_CITY',
133     'type' => 'varchar',
134     'len' => '100',
135     'comment' => 'The city used for billing address',
136     'group'=>'billing_address',
137     'merge_filter' => 'enabled',
138   ),
139   'billing_address_state' => 
140   array (
141     'name' => 'billing_address_state',
142     'vname' => 'LBL_BILLING_ADDRESS_STATE',
143     'type' => 'varchar',
144     'len' => '100',
145     'group'=>'billing_address',
146     'comment' => 'The state used for billing address',
147     'merge_filter' => 'enabled',
148   ),
149   'billing_address_postalcode' => 
150   array (
151     'name' => 'billing_address_postalcode',
152     'vname' => 'LBL_BILLING_ADDRESS_POSTALCODE',
153     'type' => 'varchar',
154     'len' => '20',
155     'group'=>'billing_address',
156     'comment' => 'The postal code used for billing address',
157     'merge_filter' => 'enabled',
158     
159   ),
160   'billing_address_country' => 
161   array (
162     'name' => 'billing_address_country',
163     'vname' => 'LBL_BILLING_ADDRESS_COUNTRY',
164     'type' => 'varchar',
165     'group'=>'billing_address',
166     'comment' => 'The country used for the billing address',
167     'merge_filter' => 'enabled',
168   ),
169    'rating' => 
170   array (
171     'name' => 'rating',
172     'vname' => 'LBL_RATING',
173     'type' => 'varchar',
174     'len' => 100,
175     'comment' => 'An arbitrary rating for this company for use in comparisons with others',
176   ),
177     'phone_office' => 
178   array (
179     'name' => 'phone_office',
180     'vname' => 'LBL_PHONE_OFFICE',
181     'type' => 'phone',
182     'dbType' => 'varchar',
183     'len' => 100,
184     'audited'=>true,
185     'unified_search' => true,  
186     'comment' => 'The office phone number',
187     'merge_filter' => 'enabled',
188   ),
189     'phone_alternate' => 
190   array (
191     'name' => 'phone_alternate',
192     'vname' => 'LBL_PHONE_ALT',
193     'type' => 'phone',
194     'group'=>'phone_office',
195     'dbType' => 'varchar',
196     'len' => 100,
197     'unified_search' => true,
198     'comment' => 'An alternate phone number',
199     'merge_filter' => 'enabled',
200   ),
201    'website' => 
202   array (
203     'name' => 'website',
204     'vname' => 'LBL_WEBSITE',
205     'type' => 'url',
206     'dbType' => 'varchar',
207     'len' => 255,
208     'comment' => 'URL of website for the company',
209   ),
210    'ownership' => 
211   array (
212     'name' => 'ownership',
213     'vname' => 'LBL_OWNERSHIP',
214     'type' => 'varchar',
215     'len' => 100,
216     'comment' => '',
217   ),
218    'employees' => 
219   array (
220     'name' => 'employees',
221     'vname' => 'LBL_EMPLOYEES',
222     'type' => 'varchar',
223     'len' => 10,
224     'comment' => 'Number of employees, varchar to accomodate for both number (100) or range (50-100)',
225   ),
226   'ticker_symbol' => 
227   array (
228     'name' => 'ticker_symbol',
229     'vname' => 'LBL_TICKER_SYMBOL',
230     'type' => 'varchar',
231     'len' => 10,
232     'comment' => 'The stock trading (ticker) symbol for the company',
233     'merge_filter' => 'enabled',
234   ),
235   'shipping_address_street' => 
236   array (
237     'name' => 'shipping_address_street',
238     'vname' => 'LBL_SHIPPING_ADDRESS_STREET',
239     'type' => 'varchar',
240     'len' => 150,
241     'group'=>'shipping_address',
242     'comment' => 'The street address used for for shipping purposes',
243     'merge_filter' => 'enabled',
244   ),
245   'shipping_address_street_2' => 
246   array (
247     'name' => 'shipping_address_street_2',
248     'vname' => 'LBL_SHIPPING_ADDRESS_STREET_2',
249     'type' => 'varchar',
250     'len' => 150,
251     'source'=>'non-db',
252   ),
253   'shipping_address_street_3' => 
254   array (
255     'name' => 'shipping_address_street_3',
256     'vname' => 'LBL_SHIPPING_ADDRESS_STREET_3',
257     'type' => 'varchar',
258     'len' => 150,
259     'source'=>'non-db',
260   ),
261   'shipping_address_street_4' => 
262   array (
263     'name' => 'shipping_address_street_4',
264     'vname' => 'LBL_SHIPPING_ADDRESS_STREET_4',
265     'type' => 'varchar',
266     'len' => 150,
267     'source'=>'non-db',
268   ),    
269   'shipping_address_city' => 
270   array (
271     'name' => 'shipping_address_city',
272     'vname' => 'LBL_SHIPPING_ADDRESS_CITY',
273     'type' => 'varchar',
274     'len' => 100,
275     'group'=>'shipping_address',
276     'comment' => 'The city used for the shipping address',
277     'merge_filter' => 'enabled',
278   ),
279   'shipping_address_state' => 
280   array (
281     'name' => 'shipping_address_state',
282     'vname' => 'LBL_SHIPPING_ADDRESS_STATE',
283     'type' => 'varchar',
284     'len' => 100,
285     'group'=>'shipping_address',
286     'comment' => 'The state used for the shipping address',
287     'merge_filter' => 'enabled',
288   ),
289   'shipping_address_postalcode' => 
290   array (
291     'name' => 'shipping_address_postalcode',
292     'vname' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
293     'type' => 'varchar',
294     'len' => 20,
295     'group'=>'shipping_address',
296     'comment' => 'The zip code used for the shipping address',
297     'merge_filter' => 'enabled',
298   ),
299   'shipping_address_country' => 
300   array (
301     'name' => 'shipping_address_country',
302     'vname' => 'LBL_SHIPPING_ADDRESS_COUNTRY',
303     'type' => 'varchar',
304     'group'=>'shipping_address',
305     'comment' => 'The country used for the shipping address',
306     'merge_filter' => 'enabled',
307   ),
308   
309   
310 'email1' => array(
311         'name'          => 'email1',
312         'vname'         => 'LBL_EMAIL',
313         'group'=>'email1',
314         'type'          => 'varchar',
315         'function'      => array(
316         'name'          => 'getEmailAddressWidget',
317            'returns'    => 'html'
318     ),
319         'source'        => 'non-db',
320     'studio' => array('editField' => true),
321 ), 
322   
323   'email_addresses_primary' => 
324   array (
325     'name' => 'email_addresses_primary',
326     'type' => 'link',
327     'relationship' => strtolower($object_name).'_email_addresses_primary',
328     'source' => 'non-db',
329     'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
330     'duplicate_merge' => 'disabled',
331   ),  
332   
333   'email_addresses' =>
334     array (
335         'name' => 'email_addresses',
336         'type' => 'link',
337         'relationship' => strtolower($object_name).'_email_addresses',
338         'source' => 'non-db',
339         'vname' => 'LBL_EMAIL_ADDRESSES',
340         'reportable'=>false,
341         'unified_search' => true,
342         'rel_fields' => array('primary_address' => array('type'=>'bool')),
343     ),
344 ),
345 'relationships'=>array(
346     strtolower($module).'_email_addresses' => 
347     array(
348         'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
349         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
350         'relationship_type'=>'many-to-many',
351         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
352         'relationship_role_column'=>'bean_module',
353         'relationship_role_column_value'=>$module
354     ),
355     strtolower($module).'_email_addresses_primary' => 
356     array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
357         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
358         'relationship_type'=>'many-to-many',
359         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
360         'relationship_role_column'=>'primary_address', 
361         'relationship_role_column_value'=>'1'
362     ),
363 )
364 );
365 ?>