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>Autocomplete-Select
</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
</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>contribution_payment_instrument_id
</uniqueName>
125 <title>Payment Instrument
</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 <type>datetime
</type>
144 <import>true
</import>
145 <headerPattern>/receive(.?date)?/i
</headerPattern>
146 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
147 <comment>when was gift received
</comment>
150 <type>Select Date
</type>
154 <name>non_deductible_amount
</name>
155 <title>Non-deductible Amount
</title>
158 <import>true
</import>
159 <headerPattern>/non?.?deduct/i
</headerPattern>
160 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
161 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
</comment>
168 <name>total_amount
</name>
170 <required>true
</required>
171 <import>true
</import>
172 <headerPattern>/^total|(.?^am(ou)?nt)/i
</headerPattern>
173 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
174 <comment>Total amount of this contribution. Use market value for non-monetary gifts.
</comment>
181 <name>fee_amount
</name>
183 <import>true
</import>
184 <headerPattern>/fee(.?am(ou)?nt)?/i
</headerPattern>
185 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
186 <comment>actual processor fee if known - may be
0.
</comment>
193 <name>net_amount
</name>
195 <import>true
</import>
196 <headerPattern>/net(.?am(ou)?nt)?/i
</headerPattern>
197 <dataPattern>/^\d+(\.\d{
2})?$/
</dataPattern>
198 <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
</comment>
206 <title>Transaction ID
</title>
209 <import>true
</import>
210 <headerPattern>/tr(ansactio|x)n(.?id)?/i
</headerPattern>
211 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
</comment>
218 <name>invoice_id
</name>
219 <title>Invoice ID
</title>
222 <import>true
</import>
223 <headerPattern>/invoice(.?id)?/i
</headerPattern>
224 <comment>unique invoice id, system generated or passed in
</comment>
231 <name>currency
</name>
234 <default>NULL
</default>
235 <import>true
</import>
236 <headerPattern>/cur(rency)?/i
</headerPattern>
237 <dataPattern>/^[A-Z]{
3}$/i
</dataPattern>
238 <comment>3 character string, value from config setting or input via user.
</comment>
241 <table>civicrm_currency
</table>
242 <keyColumn>name
</keyColumn>
243 <labelColumn>full_name
</labelColumn>
244 <nameColumn>numeric_code
</nameColumn>
251 <name>cancel_date
</name>
252 <type>datetime
</type>
253 <import>true
</import>
254 <headerPattern>/cancel(.?date)?/i
</headerPattern>
255 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
256 <comment>when was gift cancelled
</comment>
259 <type>Select Date
</type>
263 <name>cancel_reason
</name>
265 <import>true
</import>
266 <headerPattern>/(cancel.?)?reason/i
</headerPattern>
273 <name>receipt_date
</name>
274 <type>datetime
</type>
275 <import>true
</import>
276 <headerPattern>/receipt(.?date)?/i
</headerPattern>
277 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
278 <comment>when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
</comment>
280 <type>Select Date
</type>
285 <name>thankyou_date
</name>
286 <title>Thank-you Date
</title>
287 <type>datetime
</type>
288 <import>true
</import>
289 <headerPattern>/thank(s|(.?you))?(.?date)?/i
</headerPattern>
290 <dataPattern>/^\d{
4}-?\d{
2}-?\d{
2} ?(\d{
2}:?\d{
2}:?(\d{
2})?)?$/
</dataPattern>
291 <comment>when (if) was donor thanked
</comment>
294 <type>Select Date
</type>
299 <uniqueName>contribution_source
</uniqueName>
300 <title>Contribution Source
</title>
303 <import>true
</import>
304 <headerPattern>/source/i
</headerPattern>
305 <comment>Origin of this Contribution.
</comment>
312 <name>amount_level
</name>
313 <title>Amount Label
</title>
315 <import>true
</import>
324 <comment>Note and/or Comment.
</comment>
325 <import>true
</import>
326 <headerPattern>/Note|Comment/i
</headerPattern>
327 <dataPattern>//
</dataPattern>
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 <type>int unsigned
</type>
346 <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>
350 <name>contribution_recur_id
</name>
351 <table>civicrm_contribution_recur
</table>
354 <onDelete>SET NULL
</onDelete>
361 <import>true
</import>
363 <type>CheckBox
</type>
367 <name>is_pay_later
</name>
368 <title>Is Pay Later
</title>
371 <import>true
</import>
374 <type>CheckBox
</type>
378 <name>contribution_status_id
</name>
379 <title>Contribution Status
</title>
380 <type>int unsigned
</type>
382 <import>true
</import>
383 <export>true
</export>
384 <headerPattern>/status/i
</headerPattern>
386 <optionGroupName>contribution_status
</optionGroupName>
394 <name>index_contribution_status
</name>
395 <fieldName>contribution_status_id
</fieldName>
399 <name>received_date
</name>
400 <fieldName>receive_date
</fieldName>
404 <name>address_id
</name>
405 <type>int unsigned
</type>
406 <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>
410 <name>address_id
</name>
411 <table>civicrm_address
</table>
414 <onDelete>SET NULL
</onDelete>
417 <name>check_number
</name>
418 <title>Check Number
</title>
419 <headerPattern>/check(.?number)?/i
</headerPattern>
426 <import>true
</import>
430 <name>check_number
</name>
431 <fieldName>check_number
</fieldName>
435 <name>campaign_id
</name>
436 <uniqueName>contribution_campaign_id
</uniqueName>
437 <type>int unsigned
</type>
438 <title>Campaign
</title>
439 <import>true
</import>
440 <comment>The campaign for which this contribution has been triggered.
</comment>
442 <table>civicrm_campaign
</table>
443 <keyColumn>id
</keyColumn>
444 <labelColumn>title
</labelColumn>
452 <name>campaign_id
</name>
453 <table>civicrm_campaign
</table>
455 <onDelete>SET NULL
</onDelete>