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