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>full_name
</labelColumn>
211 <nameColumn>numeric_code
</nameColumn>
215 <name>cancel_date
</name>
216 <type>datetime
</type>
217 <import>true
</import>
218 <headerPattern>/cancel(.?date)?/i
</headerPattern>
219 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
220 <comment>when was gift cancelled
</comment>
224 <name>cancel_reason
</name>
226 <import>true
</import>
227 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
231 <name>receipt_date
</name>
232 <type>datetime
</type>
233 <import>true
</import>
234 <headerPattern>/receipt(.?date)?/i
</headerPattern>
235 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
236 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
240 <name>thankyou_date
</name>
241 <title>Thank-you Date
</title>
242 <type>datetime
</type>
243 <import>true
</import>
244 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
245 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
246 <comment>when (if) was donor thanked
</comment>
251 <uniqueName>contribution_source
</uniqueName>
252 <title>Contribution Source
</title>
255 <import>true
</import>
256 <headerPattern>/source/i
</headerPattern>
257 <comment>Origin of this Contribution.
</comment>
261 <name>amount_level
</name>
262 <title>Amount Label
</title>
264 <import>true
</import>
270 <comment>Note and/or Comment.
</comment>
271 <htmlType>textarea
</htmlType>
274 <import>true
</import>
275 <headerPattern>/Note|Comment/i
</headerPattern>
276 <dataPattern>//
</dataPattern>
281 <name>UI_contrib_trxn_id
</name>
282 <fieldName>trxn_id
</fieldName>
283 <unique>true
</unique>
287 <name>UI_contrib_invoice_id
</name>
288 <fieldName>invoice_id
</fieldName>
289 <unique>true
</unique>
293 <name>contribution_recur_id
</name>
294 <type>int unsigned
</type>
295 <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>
299 <name>contribution_recur_id
</name>
300 <table>civicrm_contribution_recur
</table>
303 <onDelete>SET NULL
</onDelete>
306 <name>honor_contact_id
</name>
307 <title>Honor Contact
</title>
308 <type>int unsigned
</type>
309 <comment>FK to contact ID
</comment>
313 <name>honor_contact_id
</name>
314 <table>civicrm_contact
</table>
317 <onDelete>SET NULL
</onDelete>
324 <import>true
</import>
327 <name>is_pay_later
</name>
328 <title>Is Pay Later
</title>
331 <import>true
</import>
335 <name>contribution_status_id
</name>
336 <title>Contribution Status
</title>
337 <type>int unsigned
</type>
339 <import>true
</import>
340 <export>true
</export>
341 <headerPattern>/status/i
</headerPattern>
343 <optionGroupName>contribution_status
</optionGroupName>
348 <name>honor_type_id
</name>
349 <title>Honor Type
</title>
350 <type>int unsigned
</type>
351 <comment>Implicit FK to civicrm_option_value.
</comment>
353 <onDelete>SET NULL
</onDelete>
355 <optionGroupName>honor_type
</optionGroupName>
359 <name>index_contribution_status
</name>
360 <fieldName>contribution_status_id
</fieldName>
364 <name>received_date
</name>
365 <fieldName>receive_date
</fieldName>
369 <name>address_id
</name>
370 <type>int unsigned
</type>
371 <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>
375 <name>address_id
</name>
376 <table>civicrm_address
</table>
379 <onDelete>SET NULL
</onDelete>
382 <name>check_number
</name>
383 <title>Check Number
</title>
384 <headerPattern>/check(.?number)?/i
</headerPattern>
388 <import>true
</import>
392 <name>check_number
</name>
393 <fieldName>check_number
</fieldName>
397 <name>campaign_id
</name>
398 <uniqueName>contribution_campaign_id
</uniqueName>
399 <type>int unsigned
</type>
400 <title>Campaign ID
</title>
401 <import>true
</import>
402 <comment>The campaign for which this contribution has been triggered.
</comment>
406 <name>campaign_id
</name>
407 <table>civicrm_campaign
</table>
409 <onDelete>SET NULL
</onDelete>