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>EntityFinancialAccount</class> | |
6 | <name>civicrm_entity_financial_account</name> | |
6a488035 TO |
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> | |
3c7d2158 | 9 | <log>true</log> |
d31fb4e3 | 10 | <component>CiviContribute</component> |
3c7d2158 | 11 | <field> |
12 | <name>id</name> | |
f3ea5182 | 13 | <title>Entity Financial Account ID</title> |
3c7d2158 | 14 | <type>int unsigned</type> |
15 | <required>true</required> | |
16 | <comment>ID</comment> | |
17 | <add>4.3</add> | |
18 | </field> | |
19 | <primaryKey> | |
20 | <name>id</name> | |
21 | <autoincrement>true</autoincrement> | |
22 | </primaryKey> | |
6a488035 TO |
23 | <field> |
24 | <name>entity_table</name> | |
f3ea5182 | 25 | <title>Entity Table</title> |
6a488035 TO |
26 | <type>varchar</type> |
27 | <length>64</length> | |
3c7d2158 | 28 | <required>true</required> |
6a488035 TO |
29 | <import>true</import> |
30 | <add>4.3</add> | |
31 | <comment>Links to an entity_table like civicrm_financial_type</comment> | |
32 | </field> | |
3c7d2158 | 33 | <field> |
34 | <name>entity_id</name> | |
f3ea5182 | 35 | <title>Entity ID</title> |
3c7d2158 | 36 | <type>int unsigned</type> |
37 | <required>true</required> | |
6a488035 TO |
38 | <add>4.3</add> |
39 | <comment>Links to an id in the entity_table, such as vid in civicrm_financial_type</comment> | |
40 | </field> | |
fa6ace1a | 41 | <dynamicForeignKey> |
71e5aa5c ARW |
42 | <idColumn>entity_id</idColumn> |
43 | <typeColumn>entity_table</typeColumn> | |
44 | <add>4.3</add> | |
45 | </dynamicForeignKey> | |
3c7d2158 | 46 | <field> |
47 | <name>account_relationship</name> | |
f3ea5182 | 48 | <title>Account Relationship</title> |
3c7d2158 | 49 | <type>int unsigned</type> |
6a488035 | 50 | <required>true</required> |
3c7d2158 | 51 | <add>4.3</add> |
6a488035 | 52 | <comment>FK to a new civicrm_option_value (account_relationship)</comment> |
7611ae71 AS |
53 | <pseudoconstant> |
54 | <optionGroupName>account_relationship</optionGroupName> | |
55 | </pseudoconstant> | |
614d72ec | 56 | <html> |
e0991796 | 57 | <type>Select</type> |
614d72ec | 58 | </html> |
3c7d2158 | 59 | </field> |
6a488035 | 60 | <field> |
3c7d2158 | 61 | <name>financial_account_id</name> |
62 | <type>int unsigned</type> | |
f3ea5182 | 63 | <title>Financial Account</title> |
6a488035 | 64 | <required>true</required> |
3c7d2158 | 65 | <add>4.3</add> |
6a488035 | 66 | <comment>FK to the financial_account_id</comment> |
7611ae71 AS |
67 | <pseudoconstant> |
68 | <table>civicrm_financial_account</table> | |
69 | <keyColumn>id</keyColumn> | |
70 | <labelColumn>name</labelColumn> | |
71 | </pseudoconstant> | |
614d72ec | 72 | <html> |
e0991796 | 73 | <type>Select</type> |
614d72ec | 74 | </html> |
6a488035 | 75 | </field> |
3c7d2158 | 76 | <foreignKey> |
77 | <name>financial_account_id</name> | |
78 | <table>civicrm_financial_account</table> | |
79 | <key>id</key> | |
80 | <add>4.3</add> | |
6a488035 TO |
81 | <onDelete>RESTRICT</onDelete> |
82 | </foreignKey> | |
5b3543ce JM |
83 | <index> |
84 | <name>index_entity_id_entity_table_account_relationship</name> | |
85 | <fieldName>entity_id</fieldName> | |
86 | <fieldName>entity_table</fieldName> | |
87 | <fieldName>account_relationship</fieldName> | |
88 | <unique>true</unique> | |
89 | <add>4.7</add> | |
90 | </index> | |
6a488035 | 91 | </table> |