Merge pull request #20121 from colemanw/l10nJs
[civicrm-core.git] / xml / schema / Financial / EntityFinancialAccount.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Financial</base>
5 <class>EntityFinancialAccount</class>
6 <name>civicrm_entity_financial_account</name>
7 <add>4.3</add>
8 <comment>Map between an entity and a financial account, where there is a specific relationship between the financial account and the entity, e.g. Income Account for or AR Account for</comment>
9 <log>true</log>
10 <component>CiviContribute</component>
11 <field>
12 <name>id</name>
13 <title>Entity Financial Account ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>ID</comment>
17 <html>
18 <type>Number</type>
19 </html>
20 <add>4.3</add>
21 </field>
22 <primaryKey>
23 <name>id</name>
24 <autoincrement>true</autoincrement>
25 </primaryKey>
26 <field>
27 <name>entity_table</name>
28 <title>Entity Table</title>
29 <type>varchar</type>
30 <length>64</length>
31 <required>true</required>
32 <import>true</import>
33 <add>4.3</add>
34 <comment>Links to an entity_table like civicrm_financial_type</comment>
35 <pseudoconstant>
36 <callback>CRM_Financial_BAO_EntityFinancialAccount::entityTables</callback>
37 </pseudoconstant>
38 </field>
39 <field>
40 <name>entity_id</name>
41 <title>Entity ID</title>
42 <type>int unsigned</type>
43 <required>true</required>
44 <add>4.3</add>
45 <comment>Links to an id in the entity_table, such as vid in civicrm_financial_type</comment>
46 </field>
47 <dynamicForeignKey>
48 <idColumn>entity_id</idColumn>
49 <typeColumn>entity_table</typeColumn>
50 <add>4.3</add>
51 </dynamicForeignKey>
52 <field>
53 <name>account_relationship</name>
54 <title>Account Relationship</title>
55 <type>int unsigned</type>
56 <required>true</required>
57 <add>4.3</add>
58 <comment>FK to a new civicrm_option_value (account_relationship)</comment>
59 <pseudoconstant>
60 <optionGroupName>account_relationship</optionGroupName>
61 </pseudoconstant>
62 <html>
63 <type>Select</type>
64 </html>
65 </field>
66 <field>
67 <name>financial_account_id</name>
68 <type>int unsigned</type>
69 <title>Financial Account ID</title>
70 <required>true</required>
71 <add>4.3</add>
72 <comment>FK to the financial_account_id</comment>
73 <pseudoconstant>
74 <table>civicrm_financial_account</table>
75 <keyColumn>id</keyColumn>
76 <labelColumn>name</labelColumn>
77 </pseudoconstant>
78 <html>
79 <type>Select</type>
80 <label>Financial Account</label>
81 </html>
82 </field>
83 <foreignKey>
84 <name>financial_account_id</name>
85 <table>civicrm_financial_account</table>
86 <key>id</key>
87 <add>4.3</add>
88 <onDelete>RESTRICT</onDelete>
89 </foreignKey>
90 <index>
91 <name>index_entity_id_entity_table_account_relationship</name>
92 <fieldName>entity_id</fieldName>
93 <fieldName>entity_table</fieldName>
94 <fieldName>account_relationship</fieldName>
95 <unique>true</unique>
96 <add>4.7</add>
97 </index>
98 </table>