Merge in 5.25
[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 'add' => '4.7',
45 'title' => ts('Deprecated, virtualized setting'),
46 'is_domain' => 1,
47 'is_contact' => 0,
48 'help_text' => NULL,
49 ],
50 'invoicing' => [
51 'group_name' => 'Contribute Preferences',
52 'group' => 'contribute',
53 'name' => 'invoicing',
54 'type' => 'Boolean',
55 'html_type' => 'checkbox',
56 'quick_form_type' => 'Element',
57 'default' => 0,
58 'add' => '4.7',
59 'title' => ts('Enable Tax and Invoicing'),
60 'is_domain' => 1,
61 'is_contact' => 0,
62 'on_change' => [
63 'CRM_Invoicing_Utils::onToggle',
64 ],
65 'settings_pages' => ['contribute' => ['weight' => 90]],
66 ],
67 'invoice_prefix' => [
68 'default' => 'INV_',
69 'html_type' => 'text',
70 'name' => 'invoice_prefix',
71 'add' => '5.23',
72 'type' => CRM_Utils_Type::T_STRING,
73 'title' => ts('Invoice Prefix'),
74 'description' => ts('Enter prefix to be be preprended when creating an invoice number'),
75 'is_domain' => 1,
76 'is_contact' => 0,
77 ],
78 'invoice_due_date' => [
79 'default' => '10',
80 'name' => 'invoice_due_date',
81 'html_type' => 'text',
82 'title' => ts('Due Date'),
83 'add' => '5.23',
84 'type' => CRM_Utils_Type::T_INT,
85 'is_domain' => 1,
86 'is_contact' => 0,
87 ],
88 'invoice_due_date_period' => [
89 'default' => 'days',
90 'html_type' => 'select',
91 'name' => 'invoice_due_date_period',
92 'title' => ts('For transmission'),
93 'weight' => 4,
94 'add' => '5.23',
95 'type' => CRM_Utils_Type::T_STRING,
96 'is_domain' => 1,
97 'is_contact' => 0,
98 'description' => ts('Select the interval for due date.'),
99 'options' => [
100 'select' => ts('- select -'),
101 'days' => ts('Days'),
102 'months' => ts('Months'),
103 'years' => ts('Years'),
104 ],
105 ],
106 'invoice_notes' => [
107 'default' => '',
108 'name' => 'invoice_notes',
109 'html_type' => 'wysiwyg',
110 'title' => ts('Notes or Standard Terms'),
111 'type' => CRM_Utils_Type::T_STRING,
112 'add' => '5.23',
113 'is_domain' => 1,
114 'is_contact' => 0,
115 'description' => ts('Enter note or message to be displayed on PDF invoice or credit notes '),
116 'attributes' => ['rows' => 2, 'cols' => 40],
117 ],
118 'invoice_is_email_pdf' => [
119 'name' => 'invoice_is_email_pdf',
120 'html_type' => 'checkbox',
121 'add' => '5.23',
122 'type' => CRM_Utils_Type::T_BOOLEAN,
123 'is_domain' => 1,
124 'is_contact' => 0,
125 'title' => ts('Automatically email invoice when user purchases online'),
126 'description' => ts('Should a pdf invoice be emailed automatically?'),
127 ],
128 'tax_term' => [
129 'default' => 'Sales Tax',
130 'name' => 'tax_term',
131 'html_type' => 'text',
132 'add' => '5.23',
133 'title' => ts('Tax Term'),
134 'type' => CRM_Utils_Type::T_STRING,
135 'is_domain' => 1,
136 'is_contact' => 0,
137 ],
138 'tax_display_settings' => [
139 'default' => 'Inclusive',
140 'html_type' => 'select',
141 'name' => 'tax_display_settings',
142 'type' => CRM_Utils_Type::T_STRING,
143 'add' => '5.23',
144 'title' => ts('Tax Display Settings'),
145 'is_domain' => 1,
146 'is_contact' => 0,
147 'pseudoconstant' => ['callback' => 'CRM_Core_SelectValues::taxDisplayOptions'],
148 ],
149 'acl_financial_type' => [
150 'group_name' => 'Contribute Preferences',
151 'group' => 'contribute',
152 'name' => 'acl_financial_type',
153 'type' => 'Boolean',
154 'html_type' => 'checkbox',
155 'quick_form_type' => 'Element',
156 'default' => 0,
157 'add' => '4.7',
158 'title' => ts('Enable Access Control by Financial Type'),
159 'is_domain' => 1,
160 'is_contact' => 0,
161 'help_text' => NULL,
162 'help' => ['id' => 'acl_financial_type'],
163 'settings_pages' => ['contribute' => ['weight' => 30]],
164 ],
165 'deferred_revenue_enabled' => [
166 'group_name' => 'Contribute Preferences',
167 'group' => 'contribute',
168 'name' => 'deferred_revenue_enabled',
169 'type' => 'Boolean',
170 'html_type' => 'checkbox',
171 'quick_form_type' => 'Element',
172 'default' => 0,
173 'add' => '4.7',
174 'title' => ts('Enable Deferred Revenue'),
175 'is_domain' => 1,
176 'is_contact' => 0,
177 'help_text' => NULL,
178 'settings_pages' => ['contribute' => ['weight' => 50]],
179 ],
180 'default_invoice_page' => [
181 'group_name' => 'Contribute Preferences',
182 'group' => 'contribute',
183 'name' => 'default_invoice_page',
184 'type' => 'Integer',
185 'quick_form_type' => 'Select',
186 'default' => NULL,
187 'pseudoconstant' => [
188 'table' => 'civicrm_contribution_page',
189 'keyColumn' => 'id',
190 'labelColumn' => 'title',
191 ],
192 'html_type' => 'select',
193 'add' => '4.7',
194 'title' => ts('Default invoice payment page'),
195 'is_domain' => 1,
196 'is_contact' => 0,
197 'help_text' => NULL,
198 'settings_pages' => ['contribute' => ['weight' => 70]],
199 ],
200 'always_post_to_accounts_receivable' => [
201 'group_name' => 'Contribute Preferences',
202 'group' => 'contribute',
203 'name' => 'always_post_to_accounts_receivable',
204 'type' => 'Boolean',
205 'html_type' => 'checkbox',
206 'quick_form_type' => 'Element',
207 'default' => 0,
208 'add' => '4.7',
209 'title' => ts('Always post to Accounts Receivable?'),
210 'is_domain' => 1,
211 'is_contact' => 0,
212 'help_text' => NULL,
213 'settings_pages' => ['contribute' => ['weight' => 40]],
214 ],
215 'update_contribution_on_membership_type_change' => [
216 'group_name' => 'Contribute Preferences',
217 'group' => 'contribute',
218 'name' => 'update_contribution_on_membership_type_change',
219 'type' => 'Boolean',
220 'html_type' => 'checkbox',
221 'quick_form_type' => 'Element',
222 'default' => 0,
223 'add' => '4.7',
224 'title' => ts('Automatically update related contributions when Membership Type is changed'),
225 'is_domain' => 1,
226 'is_contact' => 0,
227 'description' => ts('Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.'),
228 'help_text' => NULL,
229 'settings_pages' => ['contribute' => ['weight' => 20]],
230 ],
231 ];