1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
5 <class>LineItem
</class>
6 <name>civicrm_line_item
</name>
11 <title>Line Item ID
</title>
12 <type>int unsigned
</type>
13 <required>true
</required>
14 <comment>Line Item
</comment>
19 <autoincrement>true
</autoincrement>
22 <name>entity_table
</name>
23 <title>Line Item Entity Type
</title>
26 <required>true
</required>
27 <comment>table which has the transaction
</comment>
31 <name>entity_id
</name>
32 <title>Line Item Entity
</title>
33 <type>int unsigned
</type>
34 <required>true
</required>
35 <comment>entry in table
</comment>
39 <idColumn>entity_id
</idColumn>
40 <typeColumn>entity_table
</typeColumn>
44 <name>contribution_id
</name>
45 <title>Line Item Contribution
</title>
46 <type>int unsigned
</type>
47 <comment>FK to civicrm_contribution
</comment>
51 <name>contribution_id
</name>
52 <table>civicrm_contribution
</table>
54 <onDelete>SET NULL
</onDelete>
57 <name>price_field_id
</name>
58 <title>Line Item Price Field
</title>
59 <type>int unsigned
</type>
60 <comment>FK to civicrm_price_field
</comment>
61 <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
65 <name>price_field_id
</name>
66 <table>civicrm_price_field
</table>
68 <onDelete>SET NULL
</onDelete>
71 <name>option_group_id
</name>
72 <title>Line Item Option Group
</title>
73 <type>int unsigned
</type>
74 <required>true
</required>
75 <comment>FK to option group
</comment>
81 <title>Line Item Label
</title>
84 <default>NULL
</default>
85 <!-- changed to not required in 4.2.3 -->
86 <comment>descriptive label for item - from price_field_value.label
</comment>
94 <title>Line Item Quantity
</title>
96 <required>true
</required>
97 <comment>How many items ordered
</comment>
104 <name>unit_price
</name>
106 <required>true
</required>
107 <comment>price of each item
</comment>
114 <name>line_total
</name>
115 <title>Line Item Total
</title>
117 <required>true
</required>
118 <comment>qty * unit_price
</comment>
122 <name>participant_count
</name>
123 <title>Line Item Participant Count
</title>
124 <type>int unsigned
</type>
125 <default>NULL
</default>
126 <comment>Participant count for field
</comment>
134 <name>index_entity
</name>
135 <fieldName>entity_table
</fieldName>
136 <fieldName>entity_id
</fieldName>
140 <name>UI_line_item_value
</name>
141 <fieldName>entity_table
</fieldName>
142 <fieldName>entity_id
</fieldName>
143 <fieldName>contribution_id
</fieldName>
144 <fieldName>price_field_value_id
</fieldName>
145 <fieldName>price_field_id
</fieldName>
146 <unique>true
</unique>
149 <!-- Add contribution_id to unique index in 4.5 -->
152 <name>price_field_value_id
</name>
153 <title>Line Item Option
</title>
154 <type>int unsigned
</type>
155 <default>NULL
</default>
156 <comment>FK to civicrm_price_field_value
</comment>
160 <name>price_field_value_id
</name>
161 <table>civicrm_price_field_value
</table>
163 <onDelete>SET NULL
</onDelete>
166 <name>financial_type_id
</name>
167 <title>Financial Type
</title>
168 <type>int unsigned
</type>
169 <default>NULL
</default>
171 <table>civicrm_financial_type
</table>
172 <keyColumn>id
</keyColumn>
173 <labelColumn>name
</labelColumn>
175 <comment>FK to Financial Type.
</comment>
182 <name>financial_type_id
</name>
183 <table>civicrm_financial_type
</table>
185 <onDelete>SET NULL
</onDelete>
189 <name>non_deductible_amount
</name>
190 <title>Non-deductible Amount
</title>
192 <default>0.0</default>
193 <headerPattern>/non?.?deduct/i
</headerPattern>
194 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
195 <required>true
</required>
196 <comment>Portion of total amount which is NOT tax deductible.
</comment>
203 <name>tax_amount
</name>
204 <title>Tax Amount
</title>
206 <import>true
</import>
207 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
208 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
209 <comment>tax of each item
</comment>