Commit | Line | Data |
---|---|---|
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> | |
9 | <field> | |
10 | <name>id</name> | |
11 | <type>int unsigned</type> | |
12 | <required>true</required> | |
13 | <comment>ID</comment> | |
6a488035 | 14 | <add>3.2</add> |
3c7d2158 | 15 | </field> |
16 | <primaryKey> | |
17 | <name>id</name> | |
18 | <autoincrement>true</autoincrement> | |
19 | </primaryKey> | |
6a488035 TO |
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> | |
3c7d2158 | 28 | <field> |
29 | <name>contact_id</name> | |
6a488035 TO |
30 | <uniqueName>financial_account_contact_id</uniqueName> |
31 | <title>Contact ID</title> | |
3c7d2158 | 32 | <type>int unsigned</type> |
6a488035 | 33 | <comment>FK to Contact ID that is responsible for the funds in this account</comment> |
3c7d2158 | 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> | |
6a488035 TO |
41 | <onDelete>SET NULL</onDelete> |
42 | </foreignKey> | |
3c7d2158 | 43 | <field> |
44 | <name>account_type_id</name> | |
45 | <type>int unsigned</type> | |
46 | <required>true</required> | |
47 | <add>3.2</add> | |
6a488035 | 48 | <drop>4.3</drop> |
3c7d2158 | 49 | </field> |
50 | <field> | |
51 | <name>financial_account_type_id</name> | |
52 | <type>int unsigned</type> | |
53 | <required>true</required> | |
54 | <default>3</default> | |
6a488035 TO |
55 | <add>4.3</add> |
56 | <comment>pseudo FK into civicrm_option_value.</comment> | |
7611ae71 AS |
57 | <pseudoconstant> |
58 | <optionGroupName>financial_account_type</optionGroupName> | |
59 | </pseudoconstant> | |
614d72ec | 60 | <html> |
61 | <type>Select></type> | |
62 | </html> | |
6a488035 TO |
63 | </field> |
64 | <field> | |
65 | <name>accounting_code</name> | |
66 | <title>Accounting Code</title> | |
67 | <type>varchar</type> | |
68 | <length>64</length> | |
69 | <export>true</export> | |
70 | <comment>Optional value for mapping monies owed and received to accounting system codes.</comment> | |
71 | <add>4.3</add> | |
72 | </field> | |
73 | <field> | |
74 | <name>account_type_code</name> | |
75 | <title>Account Type Code</title> | |
76 | <type>varchar</type> | |
77 | <length>64</length> | |
78 | <export>true</export> | |
79 | <comment>Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).</comment> | |
80 | <add>4.3</add> | |
81 | </field> | |
82 | <field> | |
83 | <name>description</name> | |
84 | <type>varchar</type> | |
85 | <length>255</length> | |
86 | <comment>Financial Type Description.</comment> | |
87 | <add>4.3</add> | |
88 | </field> | |
89 | <field> | |
90 | <name>parent_id</name> | |
3c7d2158 | 91 | <type>int unsigned</type> |
92 | <comment>Parent ID in account hierarchy</comment> | |
6a488035 TO |
93 | <add>4.3</add> |
94 | </field> | |
3c7d2158 | 95 | <foreignKey> |
96 | <name>parent_id</name> | |
97 | <table>civicrm_financial_account</table> | |
98 | <key>id</key> | |
99 | <add>4.3</add> | |
6a488035 TO |
100 | </foreignKey> |
101 | <field> | |
102 | <name>is_header_account</name> | |
3c7d2158 | 103 | <type>boolean</type> |
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> | |
6a488035 TO |
106 | <add>4.3</add> |
107 | </field> | |
108 | <field> | |
109 | <name>is_deductible</name> | |
110 | <type>boolean</type> | |
111 | <default>1</default> | |
112 | <comment>Is this account tax-deductible?</comment> | |
113 | <add>4.3</add> | |
114 | </field> | |
115 | <field> | |
116 | <name>is_tax</name> | |
117 | <type>boolean</type> | |
118 | <default>0</default> | |
119 | <comment>Is this account for taxes?</comment> | |
120 | <add>4.3</add> | |
121 | </field> | |
122 | <field> | |
123 | <name>tax_rate</name> | |
124 | <type>decimal</type> | |
d544ffee | 125 | <length>10,8</length> |
6a488035 TO |
126 | <comment>The percentage of the total_amount that is due for this tax.</comment> |
127 | <add>4.3</add> | |
128 | </field> | |
129 | <field> | |
130 | <name>is_reserved</name> | |
131 | <type>boolean</type> | |
132 | <comment>Is this a predefined system object?</comment> | |
133 | <add>4.3</add> | |
134 | </field> | |
135 | <field> | |
136 | <name>is_active</name> | |
137 | <type>boolean</type> | |
138 | <comment>Is this property active?</comment> | |
139 | <add>4.3</add> | |
140 | </field> | |
141 | <field> | |
142 | <name>is_default</name> | |
143 | <type>boolean</type> | |
144 | <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment> | |
145 | <add>4.3</add> | |
146 | </field> | |
147 | <index> | |
148 | <name>UI_name</name> | |
149 | <fieldName>name</fieldName> | |
150 | <unique>true</unique> | |
151 | <add>4.3</add> | |
152 | </index> | |
153 | </table> |