Contribute.setting.php 6.07 KB
Newer Older
totten's avatar
totten committed
1 2 3
<?php
/*
 +--------------------------------------------------------------------+
totten's avatar
totten committed
4
 | CiviCRM version 5                                                  |
totten's avatar
totten committed
5
 +--------------------------------------------------------------------+
6
 | Copyright CiviCRM LLC (c) 2004-2019                                |
totten's avatar
totten committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License and the CiviCRM Licensing Exception along                  |
 | with this program; if not, contact CiviCRM LLC                     |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
26
 */
totten's avatar
totten committed
27 28 29 30

/**
 *
 * @package CRM
31
 * @copyright CiviCRM LLC (c) 2004-2019
totten's avatar
totten committed
32 33 34 35
 *
 * Settings metadata file
 */

36 37
return [
  'cvv_backoffice_required' => [
totten's avatar
totten committed
38 39 40 41
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'cvv_backoffice_required',
    'type' => 'Boolean',
42
    'html_type' => 'radio',
totten's avatar
totten committed
43 44 45 46 47 48 49 50
    'quick_form_type' => 'YesNo',
    'default' => '1',
    'add' => '4.1',
    'title' => 'CVV required for backoffice?',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => 'Is the CVV code required for back office credit card transactions',
    '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',
51 52
  ],
  'contribution_invoice_settings' => [
53 54
    // @todo our standard is to have a setting per item not to hide settings in an array with
    // no useful metadata. Undo this setting.
55 56 57 58
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'contribution_invoice_settings',
    'type' => 'Array',
59
    'default' => [
60 61 62 63 64 65 66
      'invoice_prefix' => 'INV_',
      'credit_notes_prefix' => 'CN_',
      'due_date' => '10',
      'due_date_period' => 'days',
      'notes' => '',
      'tax_term' => 'Sales Tax',
      'tax_display_settings' => 'Inclusive',
67
    ],
68 69 70 71 72 73
    'add' => '4.7',
    'title' => 'Contribution Invoice Settings',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => NULL,
    'help_text' => NULL,
74 75
  ],
  'invoicing' => [
76 77 78
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'invoicing',
79
    'type' => 'Boolean',
80 81 82 83 84 85 86
    'html_type' => 'checkbox',
    'quick_form_type' => 'Element',
    'default' => 0,
    'add' => '4.7',
    'title' => 'Enable Tax and Invoicing',
    'is_domain' => 1,
    'is_contact' => 0,
87
    'on_change' => [
88
      'CRM_Invoicing_Utils::onToggle',
89 90 91
    ],
  ],
  'acl_financial_type' => [
92 93 94
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'acl_financial_type',
95
    'type' => 'Boolean',
96 97 98 99 100 101 102 103 104
    'html_type' => 'checkbox',
    'quick_form_type' => 'Element',
    'default' => 0,
    'add' => '4.7',
    'title' => 'Enable Access Control by Financial Type',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => NULL,
    'help_text' => NULL,
eileen's avatar
eileen committed
105
    'help' => ['id' => 'acl_financial_type'],
106 107
  ],
  'deferred_revenue_enabled' => [
108 109 110
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'deferred_revenue_enabled',
111
    'type' => 'Boolean',
112 113 114 115 116 117 118 119 120
    'html_type' => 'checkbox',
    'quick_form_type' => 'Element',
    'default' => 0,
    'add' => '4.7',
    'title' => 'Enable Deferred Revenue',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => NULL,
    'help_text' => NULL,
121 122
  ],
  'default_invoice_page' => [
123 124 125 126
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'default_invoice_page',
    'type' => 'Integer',
127
    'quick_form_type' => 'Select',
128
    'default' => NULL,
129
    'pseudoconstant' => [
130 131
      // @todo - handle table style pseudoconstants for settings & avoid deprecated function.
      'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
132
    ],
133 134 135 136 137 138 139
    'html_type' => 'select',
    'add' => '4.7',
    'title' => 'Default invoice payment page',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => NULL,
    'help_text' => NULL,
140 141
  ],
  'always_post_to_accounts_receivable' => [
142 143 144
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'always_post_to_accounts_receivable',
145
    'type' => 'Boolean',
146 147 148 149
    'html_type' => 'checkbox',
    'quick_form_type' => 'Element',
    'default' => 0,
    'add' => '4.7',
150
    'title' => 'Always post to Accounts Receivable?',
151 152 153 154
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => NULL,
    'help_text' => NULL,
155 156
  ],
  'update_contribution_on_membership_type_change' => [
157 158 159
    'group_name' => 'Contribute Preferences',
    'group' => 'contribute',
    'name' => 'update_contribution_on_membership_type_change',
160
    'type' => 'Boolean',
161 162 163 164 165 166 167 168 169
    'html_type' => 'checkbox',
    'quick_form_type' => 'Element',
    'default' => 0,
    'add' => '4.7',
    'title' => 'Automatically update related contributions when Membership Type is changed',
    'is_domain' => 1,
    'is_contact' => 0,
    'description' => 'Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.',
    'help_text' => NULL,
170 171
  ],
];