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 <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>index_total_amount_receive_date
</name>
183 <fieldName>total_amount
</fieldName>
184 <fieldName>receive_date
</fieldName>
188 <name>fee_amount
</name>
190 <import>true
</import>
191 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
192 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
193 <comment>actual processor fee if known - may be
0.
</comment>
200 <name>net_amount
</name>
202 <import>true
</import>
203 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
204 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
205 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
213 <title>Transaction ID
</title>
216 <import>true
</import>
217 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
218 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
225 <name>invoice_id
</name>
226 <title>Invoice ID
</title>
229 <import>true
</import>
230 <headerPattern>/invoice(.?id)?/i
</headerPattern>
231 <comment>unique invoice id, system generated or passed in
</comment>
238 <name>currency
</name>
241 <default>NULL
</default>
242 <import>true
</import>
243 <headerPattern>/cur(rency)?/i
</headerPattern>
244 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
245 <comment>3 character string, value from config setting or input via user.
</comment>
248 <table>civicrm_currency
</table>
249 <keyColumn>name
</keyColumn>
250 <labelColumn>full_name
</labelColumn>
251 <nameColumn>name
</nameColumn>
258 <name>cancel_date
</name>
259 <type>datetime
</type>
260 <import>true
</import>
261 <headerPattern>/cancel(.?date)?/i
</headerPattern>
262 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
263 <comment>when was gift cancelled
</comment>
266 <type>Select Date
</type>
270 <name>cancel_reason
</name>
272 <import>true
</import>
273 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
280 <name>receipt_date
</name>
281 <type>datetime
</type>
282 <import>true
</import>
283 <headerPattern>/receipt(.?date)?/i
</headerPattern>
284 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
285 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
287 <type>Select Date
</type>
292 <name>thankyou_date
</name>
293 <title>Thank-you Date
</title>
294 <type>datetime
</type>
295 <import>true
</import>
296 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
297 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
298 <comment>when (if) was donor thanked
</comment>
301 <type>Select Date
</type>
306 <uniqueName>contribution_source
</uniqueName>
307 <title>Contribution Source
</title>
310 <import>true
</import>
311 <headerPattern>/source/i
</headerPattern>
312 <comment>Origin of this Contribution.
</comment>
319 <name>index_source
</name>
320 <fieldName>source
</fieldName>
324 <name>amount_level
</name>
325 <title>Amount Label
</title>
327 <import>true
</import>
336 <comment>Note and/or Comment.
</comment>
337 <import>true
</import>
338 <headerPattern>/Note|Comment/i
</headerPattern>
339 <dataPattern>//
</dataPattern>
344 <name>UI_contrib_trxn_id
</name>
345 <fieldName>trxn_id
</fieldName>
346 <unique>true
</unique>
350 <name>UI_contrib_invoice_id
</name>
351 <fieldName>invoice_id
</fieldName>
352 <unique>true
</unique>
356 <name>contribution_recur_id
</name>
357 <title>Recurring Contribution ID
</title>
358 <type>int unsigned
</type>
359 <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>
363 <name>contribution_recur_id
</name>
364 <table>civicrm_contribution_recur
</table>
367 <onDelete>SET NULL
</onDelete>
374 <import>true
</import>
376 <type>CheckBox
</type>
380 <name>is_pay_later
</name>
381 <title>Is Pay Later
</title>
384 <import>true
</import>
387 <type>CheckBox
</type>
391 <name>contribution_status_id
</name>
392 <title>Contribution Status ID
</title>
393 <type>int unsigned
</type>
395 <import>true
</import>
396 <export>true
</export>
397 <headerPattern>/status/i
</headerPattern>
399 <optionGroupName>contribution_status
</optionGroupName>
407 <name>index_contribution_status
</name>
408 <fieldName>contribution_status_id
</fieldName>
412 <name>received_date
</name>
413 <fieldName>receive_date
</fieldName>
417 <name>address_id
</name>
418 <title>Contribution Address
</title>
419 <type>int unsigned
</type>
420 <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>
424 <name>address_id
</name>
425 <table>civicrm_address
</table>
428 <onDelete>SET NULL
</onDelete>
431 <name>check_number
</name>
432 <title>Check Number
</title>
433 <headerPattern>/check(.?number)?/i
</headerPattern>
440 <import>true
</import>
444 <name>check_number
</name>
445 <fieldName>check_number
</fieldName>
449 <name>campaign_id
</name>
450 <uniqueName>contribution_campaign_id
</uniqueName>
451 <type>int unsigned
</type>
452 <title>Campaign
</title>
453 <import>true
</import>
454 <comment>The campaign for which this contribution has been triggered.
</comment>
456 <table>civicrm_campaign
</table>
457 <keyColumn>id
</keyColumn>
458 <labelColumn>title
</labelColumn>
466 <name>creditnote_id
</name>
467 <title>Credit Note ID
</title>
470 <import>true
</import>
471 <headerPattern>/creditnote(.?id)?/i
</headerPattern>
472 <comment>unique credit note id, system generated or passed in
</comment>
479 <name>index_creditnote_id
</name>
480 <fieldName>creditnote_id
</fieldName>
484 <name>tax_amount
</name>
485 <title>Tax Amount
</title>
487 <import>true
</import>
488 <headerPattern>/tax(.?am(ou)?nt)?/i
</headerPattern>
489 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
490 <comment>Total tax amount of this contribution.
</comment>
497 <name>campaign_id
</name>
498 <table>civicrm_campaign
</table>
500 <onDelete>SET NULL
</onDelete>