1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
5 <class>LineItem
</class>
6 <name>civicrm_line_item
</name>
9 <component>CiviContribute
</component>
12 <title>Line Item ID
</title>
13 <type>int unsigned
</type>
14 <required>true
</required>
15 <comment>Line Item
</comment>
23 <autoincrement>true
</autoincrement>
26 <name>entity_table
</name>
27 <title>Line Item Entity Type
</title>
30 <required>true
</required>
32 <callback>CRM_Price_BAO_LineItem::entityTables
</callback>
34 <comment>May contain civicrm_contribution, civicrm_participant or civicrm_membership
</comment>
38 <name>entity_id
</name>
39 <title>Line Item Entity
</title>
40 <type>int unsigned
</type>
41 <required>true
</required>
42 <comment>entry in table
</comment>
46 <idColumn>entity_id
</idColumn>
47 <typeColumn>entity_table
</typeColumn>
51 <name>contribution_id
</name>
52 <title>Contribution ID
</title>
53 <type>int unsigned
</type>
54 <comment>FK to civicrm_contribution
</comment>
56 <label>Contribution
</label>
61 <name>contribution_id
</name>
62 <table>civicrm_contribution
</table>
64 <onDelete>SET NULL
</onDelete>
67 <name>price_field_id
</name>
68 <title>Price Field ID
</title>
69 <type>int unsigned
</type>
70 <comment>FK to civicrm_price_field
</comment>
72 <table>civicrm_price_field
</table>
73 <keyColumn>id
</keyColumn>
74 <nameColumn>name
</nameColumn>
75 <labelColumn>label
</labelColumn>
77 <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
79 <label>Price Field
</label>
84 <name>price_field_id
</name>
85 <table>civicrm_price_field
</table>
87 <onDelete>SET NULL
</onDelete>
91 <title>Line Item Label
</title>
94 <default>NULL
</default>
95 <!-- changed to not required in 4.2.3 -->
96 <comment>descriptive label for item - from price_field_value.label
</comment>
104 <title>Line Item Quantity
</title>
106 <required>true
</required>
107 <comment>How many items ordered
</comment>
114 <name>unit_price
</name>
116 <required>true
</required>
117 <comment>price of each item
</comment>
121 <label>Unit Price
</label>
125 <name>line_total
</name>
126 <title>Line Item Total
</title>
128 <required>true
</required>
129 <comment>qty * unit_price
</comment>
133 <name>participant_count
</name>
134 <title>Line Item Participant Count
</title>
135 <type>int unsigned
</type>
136 <default>NULL
</default>
137 <comment>Participant count for field
</comment>
145 <name>UI_line_item_value
</name>
146 <fieldName>entity_id
</fieldName>
147 <fieldName>entity_table
</fieldName>
148 <fieldName>contribution_id
</fieldName>
149 <fieldName>price_field_value_id
</fieldName>
150 <fieldName>price_field_id
</fieldName>
151 <unique>true
</unique>
154 <!-- Add contribution_id to unique index in 4.5 -->
157 <name>price_field_value_id
</name>
158 <title>Option ID
</title>
159 <type>int unsigned
</type>
160 <default>NULL
</default>
161 <comment>FK to civicrm_price_field_value
</comment>
163 <table>civicrm_price_field_value
</table>
164 <keyColumn>id
</keyColumn>
165 <nameColumn>name
</nameColumn>
166 <labelColumn>label
</labelColumn>
169 <label>Option
</label>
174 <name>price_field_value_id
</name>
175 <table>civicrm_price_field_value
</table>
177 <onDelete>SET NULL
</onDelete>
180 <name>financial_type_id
</name>
181 <title>Financial Type ID
</title>
182 <type>int unsigned
</type>
183 <default>NULL
</default>
185 <table>civicrm_financial_type
</table>
186 <keyColumn>id
</keyColumn>
187 <labelColumn>name
</labelColumn>
189 <comment>FK to Financial Type.
</comment>
193 <label>Financial Type
</label>
197 <name>financial_type_id
</name>
198 <table>civicrm_financial_type
</table>
200 <onDelete>SET NULL
</onDelete>
204 <name>non_deductible_amount
</name>
205 <title>Non-deductible Amount
</title>
207 <default>0.0</default>
208 <headerPattern>/non?.?deduct/i
</headerPattern>
209 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
210 <required>true
</required>
211 <comment>Portion of total amount which is NOT tax deductible.
</comment>
218 <name>tax_amount
</name>
219 <title>Tax Amount
</title>
221 <import>true
</import>
222 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
223 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
224 <comment>tax of each item
</comment>
231 <name>membership_num_terms
</name>
232 <title>Number of membership terms purchased
</title>
233 <type>int unsigned
</type>
234 <default>NULL
</default>
235 <comment>Number of terms for this membership (only supported in Order-
>Payment flow). If the field is NULL it means unknown and it will be assumed to be
1 during payment.create if entity_table is civicrm_membership
</comment>