Merge in 5.48
[civicrm-core.git] / xml / schema / Financial / FinancialAccount.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
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>
9 <component>CiviContribute</component>
10 <field>
11 <name>id</name>
12 <title>Financial Account ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>ID</comment>
16 <html>
17 <type>Number</type>
18 </html>
19 <add>3.2</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>name</name>
27 <title>Financial Account Name</title>
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>
34 <field>
35 <name>contact_id</name>
36 <uniqueName>financial_account_contact_id</uniqueName>
37 <title>Contact ID</title>
38 <type>int unsigned</type>
39 <comment>FK to Contact ID that is responsible for the funds in this account</comment>
40 <html>
41 <label>Contact</label>
42 </html>
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>
50 <onDelete>SET NULL</onDelete>
51 </foreignKey>
52 <field>
53 <name>financial_account_type_id</name>
54 <type>int unsigned</type>
55 <title>Financial Account Type</title>
56 <required>true</required>
57 <default>3</default>
58 <add>4.3</add>
59 <comment>pseudo FK into civicrm_option_value.</comment>
60 <pseudoconstant>
61 <optionGroupName>financial_account_type</optionGroupName>
62 </pseudoconstant>
63 <html>
64 <type>Select</type>
65 </html>
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>
88 <title>Financial Account Description</title>
89 <length>255</length>
90 <comment>Financial Type Description.</comment>
91 <add>4.3</add>
92 </field>
93 <field>
94 <name>parent_id</name>
95 <type>int unsigned</type>
96 <title>Parent ID</title>
97 <comment>Parent ID in account hierarchy</comment>
98 <html>
99 <label>Parent</label>
100 </html>
101 <add>4.3</add>
102 </field>
103 <foreignKey>
104 <name>parent_id</name>
105 <table>civicrm_financial_account</table>
106 <key>id</key>
107 <add>4.3</add>
108 </foreignKey>
109 <field>
110 <name>is_header_account</name>
111 <type>boolean</type>
112 <title>Header Financial Account?</title>
113 <default>0</default>
114 <comment>Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?</comment>
115 <add>4.3</add>
116 </field>
117 <field>
118 <name>is_deductible</name>
119 <type>boolean</type>
120 <title>Deductible Financial Account?</title>
121 <default>1</default>
122 <comment>Is this account tax-deductible?</comment>
123 <add>4.3</add>
124 </field>
125 <field>
126 <name>is_tax</name>
127 <type>boolean</type>
128 <title>Tax Financial Account?</title>
129 <default>0</default>
130 <comment>Is this account for taxes?</comment>
131 <add>4.3</add>
132 </field>
133 <field>
134 <name>tax_rate</name>
135 <type>decimal</type>
136 <title>Financial Account Tax Rate</title>
137 <length>10,8</length>
138 <comment>The percentage of the total_amount that is due for this tax.</comment>
139 <add>4.3</add>
140 </field>
141 <field>
142 <name>is_reserved</name>
143 <type>boolean</type>
144 <title>Reserved Financial Account?</title>
145 <comment>Is this a predefined system object?</comment>
146 <add>4.3</add>
147 </field>
148 <field>
149 <name>is_active</name>
150 <type>boolean</type>
151 <title>Financial Account is Active</title>
152 <comment>Is this property active?</comment>
153 <add>4.3</add>
154 </field>
155 <field>
156 <name>is_default</name>
157 <type>boolean</type>
158 <title>Default Financial Account</title>
159 <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment>
160 <add>4.3</add>
161 </field>
162 <index>
163 <name>UI_name</name>
164 <fieldName>name</fieldName>
165 <unique>true</unique>
166 <add>4.3</add>
167 </index>
168 </table>