Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | <table> | |
3 | <base>CRM/Contribute</base> | |
4 | <class>ContributionRecur</class> | |
5 | <name>civicrm_contribution_recur</name> | |
6 | <add>1.6</add> | |
7 | <log>true</log> | |
7b66c3b5 | 8 | <title>Recurring Contribution</title> |
6a488035 TO |
9 | <field> |
10 | <name>id</name> | |
23faf53d | 11 | <uniqueName>contribution_recur_id</uniqueName> |
797b807e | 12 | <title>Recurring Contribution ID</title> |
6a488035 TO |
13 | <type>int unsigned</type> |
14 | <required>true</required> | |
15 | <comment>Contribution Recur ID</comment> | |
16 | <add>1.6</add> | |
17 | </field> | |
18 | <primaryKey> | |
19 | <name>id</name> | |
20 | <autoincrement>true</autoincrement> | |
21 | </primaryKey> | |
22 | <field> | |
23 | <name>contact_id</name> | |
c6821d8d | 24 | <title>Contact</title> |
6a488035 TO |
25 | <type>int unsigned</type> |
26 | <required>true</required> | |
c6821d8d | 27 | <comment>Foreign key to civicrm_contact.id.</comment> |
6a488035 | 28 | <add>1.6</add> |
c6821d8d MWMC |
29 | <html> |
30 | <type>EntityRef</type> | |
31 | </html> | |
6a488035 TO |
32 | </field> |
33 | <foreignKey> | |
34 | <name>contact_id</name> | |
35 | <table>civicrm_contact</table> | |
36 | <key>id</key> | |
37 | <add>1.6</add> | |
38 | <onDelete>CASCADE</onDelete> | |
39 | </foreignKey> | |
40 | <field> | |
41 | <name>amount</name> | |
797b807e | 42 | <title>Amount</title> |
6a488035 TO |
43 | <type>decimal</type> |
44 | <required>true</required> | |
a5ba7c40 | 45 | <comment>Amount to be collected (including any sales tax) by payment processor each recurrence.</comment> |
6a488035 | 46 | <add>1.6</add> |
0c6c47a5 | 47 | <html> |
48 | <type>Text</type> | |
49 | </html> | |
6a488035 TO |
50 | </field> |
51 | <field> | |
52 | <name>currency</name> | |
797b807e | 53 | <title>Currency</title> |
6a488035 TO |
54 | <type>varchar</type> |
55 | <length>3</length> | |
56 | <default>NULL</default> | |
57 | <comment>3 character string, value from config setting or input via user.</comment> | |
58 | <add>3.2</add> | |
bd44e0df AS |
59 | <pseudoconstant> |
60 | <table>civicrm_currency</table> | |
61 | <keyColumn>name</keyColumn> | |
a38a89fc | 62 | <labelColumn>full_name</labelColumn> |
c3de5c5a | 63 | <nameColumn>name</nameColumn> |
a8fdb24e | 64 | <abbrColumn>symbol</abbrColumn> |
bd44e0df | 65 | </pseudoconstant> |
614d72ec | 66 | <html> |
e0991796 | 67 | <type>Select</type> |
614d72ec | 68 | </html> |
6a488035 TO |
69 | </field> |
70 | <field> | |
71 | <name>frequency_unit</name> | |
797b807e | 72 | <title>Frequency Unit</title> |
dc73c80d | 73 | <type>varchar</type> |
74 | <length>8</length> | |
6a488035 TO |
75 | <default>'month'</default> |
76 | <comment>Time units for recurrence of payment.</comment> | |
f80ce889 | 77 | <pseudoconstant> |
78 | <optionGroupName>recur_frequency_units</optionGroupName> | |
79 | <keyColumn>name</keyColumn> | |
80 | </pseudoconstant> | |
6a488035 | 81 | <add>1.6</add> |
614d72ec | 82 | <html> |
83 | <type>Select</type> | |
84 | </html> | |
6a488035 TO |
85 | </field> |
86 | <field> | |
87 | <name>frequency_interval</name> | |
797b807e | 88 | <title>Interval (number of units)</title> |
6a488035 TO |
89 | <type>int unsigned</type> |
90 | <required>true</required> | |
91 | <comment>Number of time units for recurrence of payment.</comment> | |
92 | <add>1.6</add> | |
0c6c47a5 | 93 | <html> |
94 | <type>Text</type> | |
95 | </html> | |
6a488035 TO |
96 | </field> |
97 | <field> | |
98 | <name>installments</name> | |
797b807e | 99 | <title>Number of Installments</title> |
6a488035 TO |
100 | <type>int unsigned</type> |
101 | <comment>Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.</comment> | |
102 | <add>1.6</add> | |
0c6c47a5 | 103 | <html> |
104 | <type>Text</type> | |
105 | </html> | |
6a488035 TO |
106 | </field> |
107 | <field> | |
108 | <name>start_date</name> | |
c6821d8d | 109 | <title>Start Date</title> |
6a488035 TO |
110 | <type>datetime</type> |
111 | <required>true</required> | |
112 | <comment>The date the first scheduled recurring contribution occurs.</comment> | |
113 | <add>1.6</add> | |
0c6c47a5 | 114 | <html> |
115 | <type>Select Date</type> | |
c6821d8d | 116 | <formatType>activityDateTime</formatType> |
0c6c47a5 | 117 | </html> |
74db51d3 | 118 | <uniqueName>contribution_recur_start_date</uniqueName> |
119 | <uniqueTitle>Recurring Contribution Start Date</uniqueTitle> | |
6a488035 TO |
120 | </field> |
121 | <field> | |
122 | <name>create_date</name> | |
c6821d8d | 123 | <title>Created Date</title> |
6a488035 TO |
124 | <type>datetime</type> |
125 | <required>true</required> | |
126 | <comment>When this recurring contribution record was created.</comment> | |
127 | <add>1.6</add> | |
0c6c47a5 | 128 | <html> |
129 | <type>Select Date</type> | |
c6821d8d | 130 | <formatType>activityDateTime</formatType> |
0c6c47a5 | 131 | </html> |
74db51d3 | 132 | <uniqueName>contribution_recur_create_date</uniqueName> |
133 | <uniqueTitle>Recurring Contribution Create Date</uniqueTitle> | |
6a488035 TO |
134 | </field> |
135 | <field> | |
136 | <name>modified_date</name> | |
c6821d8d | 137 | <title>Modified Date</title> |
6a488035 TO |
138 | <type>datetime</type> |
139 | <comment>Last updated date for this record. mostly the last time a payment was received</comment> | |
140 | <add>1.6</add> | |
0c6c47a5 | 141 | <html> |
142 | <type>Select Date</type> | |
c6821d8d | 143 | <formatType>activityDateTime</formatType> |
0c6c47a5 | 144 | </html> |
74db51d3 | 145 | <uniqueName>contribution_recur_modified_date</uniqueName> |
146 | <uniqueTitle>Recurring Contribution Modified Date</uniqueTitle> | |
6a488035 TO |
147 | </field> |
148 | <field> | |
149 | <name>cancel_date</name> | |
c6821d8d | 150 | <title>Cancel Date</title> |
6a488035 TO |
151 | <type>datetime</type> |
152 | <comment>Date this recurring contribution was cancelled by contributor- if we can get access to it</comment> | |
153 | <add>1.6</add> | |
0c6c47a5 | 154 | <html> |
155 | <type>Select Date</type> | |
9139737b | 156 | <formatType>activityDate</formatType> |
0c6c47a5 | 157 | </html> |
74db51d3 | 158 | <uniqueName>contribution_recur_cancel_date</uniqueName> |
159 | <uniqueTitle>Recurring Contribution Cancel Date</uniqueTitle> | |
6a488035 | 160 | </field> |
ac7a239e | 161 | <field> |
162 | <name>cancel_reason</name> | |
163 | <type>text</type> | |
164 | <title>Cancellation Reason</title> | |
165 | <uniqueName>contribution_recur_cancel_reason</uniqueName> | |
74db51d3 | 166 | <uniqueTitle>Recurring Contribution Cancel Reason</uniqueTitle> |
ac7a239e | 167 | <comment>Free text field for a reason for cancelling</comment> |
168 | <html> | |
169 | <type>Text</type> | |
170 | <size>40</size> | |
171 | </html> | |
172 | <add>5.13</add> | |
173 | </field> | |
6a488035 TO |
174 | <field> |
175 | <name>end_date</name> | |
797b807e | 176 | <title>Recurring Contribution End Date</title> |
6a488035 TO |
177 | <type>datetime</type> |
178 | <comment>Date this recurring contribution finished successfully</comment> | |
179 | <add>1.6</add> | |
0c6c47a5 | 180 | <html> |
181 | <type>Select Date</type> | |
9139737b | 182 | <formatType>activityDate</formatType> |
0c6c47a5 | 183 | </html> |
74db51d3 | 184 | <uniqueName>contribution_recur_end_date</uniqueName> |
185 | <uniqueTitle>Recurring Contribution End Date</uniqueTitle> | |
6a488035 | 186 | </field> |
6d68a4cb | 187 | <field> |
6a488035 | 188 | <name>processor_id</name> |
23faf53d | 189 | <uniqueName>contribution_recur_processor_id</uniqueName> |
799e1e59 | 190 | <title>Processor ID</title> |
6d68a4cb | 191 | <type>varchar</type> |
6a488035 | 192 | <length>255</length> |
6d68a4cb CW |
193 | <comment>Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??</comment> |
194 | <add>1.6</add> | |
c6821d8d MWMC |
195 | <html> |
196 | <type>Text</type> | |
197 | </html> | |
6d68a4cb | 198 | </field> |
011293bb RT |
199 | <field> |
200 | <name>payment_token_id</name> | |
201 | <title>Payment Token ID</title> | |
202 | <type>int unsigned</type> | |
203 | <comment>Optionally used to store a link to a payment token used for this recurring contribution.</comment> | |
204 | <add>4.6</add> | |
205 | </field> | |
206 | <foreignKey> | |
207 | <name>payment_token_id</name> | |
208 | <table>civicrm_payment_token</table> | |
209 | <key>id</key> | |
210 | <add>4.6</add> | |
211 | <onDelete>SET NULL</onDelete> | |
212 | </foreignKey> | |
6d68a4cb CW |
213 | <field> |
214 | <name>trxn_id</name> | |
23faf53d | 215 | <uniqueName>contribution_recur_trxn_id</uniqueName> |
6a488035 | 216 | <title>Transaction ID</title> |
6d68a4cb CW |
217 | <type>varchar</type> |
218 | <length>255</length> | |
6a488035 | 219 | <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method</comment> |
6d68a4cb | 220 | <add>1.6</add> |
c6821d8d MWMC |
221 | <html> |
222 | <type>Text</type> | |
223 | </html> | |
6d68a4cb CW |
224 | </field> |
225 | <field> | |
226 | <name>invoice_id</name> | |
6a488035 | 227 | <title>Invoice ID</title> |
6d68a4cb CW |
228 | <type>varchar</type> |
229 | <length>255</length> | |
6a488035 | 230 | <comment>unique invoice id, system generated or passed in</comment> |
6d68a4cb | 231 | <add>1.6</add> |
c6821d8d MWMC |
232 | <html> |
233 | <type>Text</type> | |
234 | </html> | |
6d68a4cb | 235 | </field> |
6a488035 TO |
236 | <index> |
237 | <name>UI_contrib_trxn_id</name> | |
238 | <fieldName>trxn_id</fieldName> | |
239 | <unique>true</unique> | |
240 | <add>2.1</add> | |
241 | </index> | |
242 | <index> | |
243 | <name>UI_contrib_invoice_id</name> | |
244 | <fieldName>invoice_id</fieldName> | |
245 | <unique>true</unique> | |
246 | <add>2.1</add> | |
247 | </index> | |
248 | <field> | |
249 | <name>contribution_status_id</name> | |
23faf53d | 250 | <uniqueName>contribution_recur_contribution_status_id</uniqueName> |
c6821d8d | 251 | <title>Status</title> |
6a488035 TO |
252 | <type>int unsigned</type> |
253 | <default>1</default> | |
254 | <import>true</import> | |
255 | <add>1.6</add> | |
f389e500 | 256 | <pseudoconstant> |
0dc36ab0 | 257 | <optionGroupName>contribution_recur_status</optionGroupName> |
f389e500 | 258 | </pseudoconstant> |
c6821d8d MWMC |
259 | <html> |
260 | <type>Select</type> | |
261 | </html> | |
6a488035 TO |
262 | </field> |
263 | <index> | |
264 | <name>index_contribution_status</name> | |
265 | <fieldName>contribution_status_id</fieldName> | |
266 | <add>1.6</add> | |
267 | </index> | |
6d68a4cb CW |
268 | <field> |
269 | <name>is_test</name> | |
6a488035 TO |
270 | <title>Test</title> |
271 | <type>boolean</type> | |
272 | <default>0</default> | |
273 | <import>true</import> | |
e15be85b | 274 | <html> |
275 | <type>CheckBox</type> | |
276 | </html> | |
6a488035 TO |
277 | </field> |
278 | <field> | |
279 | <name>cycle_day</name> | |
c6821d8d | 280 | <title>Cycle Day</title> |
6a488035 TO |
281 | <type>int unsigned</type> |
282 | <default>1</default> | |
283 | <required>true</required> | |
284 | <comment>Day in the period when the payment should be charged e.g. 1st of month, 15th etc.</comment> | |
285 | <add>1.6</add> | |
e15be85b | 286 | <html> |
287 | <type>Text</type> | |
288 | </html> | |
797b807e | 289 | </field> |
290 | <field> | |
291 | <name>next_sched_contribution_date</name> | |
292 | <title>Next Scheduled Contribution Date</title> | |
293 | <type>datetime</type> | |
294 | <comment>Next scheduled date</comment> | |
295 | <add>4.4</add> | |
0c6c47a5 | 296 | <html> |
297 | <type>Select Date</type> | |
9139737b | 298 | <formatType>activityDate</formatType> |
0c6c47a5 | 299 | </html> |
74db51d3 | 300 | <uniqueName>contribution_recur_next_sched_contribution_date</uniqueName> |
301 | <uniqueTitle>Next Scheduled Recurring Contribution</uniqueTitle> | |
6a488035 TO |
302 | </field> |
303 | <field> | |
304 | <name>failure_count</name> | |
797b807e | 305 | <title>Number of Failures</title> |
6a488035 TO |
306 | <type>int unsigned</type> |
307 | <default>0</default> | |
308 | <comment>Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.</comment> | |
309 | <add>1.6</add> | |
e15be85b | 310 | <html> |
311 | <type>Text</type> | |
312 | </html> | |
6a488035 TO |
313 | </field> |
314 | <field> | |
315 | <name>failure_retry_date</name> | |
316 | <type>datetime</type> | |
797b807e | 317 | <title>Retry Failed Attempt Date</title> |
318 | <comment>Date to retry failed attempt</comment> | |
6a488035 | 319 | <add>1.6</add> |
0c6c47a5 | 320 | <html> |
321 | <type>Select Date</type> | |
9139737b | 322 | <formatType>activityDate</formatType> |
0c6c47a5 | 323 | </html> |
74db51d3 | 324 | <uniqueName>contribution_recur_failure_retry_date</uniqueName> |
325 | <uniqueTitle>Failed Recurring Contribution Retry Date</uniqueTitle> | |
6a488035 | 326 | </field> |
6d68a4cb | 327 | <field> |
6a488035 | 328 | <name>auto_renew</name> |
797b807e | 329 | <title>Auto Renew</title> |
6d68a4cb CW |
330 | <type>boolean</type> |
331 | <required>true</required> | |
6a488035 | 332 | <default>0</default> |
6d68a4cb CW |
333 | <comment>Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.</comment> |
334 | <add>1.6</add> | |
e15be85b | 335 | <html> |
336 | <type>CheckBox</type> | |
337 | </html> | |
6a488035 TO |
338 | </field> |
339 | <field> | |
340 | <name>payment_processor_id</name> | |
797b807e | 341 | <title>Payment Processor</title> |
23faf53d | 342 | <uniqueName>contribution_recur_payment_processor_id</uniqueName> |
6a488035 TO |
343 | <type>int unsigned</type> |
344 | <comment>Foreign key to civicrm_payment_processor.id</comment> | |
345 | <add>3.3</add> | |
5d24a084 MWMC |
346 | <pseudoconstant> |
347 | <table>civicrm_payment_processor</table> | |
348 | <keyColumn>id</keyColumn> | |
349 | <labelColumn>name</labelColumn> | |
350 | </pseudoconstant> | |
c6821d8d MWMC |
351 | <html> |
352 | <type>Select</type> | |
353 | </html> | |
6a488035 | 354 | </field> |
6d68a4cb CW |
355 | <foreignKey> |
356 | <name>payment_processor_id</name> | |
357 | <table>civicrm_payment_processor</table> | |
358 | <key>id</key> | |
359 | <add>3.3</add> | |
6a488035 TO |
360 | <onDelete>SET NULL</onDelete> |
361 | </foreignKey> | |
362 | <field> | |
6a488035 TO |
363 | <name>financial_type_id</name> |
364 | <title>Financial Type</title> | |
365 | <export>false</export> | |
366 | <type>int unsigned</type> | |
367 | <comment>FK to Financial Type</comment> | |
368 | <add>4.3</add> | |
f389e500 E |
369 | <pseudoconstant> |
370 | <table>civicrm_financial_type</table> | |
371 | <keyColumn>id</keyColumn> | |
372 | <labelColumn>name</labelColumn> | |
373 | </pseudoconstant> | |
c6821d8d MWMC |
374 | <html> |
375 | <type>Select</type> | |
376 | </html> | |
6a488035 TO |
377 | </field> |
378 | <foreignKey> | |
379 | <name>financial_type_id</name> | |
380 | <table>civicrm_financial_type</table> | |
381 | <key>id</key> | |
382 | <add>4.3</add> | |
383 | <onDelete>SET NULL</onDelete> | |
384 | </foreignKey> | |
385 | <field> | |
386 | <name>payment_instrument_id</name> | |
536f0e02 | 387 | <title>Payment Method</title> |
6a488035 TO |
388 | <type>int unsigned</type> |
389 | <comment>FK to Payment Instrument</comment> | |
6d68a4cb CW |
390 | <pseudoconstant> |
391 | <optionGroupName>payment_instrument</optionGroupName> | |
392 | </pseudoconstant> | |
614d72ec | 393 | <html> |
e0991796 | 394 | <type>Select</type> |
614d72ec | 395 | </html> |
6a488035 TO |
396 | <add>4.1</add> |
397 | </field> | |
398 | <index> | |
5beb1de0 | 399 | <name>UI_contribution_recur_payment_instrument_id</name> |
6a488035 TO |
400 | <fieldName>payment_instrument_id</fieldName> |
401 | <add>4.1</add> | |
402 | </index> | |
403 | <field> | |
404 | <name>campaign_id</name> | |
405 | <uniqueName>contribution_campaign_id</uniqueName> | |
406 | <type>int unsigned</type> | |
e1ab2e91 | 407 | <title>Campaign</title> |
6a488035 TO |
408 | <import>true</import> |
409 | <comment>The campaign for which this contribution has been triggered.</comment> | |
3e3eacd0 CW |
410 | <pseudoconstant> |
411 | <table>civicrm_campaign</table> | |
412 | <keyColumn>id</keyColumn> | |
413 | <labelColumn>title</labelColumn> | |
3e3eacd0 | 414 | </pseudoconstant> |
6a488035 | 415 | <add>4.1</add> |
c6821d8d MWMC |
416 | <html> |
417 | <type>Select</type> | |
418 | </html> | |
6a488035 TO |
419 | </field> |
420 | <foreignKey> | |
421 | <name>campaign_id</name> | |
422 | <table>civicrm_campaign</table> | |
423 | <key>id</key> | |
424 | <onDelete>SET NULL</onDelete> | |
425 | </foreignKey> | |
6d68a4cb CW |
426 | <field> |
427 | <name>is_email_receipt</name> | |
797b807e | 428 | <title>Send email Receipt?</title> |
6d68a4cb CW |
429 | <type>boolean</type> |
430 | <comment>if true, receipt is automatically emailed to contact on each successful payment</comment> | |
6a488035 | 431 | <default>1</default> |
6d68a4cb | 432 | <add>4.1</add> |
e15be85b | 433 | <html> |
434 | <type>CheckBox</type> | |
435 | </html> | |
6d68a4cb | 436 | </field> |
6a488035 | 437 | </table> |