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>
25 <autoincrement>true
</autoincrement>
28 <name>created_date
</name>
29 <type>timestamp
</type>
30 <title>Financial Item Created Date
</title>
31 <required>true
</required>
32 <default>CURRENT_TIMESTAMP
</default>
33 <comment>Date and time the item was created
</comment>
37 <name>transaction_date
</name>
39 <title>Financial Item Transaction Date
</title>
40 <required>true
</required>
41 <comment>Date and time of the source transaction
</comment>
45 <name>contact_id
</name>
46 <type>int unsigned
</type>
47 <title>Contact ID
</title>
48 <required>true
</required>
50 <comment>FK to Contact ID of contact the item is from
</comment>
52 <label>Contact
</label>
57 <name>contact_id
</name>
58 <table>civicrm_contact
</table>
60 <onDelete>CASCADE
</onDelete>
64 <name>description
</name>
66 <title>Financial Item Description
</title>
68 <comment>Human readable description of this item, to ease display without lookup of source item.
</comment>
76 <required>true
</required>
77 <headerPattern>/unit?.?amoun/i
</headerPattern>
78 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
79 <comment>Total amount of this item
</comment>
86 <title>Financial Item Currency
</title>
88 <comment>Currency for the amount
</comment>
91 <table>civicrm_currency
</table>
92 <keyColumn>name
</keyColumn>
93 <labelColumn>full_name
</labelColumn>
94 <nameColumn>name
</nameColumn>
95 <abbrColumn>symbol
</abbrColumn>
102 <name>financial_account_id
</name>
103 <type>int unsigned
</type>
104 <title>Financial Account ID
</title>
105 <comment>FK to civicrm_financial_account
</comment>
108 <table>civicrm_financial_account
</table>
109 <keyColumn>id
</keyColumn>
110 <labelColumn>name
</labelColumn>
114 <label>Financial Account
</label>
118 <name>financial_account_id
</name>
119 <table>civicrm_financial_account
</table>
124 <name>status_id
</name>
125 <export>true
</export>
126 <title>Financial Item Status ID
</title>
127 <type>int unsigned
</type>
128 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
131 <optionGroupName>financial_item_status
</optionGroupName>
138 <name>entity_table
</name>
140 <title>Entity Table
</title>
142 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
146 <name>entity_id
</name>
147 <title>Entity ID
</title>
148 <type>int unsigned
</type>
149 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
153 <idColumn>entity_id
</idColumn>
154 <typeColumn>entity_table
</typeColumn>
159 <fieldName>id
</fieldName>
160 <unique>true
</unique>
165 <name>IX_created_date
</name>
166 <fieldName>created_date
</fieldName>
170 <name>IX_transaction_date
</name>
171 <fieldName>transaction_date
</fieldName>
175 <name>IX_entity
</name>
176 <fieldName>entity_table
</fieldName>
177 <fieldName>entity_id
</fieldName>
182 <name>index_entity_id_entity_table
</name>
183 <fieldName>entity_id
</fieldName>
184 <fieldName>entity_table
</fieldName>