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> | |
6 | <comment>This table stores information about grants given to a contact.</comment> | |
7 | <add>1.8</add> | |
8 | <log>true</log> | |
9 | <field> | |
10 | <name>id</name> | |
11 | <type>int unsigned</type> | |
12 | <uniqueName>grant_id</uniqueName> | |
13 | <title>Grant ID</title> | |
14 | <required>true</required> | |
15 | <comment>Unique Grant id</comment> | |
16 | <import>true</import> | |
17 | <add>1.8</add> | |
18 | </field> | |
19 | <primaryKey> | |
20 | <name>id</name> | |
21 | <autoincrement>true</autoincrement> | |
22 | </primaryKey> | |
23 | <field> | |
24 | <name>contact_id</name> | |
25 | <type>int unsigned</type> | |
26 | <uniqueName>grant_contact_id</uniqueName> | |
27 | <title>Contact ID</title> | |
28 | <export>true</export> | |
29 | <required>true</required> | |
30 | <comment>Contact ID of contact record given grant belongs to.</comment> | |
31 | <add>1.8</add> | |
614d72ec | 32 | <html> |
33 | <type>Autocomplete-Select</type> | |
34 | </html> | |
6a488035 TO |
35 | </field> |
36 | <foreignKey> | |
37 | <name>contact_id</name> | |
38 | <table>civicrm_contact</table> | |
39 | <key>id</key> | |
40 | <add>1.8</add> | |
41 | <onDelete>CASCADE</onDelete> | |
de25aed1 | 42 | </foreignKey> |
6a488035 TO |
43 | <field> |
44 | <name>application_received_date</name> | |
45 | <title>Application received date</title> | |
46 | <type>date</type> | |
47 | <export>true</export> | |
48 | <comment>Date on which grant application was received by donor.</comment> | |
49 | <add>1.8</add> | |
50 | </field> | |
51 | <field> | |
52 | <name>decision_date</name> | |
53 | <title>Decision date</title> | |
54 | <type>date</type> | |
55 | <comment>Date on which grant decision was made.</comment> | |
56 | <import>true</import> | |
57 | <add>1.8</add> | |
614d72ec | 58 | <html> |
59 | <type>Select Date</type> | |
60 | </html> | |
6a488035 TO |
61 | </field> |
62 | <field> | |
63 | <name>money_transfer_date</name> | |
64 | <title>Grant Money transfer date</title> | |
65 | <type>date</type> | |
66 | <comment>Date on which grant money transfer was made.</comment> | |
67 | <import>true</import> | |
68 | <add>1.8</add> | |
614d72ec | 69 | <html> |
70 | <type>Select Date</type> | |
71 | </html> | |
6a488035 TO |
72 | </field> |
73 | <field> | |
74 | <name>grant_due_date</name> | |
75 | <type>date</type> | |
76 | <title>Grant Due Date</title> | |
77 | <comment>Date on which grant report is due.</comment> | |
78 | <add>1.8</add> | |
614d72ec | 79 | <html> |
80 | <type>Select Date</type> | |
81 | </html> | |
6a488035 TO |
82 | </field> |
83 | <field> | |
84 | <name>grant_report_received</name> | |
85 | <title>Grant report received</title> | |
86 | <type>boolean</type> | |
87 | <comment>Yes/No field stating whether grant report was received by donor.</comment> | |
88 | <import>true</import> | |
89 | <add>1.8</add> | |
614d72ec | 90 | <html> |
91 | <type>CheckBox</type> | |
92 | </html> | |
6a488035 TO |
93 | </field> |
94 | <field> | |
95 | <name>grant_type_id</name> | |
96 | <type>int unsigned</type> | |
5260bb5c | 97 | <title>Grant Type</title> |
6a488035 | 98 | <pseudoconstant> |
6a488035 TO |
99 | <optionGroupName>grant_type</optionGroupName> |
100 | </pseudoconstant> | |
614d72ec | 101 | <html> |
e0991796 | 102 | <type>Select</type> |
614d72ec | 103 | </html> |
6a488035 TO |
104 | <export>false</export> |
105 | <required>true</required> | |
106 | <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment> | |
107 | <add>1.8</add> | |
108 | </field> | |
109 | <index> | |
110 | <name>index_grant_type_id</name> | |
111 | <fieldName>grant_type_id</fieldName> | |
fb1fd730 CW |
112 | <pseudoconstant> |
113 | <optionGroupName>grant_type</optionGroupName> | |
114 | </pseudoconstant> | |
614d72ec | 115 | <html> |
e0991796 | 116 | <type>Select</type> |
614d72ec | 117 | </html> |
6a488035 TO |
118 | <add>1.8</add> |
119 | </index> | |
de25aed1 | 120 | <field> |
6a488035 TO |
121 | <name>amount_total</name> |
122 | <title>Total Amount</title> | |
123 | <type>decimal</type> | |
124 | <required>true</required> | |
125 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
126 | <import>true</import> | |
127 | <comment>Requested grant amount, in default currency.</comment> | |
128 | <add>1.8</add> | |
614d72ec | 129 | <html> |
130 | <type>Text</type> | |
131 | </html> | |
6a488035 TO |
132 | </field> |
133 | <field> | |
134 | <name>amount_requested</name> | |
135 | <title>Amount Requested</title> | |
136 | <type>decimal</type> | |
137 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
138 | <comment>Requested grant amount, in original currency (optional).</comment> | |
139 | <add>1.8</add> | |
614d72ec | 140 | <html> |
141 | <type>Text</type> | |
142 | </html> | |
6a488035 TO |
143 | </field> |
144 | <field> | |
145 | <name>amount_granted</name> | |
146 | <title>Amount granted</title> | |
147 | <type>decimal</type> | |
148 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
149 | <import>true</import> | |
150 | <comment>Granted amount, in default currency.</comment> | |
151 | <add>1.8</add> | |
614d72ec | 152 | <html> |
153 | <type>Text</type> | |
154 | </html> | |
6a488035 TO |
155 | </field> |
156 | <field> | |
157 | <name>currency</name> | |
de25aed1 | 158 | <title>Grant Currency</title> |
6a488035 TO |
159 | <type>varchar</type> |
160 | <length>3</length> | |
161 | <required>true</required> | |
162 | <comment>3 character string, value from config setting or input via user.</comment> | |
163 | <add>3.2</add> | |
bd44e0df AS |
164 | <pseudoconstant> |
165 | <table>civicrm_currency</table> | |
166 | <keyColumn>name</keyColumn> | |
a38a89fc CW |
167 | <labelColumn>full_name</labelColumn> |
168 | <nameColumn>numeric_code</nameColumn> | |
bd44e0df | 169 | </pseudoconstant> |
614d72ec | 170 | <html> |
e0991796 | 171 | <type>Select</type> |
614d72ec | 172 | </html> |
6a488035 TO |
173 | </field> |
174 | <field> | |
175 | <name>currency</name> | |
176 | <type>varchar</type> | |
177 | <length>8</length> | |
178 | <default>NULL</default> | |
179 | <comment>3 character string, value from config setting or input via user.</comment> | |
de25aed1 | 180 | <add>3.2</add> |
6a488035 TO |
181 | <drop>4.3</drop> |
182 | </field> | |
de25aed1 | 183 | <field> |
6a488035 TO |
184 | <name>rationale</name> |
185 | <type>text</type> | |
186 | <title>Grant Rationale</title> | |
187 | <comment>Grant rationale.</comment> | |
7deea513 | 188 | <html> |
189 | <type>TextArea</type> | |
817807ab | 190 | <rows>4</rows> |
191 | <cols>60</cols> | |
7deea513 | 192 | </html> |
6a488035 TO |
193 | <import>true</import> |
194 | <add>1.8</add> | |
195 | </field> | |
de25aed1 | 196 | <field> |
6a488035 TO |
197 | <name>status_id</name> |
198 | <type>int unsigned</type> | |
5260bb5c | 199 | <title>Grant Status</title> |
6a488035 TO |
200 | <uniqueName>grant_status_id</uniqueName> |
201 | <required>true</required> | |
de25aed1 | 202 | <import>true</import> |
6a488035 TO |
203 | <export>false</export> |
204 | <comment>Id of Grant status.</comment> | |
fb1fd730 CW |
205 | <pseudoconstant> |
206 | <optionGroupName>grant_status</optionGroupName> | |
207 | </pseudoconstant> | |
614d72ec | 208 | <html> |
e0991796 | 209 | <type>Select</type> |
614d72ec | 210 | </html> |
6a488035 TO |
211 | <add>1.8</add> |
212 | </field> | |
de25aed1 | 213 | <index> |
6a488035 TO |
214 | <name>index_status_id</name> |
215 | <fieldName>status_id</fieldName> | |
216 | <add>1.8</add> | |
217 | </index> | |
de25aed1 | 218 | <field> |
219 | <name>financial_type_id</name> | |
6a488035 | 220 | <title>Financial Type</title> |
de25aed1 | 221 | <type>int unsigned</type> |
6a488035 TO |
222 | <default>NULL</default> |
223 | <comment>FK to Financial Type.</comment> | |
de25aed1 | 224 | <add>4.3</add> |
225 | </field> | |
226 | <foreignKey> | |
227 | <name>financial_type_id</name> | |
228 | <table>civicrm_financial_type</table> | |
229 | <key>id</key> | |
6a488035 TO |
230 | <onDelete>SET NULL</onDelete> |
231 | <add>4.3</add> | |
de25aed1 | 232 | </foreignKey> |
6a488035 | 233 | </table> |