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>
20 <autoincrement>true
</autoincrement>
23 <name>entity_table
</name>
24 <title>Line Item Entity Type
</title>
27 <required>true
</required>
28 <comment>table which has the transaction
</comment>
32 <name>entity_id
</name>
33 <title>Line Item Entity
</title>
34 <type>int unsigned
</type>
35 <required>true
</required>
36 <comment>entry in table
</comment>
40 <idColumn>entity_id
</idColumn>
41 <typeColumn>entity_table
</typeColumn>
45 <name>contribution_id
</name>
46 <title>Line Item Contribution
</title>
47 <type>int unsigned
</type>
48 <comment>FK to civicrm_contribution
</comment>
52 <name>contribution_id
</name>
53 <table>civicrm_contribution
</table>
55 <onDelete>SET NULL
</onDelete>
58 <name>price_field_id
</name>
59 <title>Line Item Price Field
</title>
60 <type>int unsigned
</type>
61 <comment>FK to civicrm_price_field
</comment>
63 <table>civicrm_price_field
</table>
64 <keyColumn>id
</keyColumn>
65 <nameColumn>name
</nameColumn>
66 <labelColumn>label
</labelColumn>
68 <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
72 <name>price_field_id
</name>
73 <table>civicrm_price_field
</table>
75 <onDelete>SET NULL
</onDelete>
79 <title>Line Item Label
</title>
82 <default>NULL
</default>
83 <!-- changed to not required in 4.2.3 -->
84 <comment>descriptive label for item - from price_field_value.label
</comment>
92 <title>Line Item Quantity
</title>
94 <required>true
</required>
95 <comment>How many items ordered
</comment>
102 <name>unit_price
</name>
104 <required>true
</required>
105 <comment>price of each item
</comment>
112 <name>line_total
</name>
113 <title>Line Item Total
</title>
115 <required>true
</required>
116 <comment>qty * unit_price
</comment>
120 <name>participant_count
</name>
121 <title>Line Item Participant Count
</title>
122 <type>int unsigned
</type>
123 <default>NULL
</default>
124 <comment>Participant count for field
</comment>
132 <name>index_entity
</name>
133 <fieldName>entity_table
</fieldName>
134 <fieldName>entity_id
</fieldName>
138 <name>UI_line_item_value
</name>
139 <fieldName>entity_table
</fieldName>
140 <fieldName>entity_id
</fieldName>
141 <fieldName>contribution_id
</fieldName>
142 <fieldName>price_field_value_id
</fieldName>
143 <fieldName>price_field_id
</fieldName>
144 <unique>true
</unique>
147 <!-- Add contribution_id to unique index in 4.5 -->
150 <name>price_field_value_id
</name>
151 <title>Line Item Option
</title>
152 <type>int unsigned
</type>
153 <default>NULL
</default>
154 <comment>FK to civicrm_price_field_value
</comment>
156 <table>civicrm_price_field_value
</table>
157 <keyColumn>id
</keyColumn>
158 <nameColumn>name
</nameColumn>
159 <labelColumn>label
</labelColumn>
164 <name>price_field_value_id
</name>
165 <table>civicrm_price_field_value
</table>
167 <onDelete>SET NULL
</onDelete>
170 <name>financial_type_id
</name>
171 <title>Financial Type ID
</title>
172 <type>int unsigned
</type>
173 <default>NULL
</default>
175 <table>civicrm_financial_type
</table>
176 <keyColumn>id
</keyColumn>
177 <labelColumn>name
</labelColumn>
179 <comment>FK to Financial Type.
</comment>
183 <label>Financial Type
</label>
187 <name>financial_type_id
</name>
188 <table>civicrm_financial_type
</table>
190 <onDelete>SET NULL
</onDelete>
194 <name>non_deductible_amount
</name>
195 <title>Non-deductible Amount
</title>
197 <default>0.0</default>
198 <headerPattern>/non?.?deduct/i
</headerPattern>
199 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
200 <required>true
</required>
201 <comment>Portion of total amount which is NOT tax deductible.
</comment>
208 <name>tax_amount
</name>
209 <title>Tax Amount
</title>
211 <import>true
</import>
212 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
213 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
214 <comment>tax of each item
</comment>