1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Contribute
</base>
5 <class>Contribution
</class>
6 <name>civicrm_contribution
</name>
9 <icon>fa-credit-card
</icon>
12 <uniqueName>contribution_id
</uniqueName>
13 <type>int unsigned
</type>
14 <required>true
</required>
16 <title>Contribution ID
</title>
17 <comment>Contribution ID
</comment>
25 <autoincrement>true
</autoincrement>
28 <name>contact_id
</name>
29 <uniqueName>contribution_contact_id
</uniqueName>
30 <title>Contact ID
</title>
31 <type>int unsigned
</type>
32 <required>true
</required>
34 <headerPattern>/contact(.?id)?/i
</headerPattern>
35 <dataPattern>/^\d+$/
</dataPattern>
36 <comment>FK to Contact ID
</comment>
38 <type>EntityRef
</type>
43 <name>contact_id
</name>
44 <table>civicrm_contact
</table>
47 <onDelete>CASCADE
</onDelete>
50 <name>financial_type_id
</name>
51 <title>Financial Type ID
</title>
52 <type>int unsigned
</type>
53 <comment>FK to Financial Type for (total_amount - non_deductible_amount).
</comment>
55 <table>civicrm_financial_type
</table>
56 <keyColumn>id
</keyColumn>
57 <labelColumn>name
</labelColumn>
62 <label>Financial Type
</label>
67 <name>financial_type_id
</name>
68 <table>civicrm_financial_type
</table>
73 <name>contribution_page_id
</name>
74 <title>Contribution Page ID
</title>
75 <type>int unsigned
</type>
77 <comment>The Contribution Page which triggered this contribution
</comment>
79 <table>civicrm_contribution_page
</table>
80 <keyColumn>id
</keyColumn>
81 <labelColumn>title
</labelColumn>
85 <label>Contribution Page
</label>
90 <name>contribution_page_id
</name>
91 <table>civicrm_contribution_page
</table>
93 <onDelete>SET NULL
</onDelete>
96 <name>payment_instrument_id
</name>
97 <uniqueName>payment_instrument_id
</uniqueName>
98 <title>Payment Method ID
</title>
99 <type>int unsigned
</type>
100 <comment>FK to Payment Instrument
</comment>
101 <export>true
</export>
102 <headerPattern>/^payment|(p(ayment\s)?instrument)$/i
</headerPattern>
104 <optionGroupName>payment_instrument
</optionGroupName>
112 <name>UI_contrib_payment_instrument_id
</name>
113 <fieldName>payment_instrument_id
</fieldName>
117 <name>receive_date
</name>
118 <title>Date Received
</title>
119 <type>datetime
</type>
120 <import>true
</import>
121 <headerPattern>/receive(.?date)?/i
</headerPattern>
122 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
123 <comment>Date contribution was received - not necessarily the creation date of the record
</comment>
126 <type>Select Date
</type>
127 <formatType>activityDateTime
</formatType>
131 <name>non_deductible_amount
</name>
132 <title>Non-deductible Amount
</title>
135 <import>true
</import>
136 <headerPattern>/non?.?deduct/i
</headerPattern>
137 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
138 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
</comment>
145 <name>total_amount
</name>
147 <required>true
</required>
148 <import>true
</import>
149 <headerPattern>/^total|(.?^am(ou)?nt)/i
</headerPattern>
150 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
151 <comment>Total amount of this contribution. Use market value for non-monetary gifts.
</comment>
158 <name>index_total_amount_receive_date
</name>
159 <fieldName>total_amount
</fieldName>
160 <fieldName>receive_date
</fieldName>
164 <name>fee_amount
</name>
166 <import>true
</import>
167 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
168 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
169 <comment>actual processor fee if known - may be
0.
</comment>
176 <name>net_amount
</name>
178 <import>true
</import>
179 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
180 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
181 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
189 <title>Transaction ID
</title>
192 <import>true
</import>
193 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
194 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
201 <name>invoice_id
</name>
202 <title>Invoice Reference
</title>
205 <import>true
</import>
206 <headerPattern>/invoice(.?id)?/i
</headerPattern>
207 <comment>unique invoice id, system generated or passed in
</comment>
214 <name>invoice_number
</name>
215 <title>Invoice Number
</title>
218 <import>true
</import>
219 <headerPattern>/invoice(.?number)?/i
</headerPattern>
220 <comment>Human readable invoice number
</comment>
227 <name>currency
</name>
230 <default>NULL
</default>
231 <import>true
</import>
232 <headerPattern>/cur(rency)?/i
</headerPattern>
233 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
234 <comment>3 character string, value from config setting or input via user.
</comment>
237 <table>civicrm_currency
</table>
238 <keyColumn>name
</keyColumn>
239 <labelColumn>full_name
</labelColumn>
240 <nameColumn>name
</nameColumn>
241 <abbrColumn>symbol
</abbrColumn>
248 <name>cancel_date
</name>
249 <title>Cancelled / Refunded Date
</title>
250 <type>datetime
</type>
251 <import>true
</import>
252 <headerPattern>/cancel(.?date)?/i
</headerPattern>
253 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
254 <comment>when was gift cancelled
</comment>
257 <type>Select Date
</type>
258 <formatType>activityDateTime
</formatType>
260 <uniqueName>contribution_cancel_date
</uniqueName>
263 <name>cancel_reason
</name>
265 <title>Cancellation / Refund Reason
</title>
266 <import>true
</import>
267 <export>true
</export>
268 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
276 <name>receipt_date
</name>
277 <type>datetime
</type>
278 <import>true
</import>
279 <headerPattern>/receipt(.?date)?/i
</headerPattern>
280 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
281 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
283 <type>Select Date
</type>
284 <formatType>activityDateTime
</formatType>
289 <name>thankyou_date
</name>
290 <title>Thank-you Date
</title>
291 <type>datetime
</type>
292 <import>true
</import>
293 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
294 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
295 <comment>when (if) was donor thanked
</comment>
298 <type>Select Date
</type>
299 <formatType>activityDateTime
</formatType>
304 <uniqueName>contribution_source
</uniqueName>
305 <title>Contribution Source
</title>
308 <import>true
</import>
309 <headerPattern>/source/i
</headerPattern>
310 <comment>Origin of this Contribution.
</comment>
317 <name>index_source
</name>
318 <fieldName>source
</fieldName>
322 <name>amount_level
</name>
323 <title>Amount Label
</title>
325 <import>true
</import>
332 <name>UI_contrib_trxn_id
</name>
333 <fieldName>trxn_id
</fieldName>
334 <unique>true
</unique>
338 <name>UI_contrib_invoice_id
</name>
339 <fieldName>invoice_id
</fieldName>
340 <unique>true
</unique>
344 <name>contribution_recur_id
</name>
345 <title>Recurring Contribution ID
</title>
346 <type>int unsigned
</type>
347 <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>
348 <export>true
</export>
352 <name>contribution_recur_id
</name>
353 <table>civicrm_contribution_recur
</table>
356 <onDelete>SET NULL
</onDelete>
363 <import>true
</import>
365 <type>CheckBox
</type>
369 <name>is_pay_later
</name>
370 <title>Is Pay Later
</title>
373 <import>true
</import>
376 <type>CheckBox
</type>
380 <name>contribution_status_id
</name>
381 <title>Contribution Status ID
</title>
382 <type>int unsigned
</type>
384 <import>true
</import>
385 <export>true
</export>
386 <headerPattern>/status/i
</headerPattern>
388 <optionGroupName>contribution_status
</optionGroupName>
396 <name>index_contribution_status
</name>
397 <fieldName>contribution_status_id
</fieldName>
401 <name>received_date
</name>
402 <fieldName>receive_date
</fieldName>
406 <name>address_id
</name>
407 <uniqueName>contribution_address_id
</uniqueName>
408 <title>Contribution Address
</title>
409 <type>int unsigned
</type>
410 <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>
412 <export>true
</export>
415 <name>address_id
</name>
416 <table>civicrm_address
</table>
419 <onDelete>SET NULL
</onDelete>
422 <name>check_number
</name>
423 <title>Check Number
</title>
424 <uniqueName>contribution_check_number
</uniqueName>
425 <headerPattern>/check(.?number)?/i
</headerPattern>
432 <import>true
</import>
436 <name>check_number
</name>
437 <fieldName>check_number
</fieldName>
441 <name>campaign_id
</name>
442 <uniqueName>contribution_campaign_id
</uniqueName>
443 <type>int unsigned
</type>
444 <title>Campaign
</title>
445 <import>true
</import>
446 <comment>The campaign for which this contribution has been triggered.
</comment>
448 <table>civicrm_campaign
</table>
449 <keyColumn>id
</keyColumn>
450 <labelColumn>title
</labelColumn>
458 <name>creditnote_id
</name>
459 <title>Credit Note ID
</title>
462 <import>true
</import>
463 <headerPattern>/creditnote(.?id)?/i
</headerPattern>
464 <comment>unique credit note id, system generated or passed in
</comment>
471 <name>index_creditnote_id
</name>
472 <fieldName>creditnote_id
</fieldName>
476 <name>tax_amount
</name>
477 <title>Tax Amount
</title>
479 <import>true
</import>
480 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
481 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
482 <comment>Total tax amount of this contribution.
</comment>
489 <name>campaign_id
</name>
490 <table>civicrm_campaign
</table>
492 <onDelete>SET NULL
</onDelete>
495 <name>revenue_recognition_date
</name>
496 <type>datetime
</type>
497 <import>true
</import>
498 <headerPattern>/revenue(.?date)?/i
</headerPattern>
499 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
500 <comment>Stores the date when revenue should be recognized.
</comment>
502 <type>Select Date
</type>
503 <formatType>activityDateTime
</formatType>
508 <name>is_template
</name>
509 <title>Is a Template Contribution
</title>
512 <import>true
</import>
513 <comment>Shows this is a template for recurring contributions.
</comment>
515 <type>CheckBox
</type>