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