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>
34 <type>EntityRef
</type>
39 <name>contact_id
</name>
40 <table>civicrm_contact
</table>
43 <onDelete>CASCADE
</onDelete>
46 <name>solicitor_id
</name>
47 <title>Solicitor ID
</title>
48 <type>int unsigned
</type>
49 <comment>FK to Solicitor ID
</comment>
54 <name>solicitor_id
</name>
55 <table>civicrm_contact
</table>
59 <onDelete>SET NULL
</onDelete>
62 <name>contribution_type_id
</name>
63 <title>Contribution Type
</title>
64 <export>false
</export>
65 <type>int unsigned
</type>
66 <comment>FK to Contribution Type
</comment>
71 <name>contribution_type_id
</name>
72 <table>civicrm_contribution_type
</table>
76 <onDelete>SET NULL
</onDelete>
79 <name>financial_type_id
</name>
80 <title>Financial Type
</title>
81 <type>int unsigned
</type>
82 <comment>FK to Financial Type for (total_amount - non_deductible_amount).
</comment>
84 <table>civicrm_financial_type
</table>
85 <keyColumn>id
</keyColumn>
86 <labelColumn>name
</labelColumn>
95 <name>financial_type_id
</name>
96 <table>civicrm_financial_type
</table>
101 <name>contribution_page_id
</name>
102 <title>Contribution Page ID
</title>
103 <type>int unsigned
</type>
104 <import>true
</import>
105 <comment>The Contribution Page which triggered this contribution
</comment>
107 <table>civicrm_contribution_page
</table>
108 <keyColumn>id
</keyColumn>
109 <labelColumn>title
</labelColumn>
117 <name>contribution_page_id
</name>
118 <table>civicrm_contribution_page
</table>
120 <onDelete>SET NULL
</onDelete>
123 <name>payment_instrument_id
</name>
124 <uniqueName>payment_instrument_id
</uniqueName>
125 <title>Payment Method ID
</title>
126 <type>int unsigned
</type>
127 <comment>FK to Payment Instrument
</comment>
128 <export>true
</export>
129 <headerPattern>/^payment|(p(ayment\s)?instrument)$/i
</headerPattern>
131 <optionGroupName>payment_instrument
</optionGroupName>
139 <name>UI_contrib_payment_instrument_id
</name>
140 <fieldName>payment_instrument_id
</fieldName>
144 <name>receive_date
</name>
145 <title>Date Received
</title>
146 <type>datetime
</type>
147 <import>true
</import>
148 <headerPattern>/receive(.?date)?/i
</headerPattern>
149 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
150 <comment>Date contribution was received - not necessarily the creation date of the record
</comment>
153 <type>Select Date
</type>
154 <formatType>activityDateTime
</formatType>
158 <name>non_deductible_amount
</name>
159 <title>Non-deductible Amount
</title>
162 <import>true
</import>
163 <headerPattern>/non?.?deduct/i
</headerPattern>
164 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
165 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
</comment>
172 <name>total_amount
</name>
174 <required>true
</required>
175 <import>true
</import>
176 <headerPattern>/^total|(.?^am(ou)?nt)/i
</headerPattern>
177 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
178 <comment>Total amount of this contribution. Use market value for non-monetary gifts.
</comment>
185 <name>index_total_amount_receive_date
</name>
186 <fieldName>total_amount
</fieldName>
187 <fieldName>receive_date
</fieldName>
191 <name>fee_amount
</name>
193 <import>true
</import>
194 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
195 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
196 <comment>actual processor fee if known - may be
0.
</comment>
203 <name>net_amount
</name>
205 <import>true
</import>
206 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
207 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
208 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
216 <title>Transaction ID
</title>
219 <import>true
</import>
220 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
221 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
228 <name>invoice_id
</name>
229 <title>Invoice Reference
</title>
232 <import>true
</import>
233 <headerPattern>/invoice(.?id)?/i
</headerPattern>
234 <comment>unique invoice id, system generated or passed in
</comment>
241 <name>invoice_number
</name>
242 <title>Invoice Number
</title>
245 <import>true
</import>
246 <headerPattern>/invoice(.?number)?/i
</headerPattern>
247 <comment>Human readable invoice number
</comment>
254 <name>currency
</name>
257 <default>NULL
</default>
258 <import>true
</import>
259 <headerPattern>/cur(rency)?/i
</headerPattern>
260 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
261 <comment>3 character string, value from config setting or input via user.
</comment>
264 <table>civicrm_currency
</table>
265 <keyColumn>name
</keyColumn>
266 <labelColumn>full_name
</labelColumn>
267 <nameColumn>name
</nameColumn>
274 <name>cancel_date
</name>
275 <title>Cancelled / Refunded Date
</title>
276 <type>datetime
</type>
277 <import>true
</import>
278 <headerPattern>/cancel(.?date)?/i
</headerPattern>
279 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
280 <comment>when was gift cancelled
</comment>
283 <type>Select Date
</type>
284 <formatType>activityDateTime
</formatType>
286 <uniqueName>contribution_cancel_date
</uniqueName>
289 <name>cancel_reason
</name>
291 <title>Cancellation / Refund Reason
</title>
292 <import>true
</import>
293 <export>true
</export>
294 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
302 <name>receipt_date
</name>
303 <type>datetime
</type>
304 <import>true
</import>
305 <headerPattern>/receipt(.?date)?/i
</headerPattern>
306 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
307 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
309 <type>Select Date
</type>
310 <formatType>activityDateTime
</formatType>
315 <name>thankyou_date
</name>
316 <title>Thank-you Date
</title>
317 <type>datetime
</type>
318 <import>true
</import>
319 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
320 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
321 <comment>when (if) was donor thanked
</comment>
324 <type>Select Date
</type>
325 <formatType>activityDateTime
</formatType>
330 <uniqueName>contribution_source
</uniqueName>
331 <title>Contribution Source
</title>
334 <import>true
</import>
335 <headerPattern>/source/i
</headerPattern>
336 <comment>Origin of this Contribution.
</comment>
343 <name>index_source
</name>
344 <fieldName>source
</fieldName>
348 <name>amount_level
</name>
349 <title>Amount Label
</title>
351 <import>true
</import>
360 <comment>Note and/or Comment.
</comment>
361 <import>true
</import>
362 <headerPattern>/Note|Comment/i
</headerPattern>
363 <dataPattern>//
</dataPattern>
368 <name>UI_contrib_trxn_id
</name>
369 <fieldName>trxn_id
</fieldName>
370 <unique>true
</unique>
374 <name>UI_contrib_invoice_id
</name>
375 <fieldName>invoice_id
</fieldName>
376 <unique>true
</unique>
380 <name>contribution_recur_id
</name>
381 <title>Recurring Contribution ID
</title>
382 <type>int unsigned
</type>
383 <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>
384 <export>true
</export>
388 <name>contribution_recur_id
</name>
389 <table>civicrm_contribution_recur
</table>
392 <onDelete>SET NULL
</onDelete>
399 <import>true
</import>
401 <type>CheckBox
</type>
405 <name>is_pay_later
</name>
406 <title>Is Pay Later
</title>
409 <import>true
</import>
412 <type>CheckBox
</type>
416 <name>contribution_status_id
</name>
417 <title>Contribution Status ID
</title>
418 <type>int unsigned
</type>
420 <import>true
</import>
421 <export>true
</export>
422 <headerPattern>/status/i
</headerPattern>
424 <optionGroupName>contribution_status
</optionGroupName>
432 <name>index_contribution_status
</name>
433 <fieldName>contribution_status_id
</fieldName>
437 <name>received_date
</name>
438 <fieldName>receive_date
</fieldName>
442 <name>address_id
</name>
443 <uniqueName>contribution_address_id
</uniqueName>
444 <title>Contribution Address
</title>
445 <type>int unsigned
</type>
446 <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>
448 <export>true
</export>
451 <name>address_id
</name>
452 <table>civicrm_address
</table>
455 <onDelete>SET NULL
</onDelete>
458 <name>check_number
</name>
459 <title>Check Number
</title>
460 <uniqueName>contribution_check_number
</uniqueName>
461 <headerPattern>/check(.?number)?/i
</headerPattern>
468 <import>true
</import>
472 <name>check_number
</name>
473 <fieldName>check_number
</fieldName>
477 <name>campaign_id
</name>
478 <uniqueName>contribution_campaign_id
</uniqueName>
479 <type>int unsigned
</type>
480 <title>Campaign
</title>
481 <import>true
</import>
482 <comment>The campaign for which this contribution has been triggered.
</comment>
484 <table>civicrm_campaign
</table>
485 <keyColumn>id
</keyColumn>
486 <labelColumn>title
</labelColumn>
494 <name>creditnote_id
</name>
495 <title>Credit Note ID
</title>
498 <import>true
</import>
499 <headerPattern>/creditnote(.?id)?/i
</headerPattern>
500 <comment>unique credit note id, system generated or passed in
</comment>
507 <name>index_creditnote_id
</name>
508 <fieldName>creditnote_id
</fieldName>
512 <name>tax_amount
</name>
513 <title>Tax Amount
</title>
515 <import>true
</import>
516 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
517 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
518 <comment>Total tax amount of this contribution.
</comment>
525 <name>campaign_id
</name>
526 <table>civicrm_campaign
</table>
528 <onDelete>SET NULL
</onDelete>
531 <name>revenue_recognition_date
</name>
532 <type>datetime
</type>
533 <import>true
</import>
534 <headerPattern>/revenue(.?date)?/i
</headerPattern>
535 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
536 <comment>Stores the date when revenue should be recognized.
</comment>
538 <type>Select Date
</type>
539 <formatType>activityDateTime
</formatType>