dev/core#1558 Data conversion for non-standard setting.
[civicrm-core.git] / settings / Contribute.setting.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
6b7eb9df 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
6b7eb9df
TO
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 |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
f299f7db 15 * @copyright CiviCRM LLC (c) 2004-2020
6a488035 16 *
6a488035
TO
17 * Settings metadata file
18 */
19
dfe1f88a
CW
20return [
21 'cvv_backoffice_required' => [
6a488035
TO
22 'group_name' => 'Contribute Preferences',
23 'group' => 'contribute',
24 'name' => 'cvv_backoffice_required',
25 'type' => 'Boolean',
2f6c641a 26 'html_type' => 'radio',
6a488035
TO
27 'quick_form_type' => 'YesNo',
28 'default' => '1',
29 'add' => '4.1',
af72f92b 30 'title' => ts('CVV required for backoffice?'),
6a488035
TO
31 'is_domain' => 1,
32 'is_contact' => 0,
af72f92b 33 'description' => ts('Is the CVV code required for back office credit card transactions'),
6a488035 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',
dfe1f88a
CW
35 ],
36 'contribution_invoice_settings' => [
2f6c641a 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.
007e3bdc
TO
39 'group_name' => 'Contribute Preferences',
40 'group' => 'contribute',
41 'name' => 'contribution_invoice_settings',
42 'type' => 'Array',
dfe1f88a 43 'default' => [
007e3bdc
TO
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',
dfe1f88a 51 ],
007e3bdc 52 'add' => '4.7',
ff6f993e 53 'title' => ts('Deprecated setting'),
007e3bdc
TO
54 'is_domain' => 1,
55 'is_contact' => 0,
007e3bdc 56 'help_text' => NULL,
dfe1f88a
CW
57 ],
58 'invoicing' => [
201b45e2
PN
59 'group_name' => 'Contribute Preferences',
60 'group' => 'contribute',
61 'name' => 'invoicing',
0e700ee7 62 'type' => 'Boolean',
201b45e2
PN
63 'html_type' => 'checkbox',
64 'quick_form_type' => 'Element',
65 'default' => 0,
66 'add' => '4.7',
af72f92b 67 'title' => ts('Enable Tax and Invoicing'),
201b45e2
PN
68 'is_domain' => 1,
69 'is_contact' => 0,
dfe1f88a 70 'on_change' => [
8d334338 71 'CRM_Invoicing_Utils::onToggle',
dfe1f88a
CW
72 ],
73 ],
ff6f993e 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 ],
dfe1f88a 165 'acl_financial_type' => [
201b45e2
PN
166 'group_name' => 'Contribute Preferences',
167 'group' => 'contribute',
168 'name' => 'acl_financial_type',
0e700ee7 169 'type' => 'Boolean',
201b45e2
PN
170 'html_type' => 'checkbox',
171 'quick_form_type' => 'Element',
172 'default' => 0,
173 'add' => '4.7',
af72f92b 174 'title' => ts('Enable Access Control by Financial Type'),
201b45e2
PN
175 'is_domain' => 1,
176 'is_contact' => 0,
201b45e2 177 'help_text' => NULL,
969afb18 178 'help' => ['id' => 'acl_financial_type'],
dfe1f88a
CW
179 ],
180 'deferred_revenue_enabled' => [
201b45e2
PN
181 'group_name' => 'Contribute Preferences',
182 'group' => 'contribute',
183 'name' => 'deferred_revenue_enabled',
0e700ee7 184 'type' => 'Boolean',
201b45e2
PN
185 'html_type' => 'checkbox',
186 'quick_form_type' => 'Element',
187 'default' => 0,
188 'add' => '4.7',
af72f92b 189 'title' => ts('Enable Deferred Revenue'),
201b45e2
PN
190 'is_domain' => 1,
191 'is_contact' => 0,
201b45e2 192 'help_text' => NULL,
dfe1f88a
CW
193 ],
194 'default_invoice_page' => [
201b45e2
PN
195 'group_name' => 'Contribute Preferences',
196 'group' => 'contribute',
197 'name' => 'default_invoice_page',
198 'type' => 'Integer',
0e700ee7 199 'quick_form_type' => 'Select',
201b45e2 200 'default' => NULL,
dfe1f88a 201 'pseudoconstant' => [
33b93c35 202 // @todo - handle table style pseudoconstants for settings & avoid deprecated function.
203 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
dfe1f88a 204 ],
201b45e2
PN
205 'html_type' => 'select',
206 'add' => '4.7',
af72f92b 207 'title' => ts('Default invoice payment page'),
201b45e2
PN
208 'is_domain' => 1,
209 'is_contact' => 0,
201b45e2 210 'help_text' => NULL,
dfe1f88a
CW
211 ],
212 'always_post_to_accounts_receivable' => [
4af9c91d
PN
213 'group_name' => 'Contribute Preferences',
214 'group' => 'contribute',
215 'name' => 'always_post_to_accounts_receivable',
0e700ee7 216 'type' => 'Boolean',
4af9c91d
PN
217 'html_type' => 'checkbox',
218 'quick_form_type' => 'Element',
219 'default' => 0,
220 'add' => '4.7',
af72f92b 221 'title' => ts('Always post to Accounts Receivable?'),
4af9c91d
PN
222 'is_domain' => 1,
223 'is_contact' => 0,
4af9c91d 224 'help_text' => NULL,
dfe1f88a
CW
225 ],
226 'update_contribution_on_membership_type_change' => [
268a84f2 227 'group_name' => 'Contribute Preferences',
228 'group' => 'contribute',
229 'name' => 'update_contribution_on_membership_type_change',
0e700ee7 230 'type' => 'Boolean',
268a84f2 231 'html_type' => 'checkbox',
232 'quick_form_type' => 'Element',
233 'default' => 0,
234 'add' => '4.7',
af72f92b 235 'title' => ts('Automatically update related contributions when Membership Type is changed'),
268a84f2 236 'is_domain' => 1,
237 'is_contact' => 0,
af72f92b 238 'description' => ts('Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.'),
268a84f2 239 'help_text' => NULL,
dfe1f88a
CW
240 ],
241];