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>
62 <table>civicrm_price_field
</table>
63 <keyColumn>id
</keyColumn>
64 <nameColumn>name
</nameColumn>
65 <labelColumn>label
</labelColumn>
67 <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
71 <name>price_field_id
</name>
72 <table>civicrm_price_field
</table>
74 <onDelete>SET NULL
</onDelete>
78 <title>Line Item Label
</title>
81 <default>NULL
</default>
82 <!-- changed to not required in 4.2.3 -->
83 <comment>descriptive label for item - from price_field_value.label
</comment>
91 <title>Line Item Quantity
</title>
93 <required>true
</required>
94 <comment>How many items ordered
</comment>
101 <name>unit_price
</name>
103 <required>true
</required>
104 <comment>price of each item
</comment>
111 <name>line_total
</name>
112 <title>Line Item Total
</title>
114 <required>true
</required>
115 <comment>qty * unit_price
</comment>
119 <name>participant_count
</name>
120 <title>Line Item Participant Count
</title>
121 <type>int unsigned
</type>
122 <default>NULL
</default>
123 <comment>Participant count for field
</comment>
131 <name>index_entity
</name>
132 <fieldName>entity_table
</fieldName>
133 <fieldName>entity_id
</fieldName>
137 <name>UI_line_item_value
</name>
138 <fieldName>entity_table
</fieldName>
139 <fieldName>entity_id
</fieldName>
140 <fieldName>contribution_id
</fieldName>
141 <fieldName>price_field_value_id
</fieldName>
142 <fieldName>price_field_id
</fieldName>
143 <unique>true
</unique>
146 <!-- Add contribution_id to unique index in 4.5 -->
149 <name>price_field_value_id
</name>
150 <title>Line Item Option
</title>
151 <type>int unsigned
</type>
152 <default>NULL
</default>
153 <comment>FK to civicrm_price_field_value
</comment>
155 <table>civicrm_price_field_value
</table>
156 <keyColumn>id
</keyColumn>
157 <nameColumn>name
</nameColumn>
158 <labelColumn>label
</labelColumn>
163 <name>price_field_value_id
</name>
164 <table>civicrm_price_field_value
</table>
166 <onDelete>SET NULL
</onDelete>
169 <name>financial_type_id
</name>
170 <title>Financial Type ID
</title>
171 <type>int unsigned
</type>
172 <default>NULL
</default>
174 <table>civicrm_financial_type
</table>
175 <keyColumn>id
</keyColumn>
176 <labelColumn>name
</labelColumn>
178 <comment>FK to Financial Type.
</comment>
182 <label>Financial Type
</label>
186 <name>financial_type_id
</name>
187 <table>civicrm_financial_type
</table>
189 <onDelete>SET NULL
</onDelete>
193 <name>non_deductible_amount
</name>
194 <title>Non-deductible Amount
</title>
196 <default>0.0</default>
197 <headerPattern>/non?.?deduct/i
</headerPattern>
198 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
199 <required>true
</required>
200 <comment>Portion of total amount which is NOT tax deductible.
</comment>
207 <name>tax_amount
</name>
208 <title>Tax Amount
</title>
210 <import>true
</import>
211 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
212 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
213 <comment>tax of each item
</comment>