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>
12 <type>int unsigned
</type>
13 <title>Financial Item ID
</title>
15 <required>true
</required>
21 <autoincrement>true
</autoincrement>
24 <name>created_date
</name>
25 <type>timestamp
</type>
26 <title>Financial Item Created Date
</title>
27 <required>true
</required>
28 <default>CURRENT_TIMESTAMP
</default>
29 <comment>Date and time the item was created
</comment>
33 <name>transaction_date
</name>
35 <title>Financial Item Transaction Date
</title>
36 <required>true
</required>
37 <comment>Date and time of the source transaction
</comment>
41 <name>contact_id
</name>
42 <type>int unsigned
</type>
43 <title>Financial Item Contact ID
</title>
44 <required>true
</required>
46 <comment>FK to Contact ID of contact the item is from
</comment>
50 <name>contact_id
</name>
51 <table>civicrm_contact
</table>
53 <onDelete>CASCADE
</onDelete>
57 <name>description
</name>
59 <title>Financial Item Description
</title>
61 <comment>Human readable description of this item, to ease display without lookup of source item.
</comment>
69 <required>true
</required>
70 <headerPattern>/unit?.?amoun/i
</headerPattern>
71 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
72 <comment>Total amount of this item
</comment>
79 <title>Financial Item Currency
</title>
81 <comment>Currency for the amount
</comment>
84 <table>civicrm_currency
</table>
85 <keyColumn>name
</keyColumn>
86 <labelColumn>full_name
</labelColumn>
87 <nameColumn>name
</nameColumn>
88 <abbrColumn>symbol
</abbrColumn>
95 <name>financial_account_id
</name>
96 <type>int unsigned
</type>
97 <title>Financial Account ID
</title>
98 <comment>FK to civicrm_financial_account
</comment>
101 <table>civicrm_financial_account
</table>
102 <keyColumn>id
</keyColumn>
103 <labelColumn>name
</labelColumn>
110 <name>financial_account_id
</name>
111 <table>civicrm_financial_account
</table>
116 <name>status_id
</name>
117 <export>true
</export>
118 <title>Financial Item Status ID
</title>
119 <type>int unsigned
</type>
120 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
123 <optionGroupName>financial_item_status
</optionGroupName>
130 <name>entity_table
</name>
132 <title>Entity Table
</title>
134 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
138 <name>entity_id
</name>
139 <title>Entity ID
</title>
140 <type>int unsigned
</type>
141 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
145 <idColumn>entity_id
</idColumn>
146 <typeColumn>entity_table
</typeColumn>
151 <fieldName>id
</fieldName>
152 <unique>true
</unique>
157 <name>IX_created_date
</name>
158 <fieldName>created_date
</fieldName>
162 <name>IX_transaction_date
</name>
163 <fieldName>transaction_date
</fieldName>
167 <name>IX_entity
</name>
168 <fieldName>entity_table
</fieldName>
169 <fieldName>entity_id
</fieldName>
174 <name>index_entity_id_entity_table
</name>
175 <fieldName>entity_id
</fieldName>
176 <fieldName>entity_table
</fieldName>