Merge pull request #23232 from braders/nodefaults-tab-links
[civicrm-core.git] / xml / schema / Financial / FinancialAccount.xml
CommitLineData
3c7d2158 1<?xml version="1.0" encoding="iso-8859-1" ?>
6a488035 2
3c7d2158 3<table>
4 <base>CRM/Financial</base>
5 <class>FinancialAccount</class>
6 <name>civicrm_financial_account</name>
7 <add>3.2</add>
8 <log>true</log>
d31fb4e3 9 <component>CiviContribute</component>
3c7d2158 10 <field>
11 <name>id</name>
32ac94e8 12 <title>Financial Account ID</title>
3c7d2158 13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>ID</comment>
0481e12c
A
16 <html>
17 <type>Number</type>
18 </html>
6a488035 19 <add>3.2</add>
3c7d2158 20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
6a488035
TO
25 <field>
26 <name>name</name>
32ac94e8 27 <title>Financial Account Name</title>
6a488035
TO
28 <type>varchar</type>
29 <length>255</length>
30 <required>true</required>
31 <comment>Financial Account Name.</comment>
32 <add>3.2</add>
33 </field>
3c7d2158 34 <field>
35 <name>contact_id</name>
6a488035
TO
36 <uniqueName>financial_account_contact_id</uniqueName>
37 <title>Contact ID</title>
3c7d2158 38 <type>int unsigned</type>
6a488035 39 <comment>FK to Contact ID that is responsible for the funds in this account</comment>
57e94608
A
40 <html>
41 <label>Contact</label>
42 </html>
3c7d2158 43 <add>4.3</add>
44 </field>
45 <foreignKey>
46 <name>contact_id</name>
47 <table>civicrm_contact</table>
48 <key>id</key>
49 <add>4.3</add>
6a488035
TO
50 <onDelete>SET NULL</onDelete>
51 </foreignKey>
3c7d2158 52 <field>
53 <name>financial_account_type_id</name>
54 <type>int unsigned</type>
83396bf9 55 <title>Financial Account Type</title>
3c7d2158 56 <required>true</required>
57 <default>3</default>
6a488035
TO
58 <add>4.3</add>
59 <comment>pseudo FK into civicrm_option_value.</comment>
7611ae71
AS
60 <pseudoconstant>
61 <optionGroupName>financial_account_type</optionGroupName>
62 </pseudoconstant>
614d72ec 63 <html>
e0991796 64 <type>Select</type>
614d72ec 65 </html>
6a488035
TO
66 </field>
67 <field>
68 <name>accounting_code</name>
69 <title>Accounting Code</title>
70 <type>varchar</type>
71 <length>64</length>
72 <export>true</export>
73 <comment>Optional value for mapping monies owed and received to accounting system codes.</comment>
74 <add>4.3</add>
75 </field>
76 <field>
77 <name>account_type_code</name>
78 <title>Account Type Code</title>
79 <type>varchar</type>
80 <length>64</length>
81 <export>true</export>
82 <comment>Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).</comment>
83 <add>4.3</add>
84 </field>
85 <field>
86 <name>description</name>
87 <type>varchar</type>
83396bf9 88 <title>Financial Account Description</title>
6a488035
TO
89 <length>255</length>
90 <comment>Financial Type Description.</comment>
91 <add>4.3</add>
92 </field>
93 <field>
94 <name>parent_id</name>
3c7d2158 95 <type>int unsigned</type>
047c5009 96 <title>Parent ID</title>
3c7d2158 97 <comment>Parent ID in account hierarchy</comment>
57e94608 98 <html>
047c5009 99 <label>Parent</label>
57e94608 100 </html>
6a488035
TO
101 <add>4.3</add>
102 </field>
3c7d2158 103 <foreignKey>
104 <name>parent_id</name>
105 <table>civicrm_financial_account</table>
106 <key>id</key>
107 <add>4.3</add>
6a488035
TO
108 </foreignKey>
109 <field>
110 <name>is_header_account</name>
3c7d2158 111 <type>boolean</type>
83396bf9 112 <title>Header Financial Account?</title>
3c7d2158 113 <default>0</default>
efc59a33 114 <required>true</required>
3c7d2158 115 <comment>Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?</comment>
6a488035
TO
116 <add>4.3</add>
117 </field>
118 <field>
119 <name>is_deductible</name>
120 <type>boolean</type>
83396bf9 121 <title>Deductible Financial Account?</title>
efc59a33
CW
122 <default>0</default>
123 <required>true</required>
6a488035
TO
124 <comment>Is this account tax-deductible?</comment>
125 <add>4.3</add>
126 </field>
127 <field>
128 <name>is_tax</name>
129 <type>boolean</type>
83396bf9 130 <title>Tax Financial Account?</title>
6a488035 131 <default>0</default>
efc59a33 132 <required>true</required>
6a488035
TO
133 <comment>Is this account for taxes?</comment>
134 <add>4.3</add>
135 </field>
136 <field>
137 <name>tax_rate</name>
138 <type>decimal</type>
83396bf9 139 <title>Financial Account Tax Rate</title>
d544ffee 140 <length>10,8</length>
6a488035
TO
141 <comment>The percentage of the total_amount that is due for this tax.</comment>
142 <add>4.3</add>
143 </field>
144 <field>
145 <name>is_reserved</name>
146 <type>boolean</type>
83396bf9 147 <title>Reserved Financial Account?</title>
6a488035 148 <comment>Is this a predefined system object?</comment>
efc59a33
CW
149 <default>0</default>
150 <required>true</required>
6a488035
TO
151 <add>4.3</add>
152 </field>
153 <field>
154 <name>is_active</name>
155 <type>boolean</type>
83396bf9 156 <title>Financial Account is Active</title>
6a488035 157 <comment>Is this property active?</comment>
efc59a33
CW
158 <default>1</default>
159 <required>true</required>
6a488035
TO
160 <add>4.3</add>
161 </field>
162 <field>
163 <name>is_default</name>
164 <type>boolean</type>
83396bf9 165 <title>Default Financial Account</title>
6a488035 166 <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment>
efc59a33
CW
167 <default>0</default>
168 <required>true</required>
6a488035
TO
169 <add>4.3</add>
170 </field>
171 <index>
172 <name>UI_name</name>
173 <fieldName>name</fieldName>
174 <unique>true</unique>
175 <add>4.3</add>
176 </index>
177</table>