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