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 ID
</title>
81 <export>false
</export>
82 <type>int unsigned
</type>
83 <comment>FK to Financial Type for (total_amount - non_deductible_amount).
</comment>
85 <table>civicrm_financial_type
</table>
86 <keyColumn>id
</keyColumn>
87 <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
</title>
126 <type>int unsigned
</type>
127 <comment>FK to Payment Instrument
</comment>
129 <optionGroupName>payment_instrument
</optionGroupName>
137 <name>UI_contrib_payment_instrument_id
</name>
138 <fieldName>payment_instrument_id
</fieldName>
142 <name>receive_date
</name>
143 <title>Date Received
</title>
144 <type>datetime
</type>
145 <import>true
</import>
146 <headerPattern>/receive(.?date)?/i
</headerPattern>
147 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
148 <comment>Date contribution was received - not necessarily the creation date of the record
</comment>
151 <type>Select Date
</type>
155 <name>non_deductible_amount
</name>
156 <title>Non-deductible Amount
</title>
159 <import>true
</import>
160 <headerPattern>/non?.?deduct/i
</headerPattern>
161 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
162 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
</comment>
169 <name>total_amount
</name>
171 <required>true
</required>
172 <import>true
</import>
173 <headerPattern>/^total|(.?^am(ou)?nt)/i
</headerPattern>
174 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
175 <comment>Total amount of this contribution. Use market value for non-monetary gifts.
</comment>
182 <name>fee_amount
</name>
184 <import>true
</import>
185 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
186 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
187 <comment>actual processor fee if known - may be
0.
</comment>
194 <name>net_amount
</name>
196 <import>true
</import>
197 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
198 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
199 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
207 <title>Transaction ID
</title>
210 <import>true
</import>
211 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
212 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
219 <name>invoice_id
</name>
220 <title>Invoice ID
</title>
223 <import>true
</import>
224 <headerPattern>/invoice(.?id)?/i
</headerPattern>
225 <comment>unique invoice id, system generated or passed in
</comment>
232 <name>currency
</name>
235 <default>NULL
</default>
236 <import>true
</import>
237 <headerPattern>/cur(rency)?/i
</headerPattern>
238 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
239 <comment>3 character string, value from config setting or input via user.
</comment>
242 <table>civicrm_currency
</table>
243 <keyColumn>name
</keyColumn>
244 <labelColumn>full_name
</labelColumn>
245 <nameColumn>numeric_code
</nameColumn>
252 <name>cancel_date
</name>
253 <type>datetime
</type>
254 <import>true
</import>
255 <headerPattern>/cancel(.?date)?/i
</headerPattern>
256 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
257 <comment>when was gift cancelled
</comment>
260 <type>Select Date
</type>
264 <name>cancel_reason
</name>
266 <import>true
</import>
267 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
274 <name>receipt_date
</name>
275 <type>datetime
</type>
276 <import>true
</import>
277 <headerPattern>/receipt(.?date)?/i
</headerPattern>
278 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
279 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
281 <type>Select Date
</type>
286 <name>thankyou_date
</name>
287 <title>Thank-you Date
</title>
288 <type>datetime
</type>
289 <import>true
</import>
290 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
291 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
292 <comment>when (if) was donor thanked
</comment>
295 <type>Select Date
</type>
300 <uniqueName>contribution_source
</uniqueName>
301 <title>Contribution Source
</title>
304 <import>true
</import>
305 <headerPattern>/source/i
</headerPattern>
306 <comment>Origin of this Contribution.
</comment>
313 <name>amount_level
</name>
314 <title>Amount Label
</title>
316 <import>true
</import>
325 <comment>Note and/or Comment.
</comment>
326 <import>true
</import>
327 <headerPattern>/Note|Comment/i
</headerPattern>
328 <dataPattern>//
</dataPattern>
333 <name>UI_contrib_trxn_id
</name>
334 <fieldName>trxn_id
</fieldName>
335 <unique>true
</unique>
339 <name>UI_contrib_invoice_id
</name>
340 <fieldName>invoice_id
</fieldName>
341 <unique>true
</unique>
345 <name>contribution_recur_id
</name>
346 <title>Recurring Contribution ID
</title>
347 <type>int unsigned
</type>
348 <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>
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 <title>Contribution Address
</title>
408 <type>int unsigned
</type>
409 <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>
413 <name>address_id
</name>
414 <table>civicrm_address
</table>
417 <onDelete>SET NULL
</onDelete>
420 <name>check_number
</name>
421 <title>Check Number
</title>
422 <headerPattern>/check(.?number)?/i
</headerPattern>
429 <import>true
</import>
433 <name>check_number
</name>
434 <fieldName>check_number
</fieldName>
438 <name>campaign_id
</name>
439 <uniqueName>contribution_campaign_id
</uniqueName>
440 <type>int unsigned
</type>
441 <title>Campaign
</title>
442 <import>true
</import>
443 <comment>The campaign for which this contribution has been triggered.
</comment>
445 <table>civicrm_campaign
</table>
446 <keyColumn>id
</keyColumn>
447 <labelColumn>title
</labelColumn>
455 <name>creditnote_id
</name>
456 <title>Credit Note ID
</title>
459 <import>true
</import>
460 <headerPattern>/creditnote(.?id)?/i
</headerPattern>
461 <comment>unique credit note id, system generated or passed in
</comment>
468 <name>creditnote_id
</name>
469 <fieldName>creditnote_id
</fieldName>
473 <name>tax_amount
</name>
474 <title>Tax Amount
</title>
476 <import>true
</import>
477 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
478 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
479 <comment>Total tax amount of this contribution.
</comment>
486 <name>campaign_id
</name>
487 <table>civicrm_campaign
</table>
489 <onDelete>SET NULL
</onDelete>