Merge pull request #18939 from colemanw/serializeFix
[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 <add>3.2</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>name</name>
24 <title>Financial Account Name</title>
25 <type>varchar</type>
26 <length>255</length>
27 <required>true</required>
28 <comment>Financial Account Name.</comment>
29 <add>3.2</add>
30 </field>
31 <field>
32 <name>contact_id</name>
33 <uniqueName>financial_account_contact_id</uniqueName>
34 <title>Contact ID</title>
35 <type>int unsigned</type>
36 <comment>FK to Contact ID that is responsible for the funds in this account</comment>
37 <add>4.3</add>
38 </field>
39 <foreignKey>
40 <name>contact_id</name>
41 <table>civicrm_contact</table>
42 <key>id</key>
43 <add>4.3</add>
44 <onDelete>SET NULL</onDelete>
45 </foreignKey>
46 <field>
47 <name>financial_account_type_id</name>
48 <type>int unsigned</type>
49 <title>Financial Account Type</title>
50 <required>true</required>
51 <default>3</default>
52 <add>4.3</add>
53 <comment>pseudo FK into civicrm_option_value.</comment>
54 <pseudoconstant>
55 <optionGroupName>financial_account_type</optionGroupName>
56 </pseudoconstant>
57 <html>
58 <type>Select</type>
59 </html>
60 </field>
61 <field>
62 <name>accounting_code</name>
63 <title>Accounting Code</title>
64 <type>varchar</type>
65 <length>64</length>
66 <export>true</export>
67 <comment>Optional value for mapping monies owed and received to accounting system codes.</comment>
68 <add>4.3</add>
69 </field>
70 <field>
71 <name>account_type_code</name>
72 <title>Account Type Code</title>
73 <type>varchar</type>
74 <length>64</length>
75 <export>true</export>
76 <comment>Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).</comment>
77 <add>4.3</add>
78 </field>
79 <field>
80 <name>description</name>
81 <type>varchar</type>
82 <title>Financial Account Description</title>
83 <length>255</length>
84 <comment>Financial Type Description.</comment>
85 <add>4.3</add>
86 </field>
87 <field>
88 <name>parent_id</name>
89 <type>int unsigned</type>
90 <title>Financial Account Parent</title>
91 <comment>Parent ID in account hierarchy</comment>
92 <add>4.3</add>
93 </field>
94 <foreignKey>
95 <name>parent_id</name>
96 <table>civicrm_financial_account</table>
97 <key>id</key>
98 <add>4.3</add>
99 </foreignKey>
100 <field>
101 <name>is_header_account</name>
102 <type>boolean</type>
103 <title>Header Financial Account?</title>
104 <default>0</default>
105 <comment>Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?</comment>
106 <add>4.3</add>
107 </field>
108 <field>
109 <name>is_deductible</name>
110 <type>boolean</type>
111 <title>Deductible Financial Account?</title>
112 <default>1</default>
113 <comment>Is this account tax-deductible?</comment>
114 <add>4.3</add>
115 </field>
116 <field>
117 <name>is_tax</name>
118 <type>boolean</type>
119 <title>Tax Financial Account?</title>
120 <default>0</default>
121 <comment>Is this account for taxes?</comment>
122 <add>4.3</add>
123 </field>
124 <field>
125 <name>tax_rate</name>
126 <type>decimal</type>
127 <title>Financial Account Tax Rate</title>
128 <length>10,8</length>
129 <comment>The percentage of the total_amount that is due for this tax.</comment>
130 <add>4.3</add>
131 </field>
132 <field>
133 <name>is_reserved</name>
134 <type>boolean</type>
135 <title>Reserved Financial Account?</title>
136 <comment>Is this a predefined system object?</comment>
137 <add>4.3</add>
138 </field>
139 <field>
140 <name>is_active</name>
141 <type>boolean</type>
142 <title>Financial Account is Active</title>
143 <comment>Is this property active?</comment>
144 <add>4.3</add>
145 </field>
146 <field>
147 <name>is_default</name>
148 <type>boolean</type>
149 <title>Default Financial Account</title>
150 <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment>
151 <add>4.3</add>
152 </field>
153 <index>
154 <name>UI_name</name>
155 <fieldName>name</fieldName>
156 <unique>true</unique>
157 <add>4.3</add>
158 </index>
159 </table>