Merge pull request #15818 from colemanw/fields
[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' => 'CVV required for backoffice?',
31 'is_domain' => 1,
32 'is_contact' => 0,
33 'description' => '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' => 'Contribution Invoice Settings',
54 'is_domain' => 1,
55 'is_contact' => 0,
56 'description' => NULL,
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' => 'Enable Tax and Invoicing',
69 'is_domain' => 1,
70 'is_contact' => 0,
71 'on_change' => [
72 'CRM_Invoicing_Utils::onToggle',
73 ],
74 ],
75 'acl_financial_type' => [
76 'group_name' => 'Contribute Preferences',
77 'group' => 'contribute',
78 'name' => 'acl_financial_type',
79 'type' => 'Boolean',
80 'html_type' => 'checkbox',
81 'quick_form_type' => 'Element',
82 'default' => 0,
83 'add' => '4.7',
84 'title' => 'Enable Access Control by Financial Type',
85 'is_domain' => 1,
86 'is_contact' => 0,
87 'description' => NULL,
88 'help_text' => NULL,
89 'help' => ['id' => 'acl_financial_type'],
90 ],
91 'deferred_revenue_enabled' => [
92 'group_name' => 'Contribute Preferences',
93 'group' => 'contribute',
94 'name' => 'deferred_revenue_enabled',
95 'type' => 'Boolean',
96 'html_type' => 'checkbox',
97 'quick_form_type' => 'Element',
98 'default' => 0,
99 'add' => '4.7',
100 'title' => 'Enable Deferred Revenue',
101 'is_domain' => 1,
102 'is_contact' => 0,
103 'description' => NULL,
104 'help_text' => NULL,
105 ],
106 'default_invoice_page' => [
107 'group_name' => 'Contribute Preferences',
108 'group' => 'contribute',
109 'name' => 'default_invoice_page',
110 'type' => 'Integer',
111 'quick_form_type' => 'Select',
112 'default' => NULL,
113 'pseudoconstant' => [
114 // @todo - handle table style pseudoconstants for settings & avoid deprecated function.
115 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
116 ],
117 'html_type' => 'select',
118 'add' => '4.7',
119 'title' => 'Default invoice payment page',
120 'is_domain' => 1,
121 'is_contact' => 0,
122 'description' => NULL,
123 'help_text' => NULL,
124 ],
125 'always_post_to_accounts_receivable' => [
126 'group_name' => 'Contribute Preferences',
127 'group' => 'contribute',
128 'name' => 'always_post_to_accounts_receivable',
129 'type' => 'Boolean',
130 'html_type' => 'checkbox',
131 'quick_form_type' => 'Element',
132 'default' => 0,
133 'add' => '4.7',
134 'title' => 'Always post to Accounts Receivable?',
135 'is_domain' => 1,
136 'is_contact' => 0,
137 'description' => NULL,
138 'help_text' => NULL,
139 ],
140 'update_contribution_on_membership_type_change' => [
141 'group_name' => 'Contribute Preferences',
142 'group' => 'contribute',
143 'name' => 'update_contribution_on_membership_type_change',
144 'type' => 'Boolean',
145 'html_type' => 'checkbox',
146 'quick_form_type' => 'Element',
147 'default' => 0,
148 'add' => '4.7',
149 'title' => 'Automatically update related contributions when Membership Type is changed',
150 'is_domain' => 1,
151 'is_contact' => 0,
152 'description' => 'Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.',
153 'help_text' => NULL,
154 ],
155 ];