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> |
916b6181 | 33 | <type>EntityRef</type> |
614d72ec | 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> | |
7ea6f4ea | 64 | <uniqueName>grant_money_transfer_date</uniqueName> |
6a488035 TO |
65 | <title>Grant Money transfer date</title> |
66 | <type>date</type> | |
67 | <comment>Date on which grant money transfer was made.</comment> | |
68 | <import>true</import> | |
69 | <add>1.8</add> | |
614d72ec | 70 | <html> |
71 | <type>Select Date</type> | |
72 | </html> | |
6a488035 TO |
73 | </field> |
74 | <field> | |
75 | <name>grant_due_date</name> | |
76 | <type>date</type> | |
77 | <title>Grant Due Date</title> | |
78 | <comment>Date on which grant report is due.</comment> | |
79 | <add>1.8</add> | |
614d72ec | 80 | <html> |
81 | <type>Select Date</type> | |
82 | </html> | |
6a488035 TO |
83 | </field> |
84 | <field> | |
85 | <name>grant_report_received</name> | |
86 | <title>Grant report received</title> | |
87 | <type>boolean</type> | |
88 | <comment>Yes/No field stating whether grant report was received by donor.</comment> | |
89 | <import>true</import> | |
90 | <add>1.8</add> | |
614d72ec | 91 | <html> |
92 | <type>CheckBox</type> | |
93 | </html> | |
6a488035 TO |
94 | </field> |
95 | <field> | |
96 | <name>grant_type_id</name> | |
97 | <type>int unsigned</type> | |
5260bb5c | 98 | <title>Grant Type</title> |
6a488035 | 99 | <pseudoconstant> |
6a488035 TO |
100 | <optionGroupName>grant_type</optionGroupName> |
101 | </pseudoconstant> | |
614d72ec | 102 | <html> |
e0991796 | 103 | <type>Select</type> |
614d72ec | 104 | </html> |
7ea6f4ea | 105 | <export>true</export> |
6a488035 TO |
106 | <required>true</required> |
107 | <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment> | |
108 | <add>1.8</add> | |
109 | </field> | |
110 | <index> | |
111 | <name>index_grant_type_id</name> | |
112 | <fieldName>grant_type_id</fieldName> | |
113 | <add>1.8</add> | |
114 | </index> | |
de25aed1 | 115 | <field> |
6a488035 TO |
116 | <name>amount_total</name> |
117 | <title>Total Amount</title> | |
118 | <type>decimal</type> | |
119 | <required>true</required> | |
120 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
121 | <import>true</import> | |
122 | <comment>Requested grant amount, in default currency.</comment> | |
123 | <add>1.8</add> | |
614d72ec | 124 | <html> |
125 | <type>Text</type> | |
126 | </html> | |
6a488035 TO |
127 | </field> |
128 | <field> | |
129 | <name>amount_requested</name> | |
130 | <title>Amount Requested</title> | |
131 | <type>decimal</type> | |
132 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
133 | <comment>Requested grant amount, in original currency (optional).</comment> | |
134 | <add>1.8</add> | |
614d72ec | 135 | <html> |
136 | <type>Text</type> | |
137 | </html> | |
6a488035 TO |
138 | </field> |
139 | <field> | |
140 | <name>amount_granted</name> | |
141 | <title>Amount granted</title> | |
142 | <type>decimal</type> | |
143 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
144 | <import>true</import> | |
145 | <comment>Granted amount, in default currency.</comment> | |
146 | <add>1.8</add> | |
614d72ec | 147 | <html> |
148 | <type>Text</type> | |
149 | </html> | |
6a488035 TO |
150 | </field> |
151 | <field> | |
152 | <name>currency</name> | |
de25aed1 | 153 | <title>Grant Currency</title> |
6a488035 TO |
154 | <type>varchar</type> |
155 | <length>3</length> | |
156 | <required>true</required> | |
157 | <comment>3 character string, value from config setting or input via user.</comment> | |
158 | <add>3.2</add> | |
bd44e0df AS |
159 | <pseudoconstant> |
160 | <table>civicrm_currency</table> | |
161 | <keyColumn>name</keyColumn> | |
a38a89fc | 162 | <labelColumn>full_name</labelColumn> |
c3de5c5a | 163 | <nameColumn>name</nameColumn> |
bd44e0df | 164 | </pseudoconstant> |
614d72ec | 165 | <html> |
e0991796 | 166 | <type>Select</type> |
614d72ec | 167 | </html> |
6a488035 TO |
168 | </field> |
169 | <field> | |
170 | <name>currency</name> | |
171 | <type>varchar</type> | |
172 | <length>8</length> | |
173 | <default>NULL</default> | |
174 | <comment>3 character string, value from config setting or input via user.</comment> | |
de25aed1 | 175 | <add>3.2</add> |
6a488035 TO |
176 | <drop>4.3</drop> |
177 | </field> | |
de25aed1 | 178 | <field> |
6a488035 TO |
179 | <name>rationale</name> |
180 | <type>text</type> | |
181 | <title>Grant Rationale</title> | |
182 | <comment>Grant rationale.</comment> | |
7deea513 | 183 | <html> |
184 | <type>TextArea</type> | |
817807ab | 185 | <rows>4</rows> |
186 | <cols>60</cols> | |
7deea513 | 187 | </html> |
6a488035 TO |
188 | <import>true</import> |
189 | <add>1.8</add> | |
190 | </field> | |
de25aed1 | 191 | <field> |
6a488035 TO |
192 | <name>status_id</name> |
193 | <type>int unsigned</type> | |
5260bb5c | 194 | <title>Grant Status</title> |
6a488035 TO |
195 | <uniqueName>grant_status_id</uniqueName> |
196 | <required>true</required> | |
de25aed1 | 197 | <import>true</import> |
6a488035 TO |
198 | <export>false</export> |
199 | <comment>Id of Grant status.</comment> | |
fb1fd730 CW |
200 | <pseudoconstant> |
201 | <optionGroupName>grant_status</optionGroupName> | |
202 | </pseudoconstant> | |
614d72ec | 203 | <html> |
e0991796 | 204 | <type>Select</type> |
614d72ec | 205 | </html> |
6a488035 TO |
206 | <add>1.8</add> |
207 | </field> | |
de25aed1 | 208 | <index> |
6a488035 TO |
209 | <name>index_status_id</name> |
210 | <fieldName>status_id</fieldName> | |
211 | <add>1.8</add> | |
212 | </index> | |
de25aed1 | 213 | <field> |
214 | <name>financial_type_id</name> | |
6a488035 | 215 | <title>Financial Type</title> |
de25aed1 | 216 | <type>int unsigned</type> |
6a488035 | 217 | <default>NULL</default> |
6cc0b7bd EM |
218 | <pseudoconstant> |
219 | <table>civicrm_financial_type</table> | |
220 | <keyColumn>id</keyColumn> | |
221 | <labelColumn>name</labelColumn> | |
222 | </pseudoconstant> | |
6a488035 | 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> |