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>
85 <name>financial_account_id
</name>
86 <type>int unsigned
</type>
87 <comment>FK to civicrm_financial_account
</comment>
90 <table>civicrm_financial_account
</table>
91 <keyColumn>id
</keyColumn>
92 <labelColumn>name
</labelColumn>
96 <name>financial_account_id
</name>
97 <table>civicrm_financial_account
</table>
102 <name>status_id
</name>
103 <export>true
</export>
104 <type>int unsigned
</type>
105 <comment>Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
</comment>
108 <optionGroupName>financial_item_status
</optionGroupName>
112 <name>entity_table
</name>
115 <comment>The table providing the source of this item such as civicrm_line_item
</comment>
119 <name>entity_id
</name>
120 <type>int unsigned
</type>
121 <comment>The specific source item that is responsible for the creation of this financial_item
</comment>
125 <idColumn>entity_id
</idColumn>
126 <typeColumn>entity_table
</typeColumn>
131 <fieldName>id
</fieldName>
132 <unique>true
</unique>
136 <name>IX_created_date
</name>
137 <fieldName>created_date
</fieldName>
141 <name>IX_transaction_date
</name>
142 <fieldName>transaction_date
</fieldName>
146 <name>IX_entity
</name>
147 <fieldName>entity_table
</fieldName>
148 <fieldName>entity_id
</fieldName>
152 <name>IX_entity
</name>
153 <fieldName>entity_table
</fieldName>
154 <fieldName>entity_id
</fieldName>