Merge pull request #17187 from alexymik/recur_contribution_source
[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',
71bbdae1 35 'settings_pages' => ['contribute' => ['weight' => 10]],
dfe1f88a
CW
36 ],
37 'contribution_invoice_settings' => [
2f6c641a 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.
007e3bdc
TO
40 'group_name' => 'Contribute Preferences',
41 'group' => 'contribute',
42 'name' => 'contribution_invoice_settings',
43 'type' => 'Array',
dfe1f88a 44 'default' => [
007e3bdc
TO
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',
dfe1f88a 52 ],
007e3bdc 53 'add' => '4.7',
ff6f993e 54 'title' => ts('Deprecated setting'),
007e3bdc
TO
55 'is_domain' => 1,
56 'is_contact' => 0,
007e3bdc 57 'help_text' => NULL,
dfe1f88a
CW
58 ],
59 'invoicing' => [
201b45e2
PN
60 'group_name' => 'Contribute Preferences',
61 'group' => 'contribute',
62 'name' => 'invoicing',
0e700ee7 63 'type' => 'Boolean',
201b45e2
PN
64 'html_type' => 'checkbox',
65 'quick_form_type' => 'Element',
66 'default' => 0,
67 'add' => '4.7',
af72f92b 68 'title' => ts('Enable Tax and Invoicing'),
201b45e2
PN
69 'is_domain' => 1,
70 'is_contact' => 0,
dfe1f88a 71 'on_change' => [
8d334338 72 'CRM_Invoicing_Utils::onToggle',
dfe1f88a 73 ],
71bbdae1 74 'settings_pages' => ['contribute' => ['weight' => 90]],
dfe1f88a 75 ],
ff6f993e 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 ],
dfe1f88a 152 'acl_financial_type' => [
201b45e2
PN
153 'group_name' => 'Contribute Preferences',
154 'group' => 'contribute',
155 'name' => 'acl_financial_type',
0e700ee7 156 'type' => 'Boolean',
201b45e2
PN
157 'html_type' => 'checkbox',
158 'quick_form_type' => 'Element',
159 'default' => 0,
160 'add' => '4.7',
af72f92b 161 'title' => ts('Enable Access Control by Financial Type'),
201b45e2
PN
162 'is_domain' => 1,
163 'is_contact' => 0,
201b45e2 164 'help_text' => NULL,
969afb18 165 'help' => ['id' => 'acl_financial_type'],
71bbdae1 166 'settings_pages' => ['contribute' => ['weight' => 30]],
dfe1f88a
CW
167 ],
168 'deferred_revenue_enabled' => [
201b45e2
PN
169 'group_name' => 'Contribute Preferences',
170 'group' => 'contribute',
171 'name' => 'deferred_revenue_enabled',
0e700ee7 172 'type' => 'Boolean',
201b45e2
PN
173 'html_type' => 'checkbox',
174 'quick_form_type' => 'Element',
175 'default' => 0,
176 'add' => '4.7',
af72f92b 177 'title' => ts('Enable Deferred Revenue'),
201b45e2
PN
178 'is_domain' => 1,
179 'is_contact' => 0,
201b45e2 180 'help_text' => NULL,
71bbdae1 181 'settings_pages' => ['contribute' => ['weight' => 50]],
dfe1f88a
CW
182 ],
183 'default_invoice_page' => [
201b45e2
PN
184 'group_name' => 'Contribute Preferences',
185 'group' => 'contribute',
186 'name' => 'default_invoice_page',
187 'type' => 'Integer',
0e700ee7 188 'quick_form_type' => 'Select',
201b45e2 189 'default' => NULL,
dfe1f88a 190 'pseudoconstant' => [
356013b6 191 'table' => 'civicrm_contribution_page',
192 'keyColumn' => 'id',
193 'labelColumn' => 'title',
dfe1f88a 194 ],
201b45e2
PN
195 'html_type' => 'select',
196 'add' => '4.7',
af72f92b 197 'title' => ts('Default invoice payment page'),
201b45e2
PN
198 'is_domain' => 1,
199 'is_contact' => 0,
201b45e2 200 'help_text' => NULL,
71bbdae1 201 'settings_pages' => ['contribute' => ['weight' => 70]],
dfe1f88a
CW
202 ],
203 'always_post_to_accounts_receivable' => [
4af9c91d
PN
204 'group_name' => 'Contribute Preferences',
205 'group' => 'contribute',
206 'name' => 'always_post_to_accounts_receivable',
0e700ee7 207 'type' => 'Boolean',
4af9c91d
PN
208 'html_type' => 'checkbox',
209 'quick_form_type' => 'Element',
210 'default' => 0,
211 'add' => '4.7',
af72f92b 212 'title' => ts('Always post to Accounts Receivable?'),
4af9c91d
PN
213 'is_domain' => 1,
214 'is_contact' => 0,
4af9c91d 215 'help_text' => NULL,
71bbdae1 216 'settings_pages' => ['contribute' => ['weight' => 40]],
dfe1f88a
CW
217 ],
218 'update_contribution_on_membership_type_change' => [
268a84f2 219 'group_name' => 'Contribute Preferences',
220 'group' => 'contribute',
221 'name' => 'update_contribution_on_membership_type_change',
0e700ee7 222 'type' => 'Boolean',
268a84f2 223 'html_type' => 'checkbox',
224 'quick_form_type' => 'Element',
225 'default' => 0,
226 'add' => '4.7',
af72f92b 227 'title' => ts('Automatically update related contributions when Membership Type is changed'),
268a84f2 228 'is_domain' => 1,
229 'is_contact' => 0,
af72f92b 230 'description' => ts('Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.'),
268a84f2 231 'help_text' => NULL,
71bbdae1 232 'settings_pages' => ['contribute' => ['weight' => 20]],
dfe1f88a
CW
233 ],
234];