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