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> | |
9 | <field> | |
10 | <name>id</name> | |
32ac94e8 | 11 | <title>Line Item ID</title> |
6a488035 TO |
12 | <type>int unsigned</type> |
13 | <required>true</required> | |
14 | <comment>Line Item</comment> | |
15 | <add>1.7</add> | |
16 | </field> | |
17 | <primaryKey> | |
18 | <name>id</name> | |
19 | <autoincrement>true</autoincrement> | |
20 | </primaryKey> | |
21 | <field> | |
22 | <name>entity_table</name> | |
32ac94e8 | 23 | <title>Line Item Entity Type</title> |
6a488035 TO |
24 | <type>varchar</type> |
25 | <length>64</length> | |
26 | <required>true</required> | |
27 | <comment>table which has the transaction</comment> | |
28 | <add>1.7</add> | |
29 | </field> | |
30 | <field> | |
31 | <name>entity_id</name> | |
32ac94e8 | 32 | <title>Line Item Entity</title> |
6a488035 TO |
33 | <type>int unsigned</type> |
34 | <required>true</required> | |
35 | <comment>entry in table</comment> | |
36 | <add>1.7</add> | |
37 | </field> | |
71e5aa5c ARW |
38 | <dynamicForeignKey> |
39 | <idColumn>entity_id</idColumn> | |
40 | <typeColumn>entity_table</typeColumn> | |
41 | <add>1.7</add> | |
42 | </dynamicForeignKey> | |
a7886853 E |
43 | <field> |
44 | <name>contribution_id</name> | |
32ac94e8 | 45 | <title>Line Item Contribution</title> |
a7886853 E |
46 | <type>int unsigned</type> |
47 | <comment>FK to civicrm_contribution</comment> | |
48 | <add>4.5</add> | |
49 | </field> | |
50 | <foreignKey> | |
51 | <name>contribution_id</name> | |
52 | <table>civicrm_contribution</table> | |
53 | <key>id</key> | |
54 | <onDelete>SET NULL</onDelete> | |
55 | </foreignKey> | |
6a488035 TO |
56 | <field> |
57 | <name>price_field_id</name> | |
32ac94e8 | 58 | <title>Line Item Price Field</title> |
6a488035 TO |
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 --> | |
62 | <add>1.7</add> | |
63 | </field> | |
64 | <foreignKey> | |
65 | <name>price_field_id</name> | |
66 | <table>civicrm_price_field</table> | |
67 | <key>id</key> | |
68 | <onDelete>SET NULL</onDelete> | |
69 | </foreignKey> | |
70 | <field> | |
71 | <name>option_group_id</name> | |
32ac94e8 | 72 | <title>Line Item Option Group</title> |
6a488035 TO |
73 | <type>int unsigned</type> |
74 | <required>true</required> | |
75 | <comment>FK to option group</comment> | |
76 | <add>1.7</add> | |
77 | <drop>3.3</drop> | |
78 | </field> | |
79 | <field> | |
80 | <name>label</name> | |
32ac94e8 | 81 | <title>Line Item Label</title> |
6a488035 TO |
82 | <type>varchar</type> |
83 | <length>255</length> | |
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> | |
87 | <add>1.7</add> | |
614d72ec | 88 | <html> |
89 | <type>Text</type> | |
90 | </html> | |
6a488035 TO |
91 | </field> |
92 | <field> | |
93 | <name>qty</name> | |
32ac94e8 | 94 | <title>Line Item Quantity</title> |
4728de9f | 95 | <type>decimal</type> |
6a488035 TO |
96 | <required>true</required> |
97 | <comment>How many items ordered</comment> | |
98 | <add>1.7</add> | |
614d72ec | 99 | <html> |
100 | <type>Text</type> | |
101 | </html> | |
6a488035 TO |
102 | </field> |
103 | <field> | |
104 | <name>unit_price</name> | |
105 | <type>decimal</type> | |
106 | <required>true</required> | |
107 | <comment>price of each item</comment> | |
108 | <add>1.7</add> | |
614d72ec | 109 | <html> |
110 | <type>Text</type> | |
111 | </html> | |
6a488035 TO |
112 | </field> |
113 | <field> | |
114 | <name>line_total</name> | |
32ac94e8 | 115 | <title>Line Item Total</title> |
6a488035 TO |
116 | <type>decimal</type> |
117 | <required>true</required> | |
118 | <comment>qty * unit_price</comment> | |
119 | <add>1.7</add> | |
120 | </field> | |
121 | <field> | |
122 | <name>participant_count</name> | |
32ac94e8 | 123 | <title>Line Item Participant Count</title> |
6a488035 TO |
124 | <type>int unsigned</type> |
125 | <default>NULL</default> | |
32ac94e8 | 126 | <comment>Participant count for field</comment> |
5435b737 EM |
127 | <html> |
128 | <type>Text</type> | |
32ac94e8 | 129 | </html> |
6a488035 | 130 | <add>3.2</add> |
6cc0b7bd | 131 | |
6a488035 TO |
132 | </field> |
133 | <index> | |
134 | <name>index_entity</name> | |
135 | <fieldName>entity_table</fieldName> | |
136 | <fieldName>entity_id</fieldName> | |
137 | <add>1.7</add> | |
138 | </index> | |
139 | <index> | |
140 | <name>UI_line_item_value</name> | |
141 | <fieldName>entity_table</fieldName> | |
142 | <fieldName>entity_id</fieldName> | |
265f68c1 | 143 | <fieldName>contribution_id</fieldName> |
6a488035 TO |
144 | <fieldName>price_field_value_id</fieldName> |
145 | <fieldName>price_field_id</fieldName> | |
146 | <unique>true</unique> | |
147 | <add>3.3</add> | |
d3c618dd DG |
148 | <change>4.5</change> |
149 | <!-- Add contribution_id to unique index in 4.5 --> | |
6a488035 TO |
150 | </index> |
151 | <field> | |
152 | <name>price_field_value_id</name> | |
32ac94e8 | 153 | <title>Line Item Option</title> |
6a488035 TO |
154 | <type>int unsigned</type> |
155 | <default>NULL</default> | |
156 | <comment>FK to civicrm_price_field_value</comment> | |
157 | <add>3.3</add> | |
158 | </field> | |
159 | <foreignKey> | |
160 | <name>price_field_value_id</name> | |
161 | <table>civicrm_price_field_value</table> | |
162 | <key>id</key> | |
163 | <onDelete>SET NULL</onDelete> | |
164 | </foreignKey> | |
6f3f0f22 | 165 | <field> |
166 | <name>financial_type_id</name> | |
6a488035 | 167 | <title>Financial Type</title> |
6f3f0f22 | 168 | <type>int unsigned</type> |
6a488035 | 169 | <default>NULL</default> |
6cc0b7bd EM |
170 | <pseudoconstant> |
171 | <table>civicrm_financial_type</table> | |
172 | <keyColumn>id</keyColumn> | |
173 | <labelColumn>name</labelColumn> | |
174 | </pseudoconstant> | |
6a488035 | 175 | <comment>FK to Financial Type.</comment> |
6f3f0f22 | 176 | <add>4.3</add> |
614d72ec | 177 | <html> |
178 | <type>Select</type> | |
179 | </html> | |
6f3f0f22 | 180 | </field> |
181 | <foreignKey> | |
182 | <name>financial_type_id</name> | |
183 | <table>civicrm_financial_type</table> | |
184 | <key>id</key> | |
6a488035 TO |
185 | <onDelete>SET NULL</onDelete> |
186 | <add>4.3</add> | |
6f3f0f22 | 187 | </foreignKey> |
188 | <field> | |
189 | <name>deductible_amount</name> | |
6a488035 | 190 | <title>Deductible Amount</title> |
6f3f0f22 | 191 | <type>decimal</type> |
6a488035 TO |
192 | <default>0.0</default> |
193 | <headerPattern>/unit?.?amoun/i</headerPattern> | |
194 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
6f3f0f22 | 195 | <required>true</required> |
6a488035 | 196 | <comment>Tax-deductible portion of the amount</comment> |
6f3f0f22 | 197 | <add>4.3</add> |
614d72ec | 198 | <html> |
199 | <type>Text</type> | |
200 | </html> | |
6f3f0f22 | 201 | </field> |
d91b8b33 | 202 | <field> |
203 | <name>tax_amount</name> | |
115fa278 | 204 | <title>Tax Amount</title> |
d91b8b33 | 205 | <type>decimal</type> |
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> | |
115fa278 | 210 | <add>4.6</add> |
d91b8b33 | 211 | <html> |
212 | <type>Text</type> | |
213 | </html> | |
214 | </field> | |
6a488035 TO |
215 | </table> |
216 |