1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Financial
</base>
5 <class>FinancialItem
</class>
6 <name>civicrm_financial_item
</name>
8 <comment>Financial data for civicrm_line_item, etc.
</comment>
10 <component>CiviContribute
</component>
13 <type>int unsigned
</type>
14 <title>Financial Item ID
</title>
16 <required>true
</required>
22 <autoincrement>true
</autoincrement>
25 <name>created_date
</name>
26 <type>timestamp
</type>
27 <title>Financial Item Created Date
</title>
28 <required>true
</required>
29 <default>CURRENT_TIMESTAMP
</default>
30 <comment>Date and time the item was created
</comment>
34 <name>transaction_date
</name>
36 <title>Financial Item Transaction Date
</title>
37 <required>true
</required>
38 <comment>Date and time of the source transaction
</comment>
42 <name>contact_id
</name>
43 <type>int unsigned
</type>
44 <title>Financial Item Contact ID
</title>
45 <required>true
</required>
47 <comment>FK to Contact ID of contact the item is from
</comment>
51 <name>contact_id
</name>
52 <table>civicrm_contact
</table>
54 <onDelete>CASCADE
</onDelete>
58 <name>description
</name>
60 <title>Financial Item Description
</title>
62 <comment>Human readable description of this item, to ease display without lookup of source item.
</comment>
70 <required>true
</required>
71 <headerPattern>/unit?.?amoun/i
</headerPattern>
72 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
73 <comment>Total amount of this item
</comment>
80 <title>Financial Item Currency
</title>
82 <comment>Currency for the amount
</comment>
85 <table>civicrm_currency
</table>
86 <keyColumn>name
</keyColumn>
87 <labelColumn>full_name
</labelColumn>
88 <nameColumn>name
</nameColumn>
89 <abbrColumn>symbol
</abbrColumn>
96 <name>financial_account_id
</name>
97 <type>int unsigned
</type>
98 <title>Financial Account ID
</title>
99 <comment>FK to civicrm_financial_account
</comment>
102 <table>civicrm_financial_account
</table>
103 <keyColumn>id
</keyColumn>
104 <labelColumn>name
</labelColumn>
111 <name>financial_account_id
</name>
112 <table>civicrm_financial_account
</table>
117 <name>status_id
</name>
118 <export>true
</export>
119 <title>Financial Item Status ID
</title>
120 <type>int unsigned
</type>
121 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
124 <optionGroupName>financial_item_status
</optionGroupName>
131 <name>entity_table
</name>
133 <title>Entity Table
</title>
135 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
139 <name>entity_id
</name>
140 <title>Entity ID
</title>
141 <type>int unsigned
</type>
142 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
146 <idColumn>entity_id
</idColumn>
147 <typeColumn>entity_table
</typeColumn>
152 <fieldName>id
</fieldName>
153 <unique>true
</unique>
158 <name>IX_created_date
</name>
159 <fieldName>created_date
</fieldName>
163 <name>IX_transaction_date
</name>
164 <fieldName>transaction_date
</fieldName>
168 <name>IX_entity
</name>
169 <fieldName>entity_table
</fieldName>
170 <fieldName>entity_id
</fieldName>
175 <name>index_entity_id_entity_table
</name>
176 <fieldName>entity_id
</fieldName>
177 <fieldName>entity_table
</fieldName>