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>
14 <required>true
</required>
20 <autoincrement>true
</autoincrement>
23 <name>created_date
</name>
24 <type>timestamp
</type>
25 <required>true
</required>
26 <default>CURRENT_TIMESTAMP
</default>
27 <comment>Date and time the item was created
</comment>
31 <name>transaction_date
</name>
33 <required>true
</required>
34 <comment>Date and time of the source transaction
</comment>
38 <name>contact_id
</name>
39 <type>int unsigned
</type>
40 <required>true
</required>
42 <comment>FK to Contact ID of contact the item is from
</comment>
46 <name>contact_id
</name>
47 <table>civicrm_contact
</table>
49 <onDelete>CASCADE
</onDelete>
53 <name>description
</name>
56 <comment>Human readable description of this item, to ease display without lookup of source item.
</comment>
64 <required>true
</required>
65 <headerPattern>/unit?.?amoun/i
</headerPattern>
66 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
67 <comment>Total amount of this item
</comment>
75 <comment>Currency for the amount
</comment>
78 <table>civicrm_currency
</table>
79 <keyColumn>name
</keyColumn>
80 <labelColumn>full_name
</labelColumn>
81 <nameColumn>numeric_code
</nameColumn>
88 <name>financial_account_id
</name>
89 <type>int unsigned
</type>
90 <comment>FK to civicrm_financial_account
</comment>
93 <table>civicrm_financial_account
</table>
94 <keyColumn>id
</keyColumn>
95 <labelColumn>name
</labelColumn>
102 <name>financial_account_id
</name>
103 <table>civicrm_financial_account
</table>
108 <name>status_id
</name>
109 <export>true
</export>
110 <type>int unsigned
</type>
111 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
114 <optionGroupName>financial_item_status
</optionGroupName>
121 <name>entity_table
</name>
124 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
128 <name>entity_id
</name>
129 <type>int unsigned
</type>
130 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
134 <idColumn>entity_id
</idColumn>
135 <typeColumn>entity_table
</typeColumn>
140 <fieldName>id
</fieldName>
141 <unique>true
</unique>
145 <name>IX_created_date
</name>
146 <fieldName>created_date
</fieldName>
150 <name>IX_transaction_date
</name>
151 <fieldName>transaction_date
</fieldName>
155 <name>IX_entity
</name>
156 <fieldName>entity_table
</fieldName>
157 <fieldName>entity_id
</fieldName>
161 <name>IX_entity
</name>
162 <fieldName>entity_table
</fieldName>
163 <fieldName>entity_id
</fieldName>