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