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>
94 <name>financial_account_id
</name>
95 <type>int unsigned
</type>
96 <title>Financial Account ID
</title>
97 <comment>FK to civicrm_financial_account
</comment>
100 <table>civicrm_financial_account
</table>
101 <keyColumn>id
</keyColumn>
102 <labelColumn>name
</labelColumn>
109 <name>financial_account_id
</name>
110 <table>civicrm_financial_account
</table>
115 <name>status_id
</name>
116 <export>true
</export>
117 <title>Financial Item Status ID
</title>
118 <type>int unsigned
</type>
119 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
122 <optionGroupName>financial_item_status
</optionGroupName>
129 <name>entity_table
</name>
131 <title>Entity Table
</title>
133 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
137 <name>entity_id
</name>
138 <title>Entity ID
</title>
139 <type>int unsigned
</type>
140 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
144 <idColumn>entity_id
</idColumn>
145 <typeColumn>entity_table
</typeColumn>
150 <fieldName>id
</fieldName>
151 <unique>true
</unique>
156 <name>IX_created_date
</name>
157 <fieldName>created_date
</fieldName>
161 <name>IX_transaction_date
</name>
162 <fieldName>transaction_date
</fieldName>
166 <name>IX_entity
</name>
167 <fieldName>entity_table
</fieldName>
168 <fieldName>entity_id
</fieldName>
173 <name>index_entity_id_entity_table
</name>
174 <fieldName>entity_id
</fieldName>
175 <fieldName>entity_table
</fieldName>