Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Price</base> | |
5 | <class>LineItem</class> | |
6 | <name>civicrm_line_item</name> | |
7 | <add>1.7</add> | |
8 | <log>true</log> | |
d31fb4e3 | 9 | <component>CiviContribute</component> |
6a488035 TO |
10 | <field> |
11 | <name>id</name> | |
32ac94e8 | 12 | <title>Line Item ID</title> |
6a488035 TO |
13 | <type>int unsigned</type> |
14 | <required>true</required> | |
15 | <comment>Line Item</comment> | |
0481e12c A |
16 | <html> |
17 | <type>Number</type> | |
18 | </html> | |
6a488035 TO |
19 | <add>1.7</add> |
20 | </field> | |
21 | <primaryKey> | |
22 | <name>id</name> | |
23 | <autoincrement>true</autoincrement> | |
24 | </primaryKey> | |
25 | <field> | |
26 | <name>entity_table</name> | |
32ac94e8 | 27 | <title>Line Item Entity Type</title> |
6a488035 TO |
28 | <type>varchar</type> |
29 | <length>64</length> | |
30 | <required>true</required> | |
6844be64 MD |
31 | <pseudoconstant> |
32 | <callback>CRM_Price_BAO_LineItem::entityTables</callback> | |
33 | </pseudoconstant> | |
34 | <comment>May contain civicrm_contribution, civicrm_participant or civicrm_membership</comment> | |
6a488035 TO |
35 | <add>1.7</add> |
36 | </field> | |
37 | <field> | |
38 | <name>entity_id</name> | |
32ac94e8 | 39 | <title>Line Item Entity</title> |
6a488035 TO |
40 | <type>int unsigned</type> |
41 | <required>true</required> | |
42 | <comment>entry in table</comment> | |
43 | <add>1.7</add> | |
44 | </field> | |
71e5aa5c ARW |
45 | <dynamicForeignKey> |
46 | <idColumn>entity_id</idColumn> | |
47 | <typeColumn>entity_table</typeColumn> | |
48 | <add>1.7</add> | |
49 | </dynamicForeignKey> | |
a7886853 E |
50 | <field> |
51 | <name>contribution_id</name> | |
047c5009 | 52 | <title>Contribution ID</title> |
a7886853 E |
53 | <type>int unsigned</type> |
54 | <comment>FK to civicrm_contribution</comment> | |
57e94608 | 55 | <html> |
047c5009 | 56 | <label>Contribution</label> |
57e94608 | 57 | </html> |
a7886853 E |
58 | <add>4.5</add> |
59 | </field> | |
60 | <foreignKey> | |
61 | <name>contribution_id</name> | |
62 | <table>civicrm_contribution</table> | |
63 | <key>id</key> | |
64 | <onDelete>SET NULL</onDelete> | |
65 | </foreignKey> | |
6a488035 TO |
66 | <field> |
67 | <name>price_field_id</name> | |
047c5009 | 68 | <title>Price Field ID</title> |
6a488035 TO |
69 | <type>int unsigned</type> |
70 | <comment>FK to civicrm_price_field</comment> | |
8e17d9d3 | 71 | <pseudoconstant> |
72 | <table>civicrm_price_field</table> | |
73 | <keyColumn>id</keyColumn> | |
74 | <nameColumn>name</nameColumn> | |
75 | <labelColumn>label</labelColumn> | |
76 | </pseudoconstant> | |
6a488035 | 77 | <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL --> |
57e94608 | 78 | <html> |
047c5009 | 79 | <label>Price Field</label> |
57e94608 | 80 | </html> |
6a488035 TO |
81 | <add>1.7</add> |
82 | </field> | |
83 | <foreignKey> | |
84 | <name>price_field_id</name> | |
85 | <table>civicrm_price_field</table> | |
86 | <key>id</key> | |
87 | <onDelete>SET NULL</onDelete> | |
88 | </foreignKey> | |
6a488035 TO |
89 | <field> |
90 | <name>label</name> | |
32ac94e8 | 91 | <title>Line Item Label</title> |
6a488035 TO |
92 | <type>varchar</type> |
93 | <length>255</length> | |
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> | |
97 | <add>1.7</add> | |
614d72ec | 98 | <html> |
99 | <type>Text</type> | |
100 | </html> | |
6a488035 TO |
101 | </field> |
102 | <field> | |
103 | <name>qty</name> | |
32ac94e8 | 104 | <title>Line Item Quantity</title> |
4728de9f | 105 | <type>decimal</type> |
6a488035 TO |
106 | <required>true</required> |
107 | <comment>How many items ordered</comment> | |
108 | <add>1.7</add> | |
614d72ec | 109 | <html> |
110 | <type>Text</type> | |
111 | </html> | |
6a488035 TO |
112 | </field> |
113 | <field> | |
114 | <name>unit_price</name> | |
115 | <type>decimal</type> | |
116 | <required>true</required> | |
117 | <comment>price of each item</comment> | |
118 | <add>1.7</add> | |
614d72ec | 119 | <html> |
120 | <type>Text</type> | |
fd735f54 | 121 | <label>Unit Price</label> |
614d72ec | 122 | </html> |
6a488035 TO |
123 | </field> |
124 | <field> | |
125 | <name>line_total</name> | |
32ac94e8 | 126 | <title>Line Item Total</title> |
6a488035 TO |
127 | <type>decimal</type> |
128 | <required>true</required> | |
129 | <comment>qty * unit_price</comment> | |
130 | <add>1.7</add> | |
131 | </field> | |
132 | <field> | |
133 | <name>participant_count</name> | |
32ac94e8 | 134 | <title>Line Item Participant Count</title> |
6a488035 TO |
135 | <type>int unsigned</type> |
136 | <default>NULL</default> | |
32ac94e8 | 137 | <comment>Participant count for field</comment> |
5435b737 EM |
138 | <html> |
139 | <type>Text</type> | |
32ac94e8 | 140 | </html> |
6a488035 | 141 | <add>3.2</add> |
6cc0b7bd | 142 | |
6a488035 | 143 | </field> |
90dcf8f8 | 144 | <index> |
6a488035 | 145 | <name>UI_line_item_value</name> |
6a488035 | 146 | <fieldName>entity_id</fieldName> |
90dcf8f8 | 147 | <fieldName>entity_table</fieldName> |
265f68c1 | 148 | <fieldName>contribution_id</fieldName> |
6a488035 TO |
149 | <fieldName>price_field_value_id</fieldName> |
150 | <fieldName>price_field_id</fieldName> | |
151 | <unique>true</unique> | |
152 | <add>3.3</add> | |
d3c618dd DG |
153 | <change>4.5</change> |
154 | <!-- Add contribution_id to unique index in 4.5 --> | |
6a488035 TO |
155 | </index> |
156 | <field> | |
157 | <name>price_field_value_id</name> | |
047c5009 | 158 | <title>Option ID</title> |
6a488035 TO |
159 | <type>int unsigned</type> |
160 | <default>NULL</default> | |
161 | <comment>FK to civicrm_price_field_value</comment> | |
8e17d9d3 | 162 | <pseudoconstant> |
163 | <table>civicrm_price_field_value</table> | |
164 | <keyColumn>id</keyColumn> | |
165 | <nameColumn>name</nameColumn> | |
166 | <labelColumn>label</labelColumn> | |
167 | </pseudoconstant> | |
57e94608 | 168 | <html> |
047c5009 | 169 | <label>Option</label> |
57e94608 | 170 | </html> |
6a488035 TO |
171 | <add>3.3</add> |
172 | </field> | |
173 | <foreignKey> | |
174 | <name>price_field_value_id</name> | |
175 | <table>civicrm_price_field_value</table> | |
176 | <key>id</key> | |
177 | <onDelete>SET NULL</onDelete> | |
178 | </foreignKey> | |
6f3f0f22 | 179 | <field> |
180 | <name>financial_type_id</name> | |
8e17d9d3 | 181 | <title>Financial Type ID</title> |
6f3f0f22 | 182 | <type>int unsigned</type> |
6a488035 | 183 | <default>NULL</default> |
6cc0b7bd EM |
184 | <pseudoconstant> |
185 | <table>civicrm_financial_type</table> | |
186 | <keyColumn>id</keyColumn> | |
187 | <labelColumn>name</labelColumn> | |
188 | </pseudoconstant> | |
6a488035 | 189 | <comment>FK to Financial Type.</comment> |
6f3f0f22 | 190 | <add>4.3</add> |
614d72ec | 191 | <html> |
192 | <type>Select</type> | |
8e17d9d3 | 193 | <label>Financial Type</label> |
614d72ec | 194 | </html> |
6f3f0f22 | 195 | </field> |
196 | <foreignKey> | |
197 | <name>financial_type_id</name> | |
198 | <table>civicrm_financial_type</table> | |
199 | <key>id</key> | |
6a488035 TO |
200 | <onDelete>SET NULL</onDelete> |
201 | <add>4.3</add> | |
6f3f0f22 | 202 | </foreignKey> |
203 | <field> | |
5afce5ad | 204 | <name>non_deductible_amount</name> |
205 | <title>Non-deductible Amount</title> | |
6f3f0f22 | 206 | <type>decimal</type> |
6a488035 | 207 | <default>0.0</default> |
5afce5ad | 208 | <headerPattern>/non?.?deduct/i</headerPattern> |
6a488035 | 209 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> |
6f3f0f22 | 210 | <required>true</required> |
5afce5ad | 211 | <comment>Portion of total amount which is NOT tax deductible.</comment> |
212 | <add>4.7</add> | |
614d72ec | 213 | <html> |
214 | <type>Text</type> | |
215 | </html> | |
6f3f0f22 | 216 | </field> |
d91b8b33 | 217 | <field> |
218 | <name>tax_amount</name> | |
115fa278 | 219 | <title>Tax Amount</title> |
d91b8b33 | 220 | <type>decimal</type> |
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> | |
115fa278 | 225 | <add>4.6</add> |
d91b8b33 | 226 | <html> |
227 | <type>Text</type> | |
228 | </html> | |
229 | </field> | |
cf7384c1 EM |
230 | <field> |
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> | |
236 | <add>5.40</add> | |
237 | </field> | |
6a488035 | 238 | </table> |