@@ -38,102 +38,102 @@ |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | $searchdefs['Opportunities'] = array( |
41 | - 'templateMeta' => |
|
42 | - array ( |
|
41 | + 'templateMeta' => |
|
42 | + array ( |
|
43 | 43 | 'maxColumns' => '3', |
44 | 44 | 'maxColumnsBasic' => '4', |
45 | 45 | 'widths' => |
46 | 46 | array ( |
47 | - 'label' => '10', |
|
48 | - 'field' => '30', |
|
47 | + 'label' => '10', |
|
48 | + 'field' => '30', |
|
49 | + ), |
|
49 | 50 | ), |
50 | - ), |
|
51 | - 'layout' => |
|
52 | - array ( |
|
51 | + 'layout' => |
|
52 | + array ( |
|
53 | 53 | 'basic_search' => |
54 | 54 | array ( |
55 | - 'name' => |
|
56 | - array ( |
|
55 | + 'name' => |
|
56 | + array ( |
|
57 | 57 | 'name' => 'name', |
58 | 58 | 'default' => true, |
59 | 59 | 'width' => '10%', |
60 | - ), |
|
61 | - 'current_user_only' => |
|
62 | - array ( |
|
60 | + ), |
|
61 | + 'current_user_only' => |
|
62 | + array ( |
|
63 | 63 | 'name' => 'current_user_only', |
64 | 64 | 'label' => 'LBL_CURRENT_USER_FILTER', |
65 | 65 | 'type' => 'bool', |
66 | 66 | 'default' => true, |
67 | 67 | 'width' => '10%', |
68 | - ), |
|
69 | - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), |
|
70 | - array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
|
68 | + ), |
|
69 | + array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), |
|
70 | + array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
|
71 | 71 | |
72 | 72 | ), |
73 | 73 | 'advanced_search' => |
74 | 74 | array ( |
75 | - 'name' => |
|
76 | - array ( |
|
75 | + 'name' => |
|
76 | + array ( |
|
77 | 77 | 'name' => 'name', |
78 | 78 | 'default' => true, |
79 | 79 | 'width' => '10%', |
80 | - ), |
|
81 | - 'account_name' => |
|
82 | - array ( |
|
80 | + ), |
|
81 | + 'account_name' => |
|
82 | + array ( |
|
83 | 83 | 'name' => 'account_name', |
84 | 84 | 'default' => true, |
85 | 85 | 'width' => '10%', |
86 | - ), |
|
87 | - 'amount' => |
|
88 | - array ( |
|
86 | + ), |
|
87 | + 'amount' => |
|
88 | + array ( |
|
89 | 89 | 'name' => 'amount', |
90 | 90 | 'default' => true, |
91 | 91 | 'width' => '10%', |
92 | - ), |
|
93 | - 'assigned_user_id' => |
|
94 | - array ( |
|
92 | + ), |
|
93 | + 'assigned_user_id' => |
|
94 | + array ( |
|
95 | 95 | 'name' => 'assigned_user_id', |
96 | 96 | 'type' => 'enum', |
97 | 97 | 'label' => 'LBL_ASSIGNED_TO', |
98 | 98 | 'function' => |
99 | 99 | array ( |
100 | - 'name' => 'get_user_array', |
|
101 | - 'params' => |
|
102 | - array ( |
|
100 | + 'name' => 'get_user_array', |
|
101 | + 'params' => |
|
102 | + array ( |
|
103 | 103 | 0 => false, |
104 | - ), |
|
104 | + ), |
|
105 | 105 | ), |
106 | 106 | 'default' => true, |
107 | 107 | 'width' => '10%', |
108 | - ), |
|
109 | - 'sales_stage' => |
|
110 | - array ( |
|
108 | + ), |
|
109 | + 'sales_stage' => |
|
110 | + array ( |
|
111 | 111 | 'name' => 'sales_stage', |
112 | 112 | 'default' => true, |
113 | 113 | 'width' => '10%', |
114 | - ), |
|
115 | - 'lead_source' => |
|
116 | - array ( |
|
114 | + ), |
|
115 | + 'lead_source' => |
|
116 | + array ( |
|
117 | 117 | 'name' => 'lead_source', |
118 | 118 | 'default' => true, |
119 | 119 | 'width' => '10%', |
120 | - ), |
|
121 | - 'date_closed' => |
|
122 | - array ( |
|
120 | + ), |
|
121 | + 'date_closed' => |
|
122 | + array ( |
|
123 | 123 | 'name' => 'date_closed', |
124 | 124 | 'default' => true, |
125 | 125 | 'width' => '10%', |
126 | - ), |
|
127 | - 'next_step' => |
|
128 | - array ( |
|
126 | + ), |
|
127 | + 'next_step' => |
|
128 | + array ( |
|
129 | 129 | 'type' => 'varchar', |
130 | 130 | 'label' => 'LBL_NEXT_STEP', |
131 | 131 | 'width' => '10%', |
132 | 132 | 'default' => true, |
133 | 133 | 'name' => 'next_step', |
134 | - ), |
|
134 | + ), |
|
135 | + ), |
|
135 | 136 | ), |
136 | - ), |
|
137 | 137 | |
138 | 138 | ); |
139 | 139 | ?> |
@@ -42,28 +42,28 @@ |
||
42 | 42 | |
43 | 43 | |
44 | 44 | $GLOBALS['studioDefs']['Opportunities'] = array( |
45 | - 'LBL_DETAILVIEW'=>array( |
|
46 | - 'template'=>'xtpl', |
|
47 | - 'template_file'=>'modules/Opportunities/DetailView.html', |
|
48 | - 'php_file'=>'modules/Opportunities/DetailView.php', |
|
49 | - 'type'=>'DetailView', |
|
50 | - ), |
|
51 | - 'LBL_EDITVIEW'=>array( |
|
52 | - 'template'=>'xtpl', |
|
53 | - 'template_file'=>'modules/Opportunities/EditView.html', |
|
54 | - 'php_file'=>'modules/Opportunities/EditView.php', |
|
55 | - 'type'=>'EditView', |
|
56 | - ), |
|
57 | - 'LBL_LISTVIEW'=>array( |
|
58 | - 'template'=>'listview', |
|
59 | - 'meta_file'=>'modules/Opportunities/listviewdefs.php', |
|
60 | - 'type'=>'ListView', |
|
61 | - ), |
|
62 | - 'LBL_SEARCHFORM'=>array( |
|
63 | - 'template'=>'xtpl', |
|
64 | - 'template_file'=>'modules/Opportunities/SearchForm.html', |
|
65 | - 'php_file'=>'modules/Opportunities/ListView.php', |
|
66 | - 'type'=>'SearchForm', |
|
67 | - ), |
|
45 | + 'LBL_DETAILVIEW'=>array( |
|
46 | + 'template'=>'xtpl', |
|
47 | + 'template_file'=>'modules/Opportunities/DetailView.html', |
|
48 | + 'php_file'=>'modules/Opportunities/DetailView.php', |
|
49 | + 'type'=>'DetailView', |
|
50 | + ), |
|
51 | + 'LBL_EDITVIEW'=>array( |
|
52 | + 'template'=>'xtpl', |
|
53 | + 'template_file'=>'modules/Opportunities/EditView.html', |
|
54 | + 'php_file'=>'modules/Opportunities/EditView.php', |
|
55 | + 'type'=>'EditView', |
|
56 | + ), |
|
57 | + 'LBL_LISTVIEW'=>array( |
|
58 | + 'template'=>'listview', |
|
59 | + 'meta_file'=>'modules/Opportunities/listviewdefs.php', |
|
60 | + 'type'=>'ListView', |
|
61 | + ), |
|
62 | + 'LBL_SEARCHFORM'=>array( |
|
63 | + 'template'=>'xtpl', |
|
64 | + 'template_file'=>'modules/Opportunities/SearchForm.html', |
|
65 | + 'php_file'=>'modules/Opportunities/ListView.php', |
|
66 | + 'type'=>'SearchForm', |
|
67 | + ), |
|
68 | 68 | |
69 | 69 | ); |
@@ -40,24 +40,24 @@ discard block |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Opportunities"; |
42 | 42 | $searchFields['Opportunities'] = |
43 | - array ( |
|
44 | - 'name' => array( 'query_type'=>'default'), |
|
45 | - 'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')), |
|
46 | - 'amount'=> array('query_type'=>'default'), |
|
47 | - 'next_step'=> array('query_type'=>'default'), |
|
48 | - 'probability'=> array('query_type'=>'default'), |
|
49 | - 'lead_source'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
50 | - 'opportunity_type'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'opportunity_type_dom', 'template_var' => 'TYPE_OPTIONS'), |
|
51 | - 'sales_stage'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true), |
|
52 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
53 | - 'assigned_user_id'=> array('query_type'=>'default'), |
|
54 | - 'open_only' => array( |
|
55 | - 'query_type'=>'default', |
|
56 | - 'db_field'=>array('sales_stage'), |
|
57 | - 'operator'=>'not in', |
|
58 | - 'closed_values' => array('Closed Won', 'Closed Lost'), |
|
59 | - 'type'=>'bool', |
|
60 | - ), |
|
43 | + array ( |
|
44 | + 'name' => array( 'query_type'=>'default'), |
|
45 | + 'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')), |
|
46 | + 'amount'=> array('query_type'=>'default'), |
|
47 | + 'next_step'=> array('query_type'=>'default'), |
|
48 | + 'probability'=> array('query_type'=>'default'), |
|
49 | + 'lead_source'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
50 | + 'opportunity_type'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'opportunity_type_dom', 'template_var' => 'TYPE_OPTIONS'), |
|
51 | + 'sales_stage'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true), |
|
52 | + 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
53 | + 'assigned_user_id'=> array('query_type'=>'default'), |
|
54 | + 'open_only' => array( |
|
55 | + 'query_type'=>'default', |
|
56 | + 'db_field'=>array('sales_stage'), |
|
57 | + 'operator'=>'not in', |
|
58 | + 'closed_values' => array('Closed Won', 'Closed Lost'), |
|
59 | + 'type'=>'bool', |
|
60 | + ), |
|
61 | 61 | 'favorites_only' => array( |
62 | 62 | 'query_type'=>'format', |
63 | 63 | 'operator' => 'subquery', |
@@ -67,21 +67,21 @@ discard block |
||
67 | 67 | and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}', |
68 | 68 | 'db_field'=>array('id')), |
69 | 69 | |
70 | - //Range Search Support |
|
71 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
72 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
73 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
70 | + //Range Search Support |
|
71 | + 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
72 | + 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
73 | + 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | + 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | + 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | + 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
77 | 77 | |
78 | - 'range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | - 'start_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
80 | - 'end_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | + 'range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | + 'start_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
80 | + 'end_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
81 | 81 | |
82 | - 'range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
83 | - 'start_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
84 | - 'end_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
85 | - //Range Search Support |
|
86 | - ); |
|
82 | + 'range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
83 | + 'start_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
84 | + 'end_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), |
|
85 | + //Range Search Support |
|
86 | + ); |
|
87 | 87 | ?> |
@@ -39,117 +39,117 @@ |
||
39 | 39 | |
40 | 40 | $viewdefs ['Opportunities'] = |
41 | 41 | array ( |
42 | - 'DetailView' => |
|
43 | - array ( |
|
42 | + 'DetailView' => |
|
43 | + array ( |
|
44 | 44 | 'templateMeta' => |
45 | 45 | array ( |
46 | - 'form' => |
|
47 | - array ( |
|
46 | + 'form' => |
|
47 | + array ( |
|
48 | 48 | 'buttons' => |
49 | 49 | array ( |
50 | - 0 => 'EDIT', |
|
51 | - 1 => 'DUPLICATE', |
|
52 | - 2 => 'DELETE', |
|
53 | - 3 => 'FIND_DUPLICATES', |
|
50 | + 0 => 'EDIT', |
|
51 | + 1 => 'DUPLICATE', |
|
52 | + 2 => 'DELETE', |
|
53 | + 3 => 'FIND_DUPLICATES', |
|
54 | 54 | ), |
55 | - ), |
|
56 | - 'maxColumns' => '2', |
|
57 | - 'widths' => |
|
58 | - array ( |
|
55 | + ), |
|
56 | + 'maxColumns' => '2', |
|
57 | + 'widths' => |
|
58 | + array ( |
|
59 | 59 | 0 => |
60 | 60 | array ( |
61 | - 'label' => '10', |
|
62 | - 'field' => '30', |
|
61 | + 'label' => '10', |
|
62 | + 'field' => '30', |
|
63 | 63 | ), |
64 | 64 | 1 => |
65 | 65 | array ( |
66 | - 'label' => '10', |
|
67 | - 'field' => '30', |
|
66 | + 'label' => '10', |
|
67 | + 'field' => '30', |
|
68 | 68 | ), |
69 | - ), |
|
70 | - 'useTabs' => true, |
|
71 | - 'tabDefs' => |
|
72 | - array ( |
|
69 | + ), |
|
70 | + 'useTabs' => true, |
|
71 | + 'tabDefs' => |
|
72 | + array ( |
|
73 | 73 | 'DEFAULT' => |
74 | 74 | array ( |
75 | - 'newTab' => true, |
|
76 | - 'panelDefault' => 'expanded', |
|
75 | + 'newTab' => true, |
|
76 | + 'panelDefault' => 'expanded', |
|
77 | 77 | ), |
78 | 78 | 'LBL_PANEL_ASSIGNMENT' => |
79 | 79 | array ( |
80 | - 'newTab' => true, |
|
81 | - 'panelDefault' => 'expanded', |
|
80 | + 'newTab' => true, |
|
81 | + 'panelDefault' => 'expanded', |
|
82 | + ), |
|
82 | 83 | ), |
83 | - ), |
|
84 | 84 | ), |
85 | 85 | 'panels' => |
86 | 86 | array ( |
87 | - 'default' => |
|
88 | - array ( |
|
87 | + 'default' => |
|
88 | + array ( |
|
89 | 89 | 0 => |
90 | 90 | array ( |
91 | - 0 => 'name', |
|
92 | - 1 => 'account_name', |
|
91 | + 0 => 'name', |
|
92 | + 1 => 'account_name', |
|
93 | 93 | ), |
94 | 94 | 1 => |
95 | 95 | array ( |
96 | - 0 => |
|
97 | - array ( |
|
96 | + 0 => |
|
97 | + array ( |
|
98 | 98 | 'name' => 'amount', |
99 | 99 | 'label' => '{$MOD.LBL_AMOUNT} ({$CURRENCY})', |
100 | - ), |
|
101 | - 1 => 'date_closed', |
|
100 | + ), |
|
101 | + 1 => 'date_closed', |
|
102 | 102 | ), |
103 | 103 | 2 => |
104 | 104 | array ( |
105 | - 0 => 'sales_stage', |
|
106 | - 1 => 'opportunity_type', |
|
105 | + 0 => 'sales_stage', |
|
106 | + 1 => 'opportunity_type', |
|
107 | 107 | ), |
108 | 108 | 3 => |
109 | 109 | array ( |
110 | - 0 => 'probability', |
|
111 | - 1 => 'lead_source', |
|
110 | + 0 => 'probability', |
|
111 | + 1 => 'lead_source', |
|
112 | 112 | ), |
113 | 113 | 4 => |
114 | 114 | array ( |
115 | - 0 => 'next_step', |
|
116 | - 1 => 'campaign_name', |
|
115 | + 0 => 'next_step', |
|
116 | + 1 => 'campaign_name', |
|
117 | 117 | ), |
118 | 118 | 5 => |
119 | 119 | array ( |
120 | - 0 => |
|
121 | - array ( |
|
120 | + 0 => |
|
121 | + array ( |
|
122 | 122 | 'name' => 'description', |
123 | 123 | 'nl2br' => true, |
124 | - ), |
|
124 | + ), |
|
125 | 125 | ), |
126 | 126 | 6 => |
127 | 127 | array ( |
128 | - 0 => |
|
129 | - array ( |
|
128 | + 0 => |
|
129 | + array ( |
|
130 | 130 | 'name' => 'assigned_user_name', |
131 | 131 | 'label' => 'LBL_ASSIGNED_TO', |
132 | - ), |
|
132 | + ), |
|
133 | + ), |
|
133 | 134 | ), |
134 | - ), |
|
135 | - 'LBL_PANEL_ASSIGNMENT' => |
|
136 | - array ( |
|
135 | + 'LBL_PANEL_ASSIGNMENT' => |
|
136 | + array ( |
|
137 | 137 | 0 => |
138 | 138 | array ( |
139 | - 0 => |
|
140 | - array ( |
|
139 | + 0 => |
|
140 | + array ( |
|
141 | 141 | 'name' => 'date_modified', |
142 | 142 | 'label' => 'LBL_DATE_MODIFIED', |
143 | 143 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
144 | - ), |
|
145 | - 1 => |
|
146 | - array ( |
|
144 | + ), |
|
145 | + 1 => |
|
146 | + array ( |
|
147 | 147 | 'name' => 'date_entered', |
148 | 148 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
149 | - ), |
|
149 | + ), |
|
150 | + ), |
|
150 | 151 | ), |
151 | - ), |
|
152 | 152 | ), |
153 | - ), |
|
153 | + ), |
|
154 | 154 | ); |
155 | 155 | ?> |
@@ -46,69 +46,69 @@ |
||
46 | 46 | ********************************************************************************/ |
47 | 47 | |
48 | 48 | $viewdefs = array ( |
49 | - 'Opportunities' => |
|
50 | - array ( |
|
49 | + 'Opportunities' => |
|
50 | + array ( |
|
51 | 51 | 'QuickCreate' => |
52 | 52 | array ( |
53 | - 'templateMeta' => |
|
54 | - array ( |
|
53 | + 'templateMeta' => |
|
54 | + array ( |
|
55 | 55 | 'maxColumns' => '2', |
56 | 56 | 'widths' => |
57 | 57 | array ( |
58 | - 0 => |
|
59 | - array ( |
|
58 | + 0 => |
|
59 | + array ( |
|
60 | 60 | 'label' => '10', |
61 | 61 | 'field' => '30', |
62 | - ), |
|
63 | - 1 => |
|
64 | - array ( |
|
62 | + ), |
|
63 | + 1 => |
|
64 | + array ( |
|
65 | 65 | 'label' => '10', |
66 | 66 | 'field' => '30', |
67 | - ), |
|
67 | + ), |
|
68 | 68 | ), |
69 | 69 | 'javascript' => '{$PROBABILITY_SCRIPT}', |
70 | - ), |
|
71 | - 'panels' => |
|
72 | - array ( |
|
70 | + ), |
|
71 | + 'panels' => |
|
72 | + array ( |
|
73 | 73 | 'DEFAULT' => |
74 | 74 | array ( |
75 | - array ( |
|
76 | 75 | array ( |
77 | - 'name' => 'name', |
|
78 | - 'displayParams'=>array('required'=>true), |
|
76 | + array ( |
|
77 | + 'name' => 'name', |
|
78 | + 'displayParams'=>array('required'=>true), |
|
79 | 79 | ), |
80 | 80 | array ( |
81 | - 'name' => 'account_name', |
|
81 | + 'name' => 'account_name', |
|
82 | + ), |
|
82 | 83 | ), |
83 | - ), |
|
84 | - array ( |
|
85 | 84 | array ( |
86 | - 'name' => 'currency_id', |
|
85 | + array ( |
|
86 | + 'name' => 'currency_id', |
|
87 | 87 | ), |
88 | 88 | array ( |
89 | - 'name' => 'opportunity_type', |
|
89 | + 'name' => 'opportunity_type', |
|
90 | 90 | ), |
91 | - ), |
|
92 | - array ( |
|
91 | + ), |
|
92 | + array ( |
|
93 | 93 | 'amount', |
94 | 94 | 'date_closed' |
95 | - ), |
|
96 | - array ( |
|
97 | - 'next_step', |
|
98 | - 'sales_stage', |
|
99 | - ), |
|
100 | - array ( |
|
101 | - 'lead_source', |
|
102 | - 'probability', |
|
103 | - ), |
|
95 | + ), |
|
96 | + array ( |
|
97 | + 'next_step', |
|
98 | + 'sales_stage', |
|
99 | + ), |
|
100 | + array ( |
|
101 | + 'lead_source', |
|
102 | + 'probability', |
|
103 | + ), |
|
104 | 104 | array ( |
105 | 105 | array ( |
106 | - 'name' => 'assigned_user_name', |
|
106 | + 'name' => 'assigned_user_name', |
|
107 | 107 | ), |
108 | 108 | ), |
109 | 109 | ), |
110 | - ), |
|
110 | + ), |
|
111 | + ), |
|
111 | 112 | ), |
112 | - ), |
|
113 | 113 | ); |
114 | 114 | ?> |
@@ -43,13 +43,13 @@ |
||
43 | 43 | * To change the template for this generated file go to |
44 | 44 | * Window - Preferences - PHPeclipse - PHP - Code Templates |
45 | 45 | */ |
46 | - $metafiles['Opportunities'] = array( |
|
47 | - 'detailviewdefs' => 'modules/Opportunities/metadata/detailviewdefs.php', |
|
48 | - 'editviewdefs' => 'modules/Opportunities/metadata/editviewdefs.php', |
|
49 | - 'listviewdefs' => 'modules/Opportunities/metadata/listviewdefs.php', |
|
50 | - 'searchdefs' => 'modules/Opportunities/metadata/searchdefs.php', |
|
51 | - 'popupdefs' => 'modules/Opportunities/metadata/popupdefs.php', |
|
52 | - 'searchfields' => 'modules/Opportunities/metadata/SearchFields.php', |
|
46 | + $metafiles['Opportunities'] = array( |
|
47 | + 'detailviewdefs' => 'modules/Opportunities/metadata/detailviewdefs.php', |
|
48 | + 'editviewdefs' => 'modules/Opportunities/metadata/editviewdefs.php', |
|
49 | + 'listviewdefs' => 'modules/Opportunities/metadata/listviewdefs.php', |
|
50 | + 'searchdefs' => 'modules/Opportunities/metadata/searchdefs.php', |
|
51 | + 'popupdefs' => 'modules/Opportunities/metadata/popupdefs.php', |
|
52 | + 'searchfields' => 'modules/Opportunities/metadata/SearchFields.php', |
|
53 | 53 | |
54 | - ); |
|
54 | + ); |
|
55 | 55 | ?> |
@@ -42,43 +42,43 @@ discard block |
||
42 | 42 | |
43 | 43 | |
44 | 44 | $listViewDefs['Opportunities'] = array( |
45 | - 'NAME' => array( |
|
46 | - 'width' => '30', |
|
47 | - 'label' => 'LBL_LIST_OPPORTUNITY_NAME', |
|
48 | - 'link' => true, |
|
45 | + 'NAME' => array( |
|
46 | + 'width' => '30', |
|
47 | + 'label' => 'LBL_LIST_OPPORTUNITY_NAME', |
|
48 | + 'link' => true, |
|
49 | 49 | 'default' => true), |
50 | - 'ACCOUNT_NAME' => array( |
|
51 | - 'width' => '20', |
|
52 | - 'label' => 'LBL_LIST_ACCOUNT_NAME', |
|
53 | - 'id' => 'ACCOUNT_ID', |
|
50 | + 'ACCOUNT_NAME' => array( |
|
51 | + 'width' => '20', |
|
52 | + 'label' => 'LBL_LIST_ACCOUNT_NAME', |
|
53 | + 'id' => 'ACCOUNT_ID', |
|
54 | 54 | 'module' => 'Accounts', |
55 | - 'link' => true, |
|
55 | + 'link' => true, |
|
56 | 56 | 'default' => true, |
57 | 57 | 'sortable'=> true, |
58 | 58 | 'ACLTag' => 'ACCOUNT', |
59 | 59 | 'contextMenu' => array('objectType' => 'sugarAccount', |
60 | - 'metaData' => array('return_module' => 'Contacts', |
|
61 | - 'return_action' => 'ListView', |
|
62 | - 'module' => 'Accounts', |
|
63 | - 'return_action' => 'ListView', |
|
64 | - 'parent_id' => '{$ACCOUNT_ID}', |
|
65 | - 'parent_name' => '{$ACCOUNT_NAME}', |
|
66 | - 'account_id' => '{$ACCOUNT_ID}', |
|
67 | - 'account_name' => '{$ACCOUNT_NAME}', |
|
68 | - ), |
|
69 | - ), |
|
60 | + 'metaData' => array('return_module' => 'Contacts', |
|
61 | + 'return_action' => 'ListView', |
|
62 | + 'module' => 'Accounts', |
|
63 | + 'return_action' => 'ListView', |
|
64 | + 'parent_id' => '{$ACCOUNT_ID}', |
|
65 | + 'parent_name' => '{$ACCOUNT_NAME}', |
|
66 | + 'account_id' => '{$ACCOUNT_ID}', |
|
67 | + 'account_name' => '{$ACCOUNT_NAME}', |
|
68 | + ), |
|
69 | + ), |
|
70 | 70 | 'related_fields' => array('account_id')), |
71 | - 'SALES_STAGE' => array( |
|
72 | - 'width' => '10', |
|
73 | - 'label' => 'LBL_LIST_SALES_STAGE', |
|
71 | + 'SALES_STAGE' => array( |
|
72 | + 'width' => '10', |
|
73 | + 'label' => 'LBL_LIST_SALES_STAGE', |
|
74 | 74 | 'default' => true), |
75 | - 'AMOUNT_USDOLLAR' => array( |
|
76 | - 'width' => '10', |
|
77 | - 'label' => 'LBL_LIST_AMOUNT_USDOLLAR', |
|
75 | + 'AMOUNT_USDOLLAR' => array( |
|
76 | + 'width' => '10', |
|
77 | + 'label' => 'LBL_LIST_AMOUNT_USDOLLAR', |
|
78 | 78 | 'align' => 'right', |
79 | 79 | 'default' => true, |
80 | 80 | 'currency_format' => true, |
81 | - ), |
|
81 | + ), |
|
82 | 82 | 'OPPORTUNITY_TYPE' => array( |
83 | 83 | 'width' => '15', |
84 | 84 | 'label' => 'LBL_TYPE'), |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | 'PROBABILITY' => array( |
92 | 92 | 'width' => '10', |
93 | 93 | 'label' => 'LBL_PROBABILITY'), |
94 | - 'DATE_CLOSED' => array( |
|
95 | - 'width' => '10', |
|
96 | - 'label' => 'LBL_LIST_DATE_CLOSED', |
|
94 | + 'DATE_CLOSED' => array( |
|
95 | + 'width' => '10', |
|
96 | + 'label' => 'LBL_LIST_DATE_CLOSED', |
|
97 | 97 | 'default' => true), |
98 | 98 | 'CREATED_BY_NAME' => array( |
99 | 99 | 'width' => '10', |
100 | 100 | 'label' => 'LBL_CREATED'), |
101 | - 'ASSIGNED_USER_NAME' => array( |
|
102 | - 'width' => '5', |
|
103 | - 'label' => 'LBL_LIST_ASSIGNED_USER', |
|
104 | - 'module' => 'Employees', |
|
101 | + 'ASSIGNED_USER_NAME' => array( |
|
102 | + 'width' => '5', |
|
103 | + 'label' => 'LBL_LIST_ASSIGNED_USER', |
|
104 | + 'module' => 'Employees', |
|
105 | 105 | 'id' => 'ASSIGNED_USER_ID', |
106 | 106 | 'default' => true), |
107 | 107 | 'MODIFIED_BY_NAME' => array( |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'DATE_ENTERED' => array( |
111 | 111 | 'width' => '10', |
112 | 112 | 'label' => 'LBL_DATE_ENTERED', |
113 | - 'default' => true) |
|
113 | + 'default' => true) |
|
114 | 114 | ); |
115 | 115 | |
116 | 116 | ?> |
@@ -45,97 +45,97 @@ discard block |
||
45 | 45 | |
46 | 46 | |
47 | 47 | function checkForDuplicates($prefix){ |
48 | - require_once('include/formbase.php'); |
|
48 | + require_once('include/formbase.php'); |
|
49 | 49 | |
50 | - $focus = new Opportunity(); |
|
51 | - $query = ''; |
|
52 | - $baseQuery = 'select id, name, sales_stage,amount, date_closed from opportunities where deleted!=1 and ('; |
|
53 | - |
|
54 | - if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){ |
|
55 | - $query = $baseQuery ." name like '%".$_POST[$prefix.'name']."%'"; |
|
56 | - $query .= getLikeForEachWord('name', $_POST[$prefix.'name']); |
|
57 | - } |
|
58 | - |
|
59 | - if(!empty($query)){ |
|
60 | - $rows = array(); |
|
61 | - global $db; |
|
62 | - $result = $db->query($query.')'); |
|
63 | - $i=-1; |
|
64 | - while(($row=$db->fetchByAssoc($result)) != null) { |
|
65 | - $i++; |
|
66 | - $rows[$i] = $row; |
|
67 | - } |
|
68 | - if ($i==-1) return null; |
|
50 | + $focus = new Opportunity(); |
|
51 | + $query = ''; |
|
52 | + $baseQuery = 'select id, name, sales_stage,amount, date_closed from opportunities where deleted!=1 and ('; |
|
53 | + |
|
54 | + if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){ |
|
55 | + $query = $baseQuery ." name like '%".$_POST[$prefix.'name']."%'"; |
|
56 | + $query .= getLikeForEachWord('name', $_POST[$prefix.'name']); |
|
57 | + } |
|
58 | + |
|
59 | + if(!empty($query)){ |
|
60 | + $rows = array(); |
|
61 | + global $db; |
|
62 | + $result = $db->query($query.')'); |
|
63 | + $i=-1; |
|
64 | + while(($row=$db->fetchByAssoc($result)) != null) { |
|
65 | + $i++; |
|
66 | + $rows[$i] = $row; |
|
67 | + } |
|
68 | + if ($i==-1) return null; |
|
69 | 69 | |
70 | - return $rows; |
|
71 | - } |
|
72 | - return null; |
|
70 | + return $rows; |
|
71 | + } |
|
72 | + return null; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | function buildTableForm($rows, $mod='Opportunities'){ |
77 | - if(!empty($mod)){ |
|
78 | - global $current_language; |
|
79 | - $mod_strings = return_module_language($current_language, $mod); |
|
80 | - }else global $mod_strings; |
|
81 | - global $app_strings; |
|
82 | - $cols = sizeof($rows[0]) * 2 + 1; |
|
83 | - $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>'; |
|
84 | - |
|
85 | - $form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>"; |
|
86 | - $form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>"; |
|
87 | - $form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>"; |
|
88 | - $form .= "<tr><td scope='col'> </td>"; |
|
77 | + if(!empty($mod)){ |
|
78 | + global $current_language; |
|
79 | + $mod_strings = return_module_language($current_language, $mod); |
|
80 | + }else global $mod_strings; |
|
81 | + global $app_strings; |
|
82 | + $cols = sizeof($rows[0]) * 2 + 1; |
|
83 | + $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>'; |
|
84 | + |
|
85 | + $form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>"; |
|
86 | + $form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>"; |
|
87 | + $form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>"; |
|
88 | + $form .= "<tr><td scope='col'> </td>"; |
|
89 | 89 | require_once('include/formbase.php'); |
90 | - $form .= getPostToForm(); |
|
91 | - if(isset($rows[0])){ |
|
92 | - foreach ($rows[0] as $key=>$value){ |
|
93 | - if($key != 'id'){ |
|
94 | - $form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>"; |
|
95 | - }} |
|
96 | - $form .= "</tr>"; |
|
97 | - } |
|
98 | - |
|
99 | - $rowColor = 'oddListRowS1'; |
|
100 | - foreach($rows as $row){ |
|
101 | - |
|
102 | - $form .= "<tr class='$rowColor'>"; |
|
103 | - |
|
104 | - $form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>"; |
|
105 | - $wasSet = false; |
|
106 | - foreach ($row as $key=>$value){ |
|
107 | - if($key != 'id'){ |
|
108 | - if(!$wasSet){ |
|
109 | - $form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>"; |
|
110 | - $wasSet = true; |
|
111 | - }else{ |
|
112 | - $form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>"; |
|
113 | - } |
|
114 | - }} |
|
115 | - |
|
116 | - if($rowColor == 'evenListRowS1'){ |
|
117 | - $rowColor = 'oddListRowS1'; |
|
118 | - }else{ |
|
119 | - $rowColor = 'evenListRowS1'; |
|
120 | - } |
|
121 | - $form .= "</tr>"; |
|
122 | - } |
|
90 | + $form .= getPostToForm(); |
|
91 | + if(isset($rows[0])){ |
|
92 | + foreach ($rows[0] as $key=>$value){ |
|
93 | + if($key != 'id'){ |
|
94 | + $form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>"; |
|
95 | + }} |
|
96 | + $form .= "</tr>"; |
|
97 | + } |
|
98 | + |
|
99 | + $rowColor = 'oddListRowS1'; |
|
100 | + foreach($rows as $row){ |
|
101 | + |
|
102 | + $form .= "<tr class='$rowColor'>"; |
|
103 | + |
|
104 | + $form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>"; |
|
105 | + $wasSet = false; |
|
106 | + foreach ($row as $key=>$value){ |
|
107 | + if($key != 'id'){ |
|
108 | + if(!$wasSet){ |
|
109 | + $form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>"; |
|
110 | + $wasSet = true; |
|
111 | + }else{ |
|
112 | + $form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>"; |
|
113 | + } |
|
114 | + }} |
|
115 | + |
|
116 | + if($rowColor == 'evenListRowS1'){ |
|
117 | + $rowColor = 'oddListRowS1'; |
|
118 | + }else{ |
|
119 | + $rowColor = 'evenListRowS1'; |
|
120 | + } |
|
121 | + $form .= "</tr>"; |
|
122 | + } |
|
123 | 123 | $form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>"; |
124 | - $form .= "</table><BR></form>"; |
|
124 | + $form .= "</table><BR></form>"; |
|
125 | 125 | |
126 | - return $form; |
|
126 | + return $form; |
|
127 | 127 | |
128 | 128 | |
129 | 129 | |
130 | 130 | } |
131 | 131 | |
132 | 132 | function getForm($prefix, $mod='Opportunities'){ |
133 | - if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
134 | - return ''; |
|
135 | - } |
|
133 | + if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
134 | + return ''; |
|
135 | + } |
|
136 | 136 | if(!empty($mod)){ |
137 | - global $current_language; |
|
138 | - $mod_strings = return_module_language($current_language, $mod); |
|
137 | + global $current_language; |
|
138 | + $mod_strings = return_module_language($current_language, $mod); |
|
139 | 139 | }else global $mod_strings; |
140 | 140 | global $app_strings; |
141 | 141 | global $sugar_version, $sugar_config; |
@@ -165,18 +165,18 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | function getWideFormBody($prefix, $mod='Opportunities', $formname='', $lead='', $showaccount = true){ |
168 | - if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
169 | - return ''; |
|
170 | - } |
|
171 | - if(empty($lead)){ |
|
172 | - $lead = new Lead(); |
|
173 | - } |
|
168 | + if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
169 | + return ''; |
|
170 | + } |
|
171 | + if(empty($lead)){ |
|
172 | + $lead = new Lead(); |
|
173 | + } |
|
174 | 174 | global $mod_strings, $sugar_config; |
175 | 175 | $showaccount = $showaccount && $sugar_config['require_accounts']; |
176 | 176 | $temp_strings = $mod_strings; |
177 | 177 | if(!empty($mod)){ |
178 | - global $current_language; |
|
179 | - $mod_strings = return_module_language($current_language, $mod); |
|
178 | + global $current_language; |
|
179 | + $mod_strings = return_module_language($current_language, $mod); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | global $app_strings; |
@@ -215,9 +215,9 @@ discard block |
||
215 | 215 | $ntc_date_format = $timedate->get_user_date_format(); |
216 | 216 | $cal_dateformat = $timedate->get_cal_date_format(); |
217 | 217 | if (isset($lead->assigned_user_id)) { |
218 | - $user_id=$lead->assigned_user_id; |
|
218 | + $user_id=$lead->assigned_user_id; |
|
219 | 219 | } else { |
220 | - $user_id = $current_user->id; |
|
220 | + $user_id = $current_user->id; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | |
@@ -229,9 +229,9 @@ discard block |
||
229 | 229 | |
230 | 230 | |
231 | 231 | if (isset($lead->opportunity_amount)) { |
232 | - $opp_amount=$lead->opportunity_amount; |
|
232 | + $opp_amount=$lead->opportunity_amount; |
|
233 | 233 | } else { |
234 | - $opp_amount=''; |
|
234 | + $opp_amount=''; |
|
235 | 235 | } |
236 | 236 | $jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif'); |
237 | 237 | $the_form .= <<<EOQ |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | </tr> |
258 | 258 | EOQ; |
259 | 259 | if($showaccount){ |
260 | - $the_form .= <<<EOQ |
|
260 | + $the_form .= <<<EOQ |
|
261 | 261 | <tr> |
262 | 262 | <td scope="row">${mod_strings['LBL_ACCOUNT_NAME']} <span class="required">${lbl_required_symbol}</span></td> |
263 | 263 | </tr> |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | </tr> |
286 | 286 | EOQ; |
287 | 287 | //carry forward custom lead fields to opportunities during Lead Conversion |
288 | - $tempOpp = new Opportunity(); |
|
289 | - if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix); |
|
290 | - unset($tempOpp); |
|
288 | + $tempOpp = new Opportunity(); |
|
289 | + if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix); |
|
290 | + unset($tempOpp); |
|
291 | 291 | |
292 | 292 | $the_form .= <<<EOQ |
293 | 293 | |
@@ -315,12 +315,12 @@ discard block |
||
315 | 315 | } // end getWideFormBody |
316 | 316 | |
317 | 317 | function getFormBody($prefix, $mod='Opportunities', $formname=''){ |
318 | - if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
319 | - return ''; |
|
320 | - } |
|
318 | + if(!ACLController::checkAccess('Opportunities', 'edit', true)){ |
|
319 | + return ''; |
|
320 | + } |
|
321 | 321 | if(!empty($mod)){ |
322 | - global $current_language; |
|
323 | - $mod_strings = return_module_language($current_language, $mod); |
|
322 | + global $current_language; |
|
323 | + $mod_strings = return_module_language($current_language, $mod); |
|
324 | 324 | }else global $mod_strings; |
325 | 325 | global $app_strings; |
326 | 326 | global $app_list_strings; |
@@ -363,13 +363,13 @@ discard block |
||
363 | 363 | /// SETUP ACCOUNT POPUP |
364 | 364 | |
365 | 365 | $popup_request_data = array( |
366 | - 'call_back_function' => 'set_return', |
|
367 | - 'form_name' => "{$prefix}OppSave", |
|
368 | - 'field_to_name_array' => array( |
|
369 | - 'id' => 'account_id', |
|
370 | - 'name' => 'account_name', |
|
371 | - ), |
|
372 | - ); |
|
366 | + 'call_back_function' => 'set_return', |
|
367 | + 'form_name' => "{$prefix}OppSave", |
|
368 | + 'field_to_name_array' => array( |
|
369 | + 'id' => 'account_id', |
|
370 | + 'name' => 'account_name', |
|
371 | + ), |
|
372 | + ); |
|
373 | 373 | |
374 | 374 | $json = getJSONobj(); |
375 | 375 | $encoded_popup_request_data = $json->encode($popup_request_data); |
@@ -429,12 +429,12 @@ discard block |
||
429 | 429 | global $current_user; |
430 | 430 | |
431 | 431 | |
432 | - require_once('include/formbase.php'); |
|
432 | + require_once('include/formbase.php'); |
|
433 | 433 | |
434 | - $focus = new Opportunity(); |
|
435 | - if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){ |
|
436 | - return null; |
|
437 | - } |
|
434 | + $focus = new Opportunity(); |
|
435 | + if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){ |
|
436 | + return null; |
|
437 | + } |
|
438 | 438 | |
439 | 439 | if(empty($_POST['currency_id'])){ |
440 | 440 | $currency_id = $current_user->getPreference('currency'); |
@@ -442,28 +442,28 @@ discard block |
||
442 | 442 | $focus->currency_id = $currency_id; |
443 | 443 | } |
444 | 444 | } |
445 | - $focus = populateFromPost($prefix, $focus); |
|
446 | - if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){ |
|
447 | - ACLController::displayNoAccess(true); |
|
448 | - } |
|
449 | - $check_notify = FALSE; |
|
450 | - if (isset($GLOBALS['check_notify'])) { |
|
451 | - $check_notify = $GLOBALS['check_notify']; |
|
452 | - } |
|
453 | - |
|
454 | - $focus->save($check_notify); |
|
455 | - |
|
456 | - if(!empty($_POST['duplicate_parent_id'])){ |
|
457 | - clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id', $_POST['duplicate_parent_id'], $focus->id); |
|
458 | - } |
|
459 | - $return_id = $focus->id; |
|
445 | + $focus = populateFromPost($prefix, $focus); |
|
446 | + if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){ |
|
447 | + ACLController::displayNoAccess(true); |
|
448 | + } |
|
449 | + $check_notify = FALSE; |
|
450 | + if (isset($GLOBALS['check_notify'])) { |
|
451 | + $check_notify = $GLOBALS['check_notify']; |
|
452 | + } |
|
453 | + |
|
454 | + $focus->save($check_notify); |
|
455 | + |
|
456 | + if(!empty($_POST['duplicate_parent_id'])){ |
|
457 | + clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id', $_POST['duplicate_parent_id'], $focus->id); |
|
458 | + } |
|
459 | + $return_id = $focus->id; |
|
460 | 460 | |
461 | - $GLOBALS['log']->debug("Saved record with id of ".$return_id); |
|
462 | - if($redirect){ |
|
463 | - handleRedirect($return_id,"Opportunities" ); |
|
464 | - }else{ |
|
465 | - return $focus; |
|
466 | - } |
|
461 | + $GLOBALS['log']->debug("Saved record with id of ".$return_id); |
|
462 | + if($redirect){ |
|
463 | + handleRedirect($return_id,"Opportunities" ); |
|
464 | + }else{ |
|
465 | + return $focus; |
|
466 | + } |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | } |
@@ -46,15 +46,15 @@ |
||
46 | 46 | * Contributor(s): ______________________________________.. |
47 | 47 | ********************************************************************************/ |
48 | 48 | $fields_array['ProspectList'] = array ('column_fields' => array( |
49 | - "id", "date_entered", |
|
50 | - "date_modified", "modified_user_id", |
|
51 | - "assigned_user_id", "created_by", |
|
52 | - "name", "description",'list_type','domain_name', |
|
53 | - ), |
|
49 | + "id", "date_entered", |
|
50 | + "date_modified", "modified_user_id", |
|
51 | + "assigned_user_id", "created_by", |
|
52 | + "name", "description",'list_type','domain_name', |
|
53 | + ), |
|
54 | 54 | 'list_fields' => array( |
55 | - 'id', 'name', 'description','list_type', |
|
56 | - 'assigned_user_id','assigned_user_name', |
|
57 | - ), |
|
55 | + 'id', 'name', 'description','list_type', |
|
56 | + 'assigned_user_id','assigned_user_name', |
|
57 | + ), |
|
58 | 58 | 'required_fields' => array('name'=>1,'list_type'=>2), |
59 | 59 | ); |
60 | 60 | ?> |
61 | 61 | \ No newline at end of file |