Merge pull request #19093 from civicrm/5.32
[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>
d31fb4e3 9 <component>CiviContribute</component>
3c7d2158 10 <field>
11 <name>id</name>
32ac94e8 12 <title>Financial Account ID</title>
3c7d2158 13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>ID</comment>
6a488035 16 <add>3.2</add>
3c7d2158 17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
6a488035
TO
22 <field>
23 <name>name</name>
32ac94e8 24 <title>Financial Account Name</title>
6a488035
TO
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>
3c7d2158 31 <field>
32 <name>contact_id</name>
6a488035
TO
33 <uniqueName>financial_account_contact_id</uniqueName>
34 <title>Contact ID</title>
3c7d2158 35 <type>int unsigned</type>
6a488035 36 <comment>FK to Contact ID that is responsible for the funds in this account</comment>
3c7d2158 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>
6a488035
TO
44 <onDelete>SET NULL</onDelete>
45 </foreignKey>
3c7d2158 46 <field>
47 <name>financial_account_type_id</name>
48 <type>int unsigned</type>
83396bf9 49 <title>Financial Account Type</title>
3c7d2158 50 <required>true</required>
51 <default>3</default>
6a488035
TO
52 <add>4.3</add>
53 <comment>pseudo FK into civicrm_option_value.</comment>
7611ae71
AS
54 <pseudoconstant>
55 <optionGroupName>financial_account_type</optionGroupName>
56 </pseudoconstant>
614d72ec 57 <html>
e0991796 58 <type>Select</type>
614d72ec 59 </html>
6a488035
TO
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>
83396bf9 82 <title>Financial Account Description</title>
6a488035
TO
83 <length>255</length>
84 <comment>Financial Type Description.</comment>
85 <add>4.3</add>
86 </field>
87 <field>
88 <name>parent_id</name>
3c7d2158 89 <type>int unsigned</type>
83396bf9 90 <title>Financial Account Parent</title>
3c7d2158 91 <comment>Parent ID in account hierarchy</comment>
6a488035
TO
92 <add>4.3</add>
93 </field>
3c7d2158 94 <foreignKey>
95 <name>parent_id</name>
96 <table>civicrm_financial_account</table>
97 <key>id</key>
98 <add>4.3</add>
6a488035
TO
99 </foreignKey>
100 <field>
101 <name>is_header_account</name>
3c7d2158 102 <type>boolean</type>
83396bf9 103 <title>Header Financial Account?</title>
3c7d2158 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>
83396bf9 111 <title>Deductible Financial Account?</title>
6a488035
TO
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>
83396bf9 119 <title>Tax Financial Account?</title>
6a488035
TO
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>
83396bf9 127 <title>Financial Account Tax Rate</title>
d544ffee 128 <length>10,8</length>
6a488035
TO
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>
83396bf9 135 <title>Reserved Financial Account?</title>
6a488035
TO
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>
83396bf9 142 <title>Financial Account is Active</title>
6a488035
TO
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>
83396bf9 149 <title>Default Financial Account</title>
6a488035
TO
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>