1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Contribute
</base>
5 <class>Contribution
</class>
6 <name>civicrm_contribution
</name>
11 <uniqueName>contribution_id
</uniqueName>
12 <type>int unsigned
</type>
13 <required>true
</required>
15 <title>Contribution ID
</title>
16 <comment>Contribution ID
</comment>
21 <autoincrement>true
</autoincrement>
24 <name>contact_id
</name>
25 <uniqueName>contribution_contact_id
</uniqueName>
26 <title>Contact ID
</title>
27 <type>int unsigned
</type>
28 <required>true
</required>
30 <headerPattern>/contact(.?id)?/i
</headerPattern>
31 <dataPattern>/^\d+$/
</dataPattern>
32 <comment>FK to Contact ID
</comment>
36 <name>contact_id
</name>
37 <table>civicrm_contact
</table>
40 <onDelete>CASCADE
</onDelete>
43 <name>solicitor_id
</name>
44 <title>Solicitor ID
</title>
45 <type>int unsigned
</type>
46 <comment>FK to Solicitor ID
</comment>
51 <name>solicitor_id
</name>
52 <table>civicrm_contact
</table>
56 <onDelete>SET NULL
</onDelete>
59 <name>contribution_type_id
</name>
60 <title>Contribution Type
</title>
61 <export>false
</export>
62 <type>int unsigned
</type>
63 <comment>FK to Contribution Type
</comment>
68 <name>contribution_type_id
</name>
69 <table>civicrm_contribution_type
</table>
73 <onDelete>SET NULL
</onDelete>
76 <name>financial_type_id
</name>
77 <title>Financial Type
</title>
78 <export>false
</export>
79 <type>int unsigned
</type>
80 <comment>FK to Financial Type for (total_amount - non_deductible_amount).
</comment>
82 <table>civicrm_financial_type
</table>
83 <keyColumn>id
</keyColumn>
84 <labelColumn>name
</labelColumn>
89 <name>financial_type_id
</name>
90 <table>civicrm_financial_type
</table>
95 <name>contribution_page_id
</name>
96 <title>Contribution Page
</title>
97 <type>int unsigned
</type>
99 <comment>The Contribution Page which triggered this contribution
</comment>
101 <table>civicrm_contribution_page
</table>
102 <keyColumn>id
</keyColumn>
103 <labelColumn>title
</labelColumn>
108 <name>contribution_page_id
</name>
109 <table>civicrm_contribution_page
</table>
111 <onDelete>SET NULL
</onDelete>
114 <name>payment_instrument_id
</name>
115 <uniqueName>contribution_payment_instrument_id
</uniqueName>
116 <title>Payment Instrument
</title>
117 <type>int unsigned
</type>
118 <comment>FK to Payment Instrument
</comment>
120 <optionGroupName>payment_instrument
</optionGroupName>
125 <name>UI_contrib_payment_instrument_id
</name>
126 <fieldName>payment_instrument_id
</fieldName>
130 <name>receive_date
</name>
131 <type>datetime
</type>
132 <import>true
</import>
133 <headerPattern>/receive(.?date)?/i
</headerPattern>
134 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
135 <comment>when was gift received
</comment>
139 <name>non_deductible_amount
</name>
140 <title>Non-deductible Amount
</title>
143 <import>true
</import>
144 <headerPattern>/non?.?deduct/i
</headerPattern>
145 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
146 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
</comment>
150 <name>total_amount
</name>
152 <required>true
</required>
153 <import>true
</import>
154 <headerPattern>/^total|(.?^am(ou)?nt)/i
</headerPattern>
155 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
156 <comment>Total amount of this contribution. Use market value for non-monetary gifts.
</comment>
160 <name>fee_amount
</name>
162 <import>true
</import>
163 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
164 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
165 <comment>actual processor fee if known - may be
0.
</comment>
169 <name>net_amount
</name>
171 <import>true
</import>
172 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
173 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
174 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
179 <title>Transaction ID
</title>
182 <import>true
</import>
183 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
184 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
188 <name>invoice_id
</name>
189 <title>Invoice ID
</title>
192 <import>true
</import>
193 <headerPattern>/invoice(.?id)?/i
</headerPattern>
194 <comment>unique invoice id, system generated or passed in
</comment>
198 <name>currency
</name>
201 <default>NULL
</default>
202 <import>true
</import>
203 <headerPattern>/cur(rency)?/i
</headerPattern>
204 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
205 <comment>3 character string, value from config setting or input via user.
</comment>
208 <table>civicrm_currency
</table>
209 <keyColumn>name
</keyColumn>
210 <labelColumn>symbol
</labelColumn>
214 <name>cancel_date
</name>
215 <type>datetime
</type>
216 <import>true
</import>
217 <headerPattern>/cancel(.?date)?/i
</headerPattern>
218 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
219 <comment>when was gift cancelled
</comment>
223 <name>cancel_reason
</name>
225 <import>true
</import>
226 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
230 <name>receipt_date
</name>
231 <type>datetime
</type>
232 <import>true
</import>
233 <headerPattern>/receipt(.?date)?/i
</headerPattern>
234 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
235 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
239 <name>thankyou_date
</name>
240 <title>Thank-you Date
</title>
241 <type>datetime
</type>
242 <import>true
</import>
243 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
244 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
245 <comment>when (if) was donor thanked
</comment>
250 <uniqueName>contribution_source
</uniqueName>
251 <title>Contribution Source
</title>
254 <import>true
</import>
255 <headerPattern>/source/i
</headerPattern>
256 <comment>Origin of this Contribution.
</comment>
260 <name>amount_level
</name>
261 <title>Amount Label
</title>
263 <import>true
</import>
269 <comment>Note and/or Comment.
</comment>
270 <htmlType>textarea
</htmlType>
273 <import>true
</import>
274 <headerPattern>/Note|Comment/i
</headerPattern>
275 <dataPattern>//
</dataPattern>
280 <name>UI_contrib_trxn_id
</name>
281 <fieldName>trxn_id
</fieldName>
282 <unique>true
</unique>
286 <name>UI_contrib_invoice_id
</name>
287 <fieldName>invoice_id
</fieldName>
288 <unique>true
</unique>
292 <name>contribution_recur_id
</name>
293 <type>int unsigned
</type>
294 <comment>Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
</comment>
298 <name>contribution_recur_id
</name>
299 <table>civicrm_contribution_recur
</table>
302 <onDelete>SET NULL
</onDelete>
305 <name>honor_contact_id
</name>
306 <title>Honor Contact
</title>
307 <type>int unsigned
</type>
308 <comment>FK to contact ID
</comment>
312 <name>honor_contact_id
</name>
313 <table>civicrm_contact
</table>
316 <onDelete>SET NULL
</onDelete>
323 <import>true
</import>
326 <name>is_pay_later
</name>
327 <title>Is Pay Later
</title>
330 <import>true
</import>
334 <name>contribution_status_id
</name>
335 <title>Contribution Status
</title>
336 <type>int unsigned
</type>
338 <import>true
</import>
339 <export>true
</export>
340 <headerPattern>/status/i
</headerPattern>
342 <optionGroupName>contribution_status
</optionGroupName>
347 <name>honor_type_id
</name>
348 <title>Honor Type
</title>
349 <type>int unsigned
</type>
350 <comment>Implicit FK to civicrm_option_value.
</comment>
352 <onDelete>SET NULL
</onDelete>
354 <optionGroupName>honor_type
</optionGroupName>
358 <name>index_contribution_status
</name>
359 <fieldName>contribution_status_id
</fieldName>
363 <name>received_date
</name>
364 <fieldName>receive_date
</fieldName>
368 <name>address_id
</name>
369 <type>int unsigned
</type>
370 <comment>Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.
</comment>
374 <name>address_id
</name>
375 <table>civicrm_address
</table>
378 <onDelete>SET NULL
</onDelete>
381 <name>check_number
</name>
382 <title>Check Number
</title>
383 <headerPattern>/check(.?number)?/i
</headerPattern>
387 <import>true
</import>
391 <name>check_number
</name>
392 <fieldName>check_number
</fieldName>
396 <name>campaign_id
</name>
397 <uniqueName>contribution_campaign_id
</uniqueName>
398 <type>int unsigned
</type>
399 <title>Campaign ID
</title>
400 <import>true
</import>
401 <comment>The campaign for which this contribution has been triggered.
</comment>
405 <name>campaign_id
</name>
406 <table>civicrm_campaign
</table>
408 <onDelete>SET NULL
</onDelete>