Merge pull request #17187 from alexymik/recur_contribution_source
[civicrm-core.git] / settings / Contribute.setting.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC (c) 2004-2020
16 *
17 * Settings metadata file
18 */
19
20 return [
21 'cvv_backoffice_required' => [
22 'group_name' => 'Contribute Preferences',
23 'group' => 'contribute',
24 'name' => 'cvv_backoffice_required',
25 'type' => 'Boolean',
26 'html_type' => 'radio',
27 'quick_form_type' => 'YesNo',
28 'default' => '1',
29 'add' => '4.1',
30 'title' => ts('CVV required for backoffice?'),
31 'is_domain' => 1,
32 'is_contact' => 0,
33 'description' => ts('Is the CVV code required for back office credit card transactions'),
34 'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change',
35 'settings_pages' => ['contribute' => ['weight' => 10]],
36 ],
37 'contribution_invoice_settings' => [
38 // @todo our standard is to have a setting per item not to hide settings in an array with
39 // no useful metadata. Undo this setting.
40 'group_name' => 'Contribute Preferences',
41 'group' => 'contribute',
42 'name' => 'contribution_invoice_settings',
43 'type' => 'Array',
44 'default' => [
45 'invoice_prefix' => 'INV_',
46 'credit_notes_prefix' => 'CN_',
47 'due_date' => '10',
48 'due_date_period' => 'days',
49 'notes' => '',
50 'tax_term' => 'Sales Tax',
51 'tax_display_settings' => 'Inclusive',
52 ],
53 'add' => '4.7',
54 'title' => ts('Deprecated setting'),
55 'is_domain' => 1,
56 'is_contact' => 0,
57 'help_text' => NULL,
58 ],
59 'invoicing' => [
60 'group_name' => 'Contribute Preferences',
61 'group' => 'contribute',
62 'name' => 'invoicing',
63 'type' => 'Boolean',
64 'html_type' => 'checkbox',
65 'quick_form_type' => 'Element',
66 'default' => 0,
67 'add' => '4.7',
68 'title' => ts('Enable Tax and Invoicing'),
69 'is_domain' => 1,
70 'is_contact' => 0,
71 'on_change' => [
72 'CRM_Invoicing_Utils::onToggle',
73 ],
74 'settings_pages' => ['contribute' => ['weight' => 90]],
75 ],
76 'invoice_prefix' => [
77 'html_type' => 'text',
78 'name' => 'invoice_prefix',
79 'add' => '5.23',
80 'type' => CRM_Utils_Type::T_STRING,
81 'title' => ts('Invoice Prefix'),
82 'description' => ts('Enter prefix to be be preprended when creating an invoice number'),
83 'is_domain' => 1,
84 'is_contact' => 0,
85 ],
86 'invoice_due_date' => [
87 'name' => 'invoice_due_date',
88 'html_type' => 'text',
89 'title' => ts('Due Date'),
90 'add' => '5.23',
91 'type' => CRM_Utils_Type::T_INT,
92 'is_domain' => 1,
93 'is_contact' => 0,
94 ],
95 'invoice_due_date_period' => [
96 'html_type' => 'select',
97 'name' => 'invoice_due_date_period',
98 'title' => ts('For transmission'),
99 'weight' => 4,
100 'add' => '5.23',
101 'type' => CRM_Utils_Type::T_STRING,
102 'is_domain' => 1,
103 'is_contact' => 0,
104 'description' => ts('Select the interval for due date.'),
105 'options' => [
106 'select' => ts('- select -'),
107 'days' => ts('Days'),
108 'months' => ts('Months'),
109 'years' => ts('Years'),
110 ],
111 ],
112 'invoice_notes' => [
113 'name' => 'invoice_notes',
114 'html_type' => 'wysiwyg',
115 'title' => ts('Notes or Standard Terms'),
116 'type' => CRM_Utils_Type::T_STRING,
117 'add' => '5.23',
118 'is_domain' => 1,
119 'is_contact' => 0,
120 'description' => ts('Enter note or message to be displayed on PDF invoice or credit notes '),
121 'attributes' => ['rows' => 2, 'cols' => 40],
122 ],
123 'invoice_is_email_pdf' => [
124 'name' => 'invoice_is_email_pdf',
125 'html_type' => 'checkbox',
126 'add' => '5.23',
127 'type' => CRM_Utils_Type::T_BOOLEAN,
128 'is_domain' => 1,
129 'is_contact' => 0,
130 'title' => ts('Automatically email invoice when user purchases online'),
131 'description' => ts('Should a pdf invoice be emailed automatically?'),
132 ],
133 'tax_term' => [
134 'name' => 'tax_term',
135 'html_type' => 'text',
136 'add' => '5.23',
137 'title' => ts('Tax Term'),
138 'type' => CRM_Utils_Type::T_STRING,
139 'is_domain' => 1,
140 'is_contact' => 0,
141 ],
142 'tax_display_settings' => [
143 'html_type' => 'select',
144 'name' => 'tax_display_settings',
145 'type' => CRM_Utils_Type::T_STRING,
146 'add' => '5.23',
147 'title' => ts('Tax Display Settings'),
148 'is_domain' => 1,
149 'is_contact' => 0,
150 'pseudoconstant' => ['callback' => 'CRM_Core_SelectValues::taxDisplayOptions'],
151 ],
152 'acl_financial_type' => [
153 'group_name' => 'Contribute Preferences',
154 'group' => 'contribute',
155 'name' => 'acl_financial_type',
156 'type' => 'Boolean',
157 'html_type' => 'checkbox',
158 'quick_form_type' => 'Element',
159 'default' => 0,
160 'add' => '4.7',
161 'title' => ts('Enable Access Control by Financial Type'),
162 'is_domain' => 1,
163 'is_contact' => 0,
164 'help_text' => NULL,
165 'help' => ['id' => 'acl_financial_type'],
166 'settings_pages' => ['contribute' => ['weight' => 30]],
167 ],
168 'deferred_revenue_enabled' => [
169 'group_name' => 'Contribute Preferences',
170 'group' => 'contribute',
171 'name' => 'deferred_revenue_enabled',
172 'type' => 'Boolean',
173 'html_type' => 'checkbox',
174 'quick_form_type' => 'Element',
175 'default' => 0,
176 'add' => '4.7',
177 'title' => ts('Enable Deferred Revenue'),
178 'is_domain' => 1,
179 'is_contact' => 0,
180 'help_text' => NULL,
181 'settings_pages' => ['contribute' => ['weight' => 50]],
182 ],
183 'default_invoice_page' => [
184 'group_name' => 'Contribute Preferences',
185 'group' => 'contribute',
186 'name' => 'default_invoice_page',
187 'type' => 'Integer',
188 'quick_form_type' => 'Select',
189 'default' => NULL,
190 'pseudoconstant' => [
191 'table' => 'civicrm_contribution_page',
192 'keyColumn' => 'id',
193 'labelColumn' => 'title',
194 ],
195 'html_type' => 'select',
196 'add' => '4.7',
197 'title' => ts('Default invoice payment page'),
198 'is_domain' => 1,
199 'is_contact' => 0,
200 'help_text' => NULL,
201 'settings_pages' => ['contribute' => ['weight' => 70]],
202 ],
203 'always_post_to_accounts_receivable' => [
204 'group_name' => 'Contribute Preferences',
205 'group' => 'contribute',
206 'name' => 'always_post_to_accounts_receivable',
207 'type' => 'Boolean',
208 'html_type' => 'checkbox',
209 'quick_form_type' => 'Element',
210 'default' => 0,
211 'add' => '4.7',
212 'title' => ts('Always post to Accounts Receivable?'),
213 'is_domain' => 1,
214 'is_contact' => 0,
215 'help_text' => NULL,
216 'settings_pages' => ['contribute' => ['weight' => 40]],
217 ],
218 'update_contribution_on_membership_type_change' => [
219 'group_name' => 'Contribute Preferences',
220 'group' => 'contribute',
221 'name' => 'update_contribution_on_membership_type_change',
222 'type' => 'Boolean',
223 'html_type' => 'checkbox',
224 'quick_form_type' => 'Element',
225 'default' => 0,
226 'add' => '4.7',
227 'title' => ts('Automatically update related contributions when Membership Type is changed'),
228 'is_domain' => 1,
229 'is_contact' => 0,
230 'description' => ts('Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.'),
231 'help_text' => NULL,
232 'settings_pages' => ['contribute' => ['weight' => 20]],
233 ],
234 ];