Merge pull request #4124 from tohojo/adv-search-fix
[civicrm-core.git] / xml / schema / Financial / EntityFinancialAccount.xml
CommitLineData
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>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>ID</comment>
15 <add>4.3</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
6a488035
TO
21 <field>
22 <name>entity_table</name>
23 <type>varchar</type>
24 <length>64</length>
3c7d2158 25 <required>true</required>
6a488035
TO
26 <import>true</import>
27 <add>4.3</add>
28 <comment>Links to an entity_table like civicrm_financial_type</comment>
29 </field>
3c7d2158 30 <field>
31 <name>entity_id</name>
32 <type>int unsigned</type>
33 <required>true</required>
6a488035
TO
34 <add>4.3</add>
35 <comment>Links to an id in the entity_table, such as vid in civicrm_financial_type</comment>
36 </field>
71e5aa5c
ARW
37 <dynamicForeignKey>
38 <idColumn>entity_id</idColumn>
39 <typeColumn>entity_table</typeColumn>
40 <add>4.3</add>
41 </dynamicForeignKey>
3c7d2158 42 <field>
43 <name>account_relationship</name>
44 <type>int unsigned</type>
6a488035 45 <required>true</required>
3c7d2158 46 <add>4.3</add>
6a488035 47 <comment>FK to a new civicrm_option_value (account_relationship)</comment>
7611ae71
AS
48 <pseudoconstant>
49 <optionGroupName>account_relationship</optionGroupName>
50 </pseudoconstant>
614d72ec 51 <html>
e0991796 52 <type>Select</type>
614d72ec 53 </html>
3c7d2158 54 </field>
6a488035 55 <field>
3c7d2158 56 <name>financial_account_id</name>
57 <type>int unsigned</type>
6a488035 58 <required>true</required>
3c7d2158 59 <add>4.3</add>
6a488035 60 <comment>FK to the financial_account_id</comment>
7611ae71
AS
61 <pseudoconstant>
62 <table>civicrm_financial_account</table>
63 <keyColumn>id</keyColumn>
64 <labelColumn>name</labelColumn>
65 </pseudoconstant>
614d72ec 66 <html>
e0991796 67 <type>Select</type>
614d72ec 68 </html>
6a488035 69 </field>
3c7d2158 70 <foreignKey>
71 <name>financial_account_id</name>
72 <table>civicrm_financial_account</table>
73 <key>id</key>
74 <add>4.3</add>
6a488035
TO
75 <onDelete>RESTRICT</onDelete>
76 </foreignKey>
77</table>
78