Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | <table> | |
3 | <base>CRM/Grant</base> | |
4 | <class>Grant</class> | |
5 | <name>civicrm_grant</name> | |
2562d09a | 6 | <description>Funds applied for and given out by this organization.</description> |
6a488035 TO |
7 | <comment>This table stores information about grants given to a contact.</comment> |
8 | <add>1.8</add> | |
9 | <log>true</log> | |
449c4e6b | 10 | <icon>fa-money</icon> |
d31fb4e3 | 11 | <component>CiviGrant</component> |
a7bd99ff | 12 | <paths> |
5c385299 | 13 | <add>civicrm/grant/add?reset=1&action=add&context=standalone</add> |
b9d6f021 | 14 | <view>civicrm/contact/view/grant?reset=1&action=view&id=[id]&cid=[contact_id]</view> |
5c385299 | 15 | <update>civicrm/contact/view/grant?reset=1&action=update&id=[id]&cid=[contact_id]</update> |
a7bd99ff CW |
16 | <delete>civicrm/contact/view/grant?reset=1&action=delete&id=[id]&cid=[contact_id]</delete> |
17 | </paths> | |
6a488035 TO |
18 | <field> |
19 | <name>id</name> | |
20 | <type>int unsigned</type> | |
21 | <uniqueName>grant_id</uniqueName> | |
22 | <title>Grant ID</title> | |
23 | <required>true</required> | |
24 | <comment>Unique Grant id</comment> | |
25 | <import>true</import> | |
0481e12c A |
26 | <html> |
27 | <type>Number</type> | |
28 | </html> | |
6a488035 TO |
29 | <add>1.8</add> |
30 | </field> | |
31 | <primaryKey> | |
32 | <name>id</name> | |
33 | <autoincrement>true</autoincrement> | |
34 | </primaryKey> | |
35 | <field> | |
36 | <name>contact_id</name> | |
37 | <type>int unsigned</type> | |
38 | <uniqueName>grant_contact_id</uniqueName> | |
39 | <title>Contact ID</title> | |
40 | <export>true</export> | |
41 | <required>true</required> | |
42 | <comment>Contact ID of contact record given grant belongs to.</comment> | |
43 | <add>1.8</add> | |
614d72ec | 44 | <html> |
57e94608 A |
45 | <type>EntityRef</type> |
46 | <label>Contact</label> | |
47 | </html> | |
6a488035 TO |
48 | </field> |
49 | <foreignKey> | |
50 | <name>contact_id</name> | |
51 | <table>civicrm_contact</table> | |
52 | <key>id</key> | |
53 | <add>1.8</add> | |
54 | <onDelete>CASCADE</onDelete> | |
de25aed1 | 55 | </foreignKey> |
6a488035 TO |
56 | <field> |
57 | <name>application_received_date</name> | |
58 | <title>Application received date</title> | |
0bcac7e7 | 59 | <uniqueName>grant_application_received_date</uniqueName> |
6a488035 TO |
60 | <type>date</type> |
61 | <export>true</export> | |
ae7f34ec | 62 | <import>true</import> |
6a488035 TO |
63 | <comment>Date on which grant application was received by donor.</comment> |
64 | <add>1.8</add> | |
ae7f34ec PN |
65 | <html> |
66 | <type>Select Date</type> | |
67 | <formatType>activityDate</formatType> | |
68 | </html> | |
6a488035 TO |
69 | </field> |
70 | <field> | |
71 | <name>decision_date</name> | |
72 | <title>Decision date</title> | |
0bcac7e7 | 73 | <uniqueName>grant_decision_date</uniqueName> |
6a488035 TO |
74 | <type>date</type> |
75 | <comment>Date on which grant decision was made.</comment> | |
76 | <import>true</import> | |
77 | <add>1.8</add> | |
614d72ec | 78 | <html> |
79 | <type>Select Date</type> | |
ae7f34ec | 80 | <formatType>activityDate</formatType> |
614d72ec | 81 | </html> |
6a488035 TO |
82 | </field> |
83 | <field> | |
84 | <name>money_transfer_date</name> | |
7ea6f4ea | 85 | <uniqueName>grant_money_transfer_date</uniqueName> |
6a488035 TO |
86 | <title>Grant Money transfer date</title> |
87 | <type>date</type> | |
88 | <comment>Date on which grant money transfer was made.</comment> | |
89 | <import>true</import> | |
90 | <add>1.8</add> | |
614d72ec | 91 | <html> |
92 | <type>Select Date</type> | |
ae7f34ec | 93 | <formatType>activityDate</formatType> |
614d72ec | 94 | </html> |
6a488035 TO |
95 | </field> |
96 | <field> | |
97 | <name>grant_due_date</name> | |
98 | <type>date</type> | |
0bcac7e7 | 99 | <title>Grant Report Due Date</title> |
6a488035 TO |
100 | <comment>Date on which grant report is due.</comment> |
101 | <add>1.8</add> | |
ae7f34ec | 102 | <import>true</import> |
614d72ec | 103 | <html> |
104 | <type>Select Date</type> | |
ae7f34ec | 105 | <formatType>activityDate</formatType> |
614d72ec | 106 | </html> |
6a488035 TO |
107 | </field> |
108 | <field> | |
109 | <name>grant_report_received</name> | |
110 | <title>Grant report received</title> | |
111 | <type>boolean</type> | |
112 | <comment>Yes/No field stating whether grant report was received by donor.</comment> | |
113 | <import>true</import> | |
114 | <add>1.8</add> | |
614d72ec | 115 | <html> |
116 | <type>CheckBox</type> | |
117 | </html> | |
6a488035 TO |
118 | </field> |
119 | <field> | |
120 | <name>grant_type_id</name> | |
121 | <type>int unsigned</type> | |
5260bb5c | 122 | <title>Grant Type</title> |
6a488035 | 123 | <pseudoconstant> |
6a488035 TO |
124 | <optionGroupName>grant_type</optionGroupName> |
125 | </pseudoconstant> | |
614d72ec | 126 | <html> |
e0991796 | 127 | <type>Select</type> |
614d72ec | 128 | </html> |
7ea6f4ea | 129 | <export>true</export> |
6a488035 TO |
130 | <required>true</required> |
131 | <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment> | |
132 | <add>1.8</add> | |
133 | </field> | |
134 | <index> | |
135 | <name>index_grant_type_id</name> | |
136 | <fieldName>grant_type_id</fieldName> | |
137 | <add>1.8</add> | |
138 | </index> | |
de25aed1 | 139 | <field> |
6a488035 TO |
140 | <name>amount_total</name> |
141 | <title>Total Amount</title> | |
142 | <type>decimal</type> | |
143 | <required>true</required> | |
144 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
145 | <import>true</import> | |
146 | <comment>Requested grant amount, in default currency.</comment> | |
147 | <add>1.8</add> | |
614d72ec | 148 | <html> |
149 | <type>Text</type> | |
150 | </html> | |
6a488035 TO |
151 | </field> |
152 | <field> | |
153 | <name>amount_requested</name> | |
154 | <title>Amount Requested</title> | |
155 | <type>decimal</type> | |
156 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
157 | <comment>Requested grant amount, in original currency (optional).</comment> | |
158 | <add>1.8</add> | |
614d72ec | 159 | <html> |
160 | <type>Text</type> | |
161 | </html> | |
6a488035 TO |
162 | </field> |
163 | <field> | |
164 | <name>amount_granted</name> | |
165 | <title>Amount granted</title> | |
166 | <type>decimal</type> | |
167 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
168 | <import>true</import> | |
169 | <comment>Granted amount, in default currency.</comment> | |
170 | <add>1.8</add> | |
614d72ec | 171 | <html> |
172 | <type>Text</type> | |
173 | </html> | |
6a488035 TO |
174 | </field> |
175 | <field> | |
176 | <name>currency</name> | |
de25aed1 | 177 | <title>Grant Currency</title> |
6a488035 TO |
178 | <type>varchar</type> |
179 | <length>3</length> | |
180 | <required>true</required> | |
181 | <comment>3 character string, value from config setting or input via user.</comment> | |
182 | <add>3.2</add> | |
a8fdb24e CW |
183 | <pseudoconstant> |
184 | <table>civicrm_currency</table> | |
185 | <keyColumn>name</keyColumn> | |
186 | <labelColumn>full_name</labelColumn> | |
187 | <nameColumn>name</nameColumn> | |
188 | <abbrColumn>symbol</abbrColumn> | |
189 | </pseudoconstant> | |
190 | <html> | |
191 | <type>Select</type> | |
192 | </html> | |
6a488035 | 193 | </field> |
de25aed1 | 194 | <field> |
6a488035 TO |
195 | <name>rationale</name> |
196 | <type>text</type> | |
197 | <title>Grant Rationale</title> | |
198 | <comment>Grant rationale.</comment> | |
7deea513 | 199 | <html> |
200 | <type>TextArea</type> | |
817807ab | 201 | <rows>4</rows> |
202 | <cols>60</cols> | |
7deea513 | 203 | </html> |
6a488035 TO |
204 | <import>true</import> |
205 | <add>1.8</add> | |
206 | </field> | |
de25aed1 | 207 | <field> |
6a488035 TO |
208 | <name>status_id</name> |
209 | <type>int unsigned</type> | |
5260bb5c | 210 | <title>Grant Status</title> |
6a488035 TO |
211 | <uniqueName>grant_status_id</uniqueName> |
212 | <required>true</required> | |
de25aed1 | 213 | <import>true</import> |
6a488035 | 214 | <export>false</export> |
047c5009 | 215 | <comment>ID of Grant status.</comment> |
fb1fd730 CW |
216 | <pseudoconstant> |
217 | <optionGroupName>grant_status</optionGroupName> | |
218 | </pseudoconstant> | |
614d72ec | 219 | <html> |
e0991796 | 220 | <type>Select</type> |
614d72ec | 221 | </html> |
6a488035 TO |
222 | <add>1.8</add> |
223 | </field> | |
de25aed1 | 224 | <index> |
6a488035 TO |
225 | <name>index_status_id</name> |
226 | <fieldName>status_id</fieldName> | |
227 | <add>1.8</add> | |
228 | </index> | |
de25aed1 | 229 | <field> |
230 | <name>financial_type_id</name> | |
57e94608 | 231 | <title>Financial Type ID</title> |
de25aed1 | 232 | <type>int unsigned</type> |
6a488035 | 233 | <default>NULL</default> |
6cc0b7bd EM |
234 | <pseudoconstant> |
235 | <table>civicrm_financial_type</table> | |
236 | <keyColumn>id</keyColumn> | |
237 | <labelColumn>name</labelColumn> | |
238 | </pseudoconstant> | |
6a488035 | 239 | <comment>FK to Financial Type.</comment> |
57e94608 A |
240 | <html> |
241 | <label>Financial Type</label> | |
242 | </html> | |
de25aed1 | 243 | <add>4.3</add> |
244 | </field> | |
245 | <foreignKey> | |
246 | <name>financial_type_id</name> | |
247 | <table>civicrm_financial_type</table> | |
248 | <key>id</key> | |
6a488035 TO |
249 | <onDelete>SET NULL</onDelete> |
250 | <add>4.3</add> | |
de25aed1 | 251 | </foreignKey> |
6a488035 | 252 | </table> |