Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
6d68a4cb CW |
3 | <table> |
4 | <base>CRM/Financial</base> | |
5 | <class>FinancialTrxn</class> | |
6 | <name>civicrm_financial_trxn</name> | |
7 | <add>1.3</add> | |
6a488035 | 8 | <log>true</log> |
6d68a4cb CW |
9 | <field> |
10 | <name>id</name> | |
256aba1f | 11 | <title>Financial Transaction ID</title> |
6d68a4cb CW |
12 | <type>int unsigned</type> |
13 | <required>true</required> | |
14 | <add>1.3</add> | |
15 | </field> | |
16 | <primaryKey> | |
17 | <name>id</name> | |
18 | <autoincrement>true</autoincrement> | |
19 | </primaryKey> | |
20 | <field> | |
21 | <name>from_account_id</name> | |
22 | <type>int unsigned</type> | |
23 | <comment>FK to financial_account table.</comment> | |
24 | <add>3.2</add> | |
6a488035 | 25 | <drop>4.3</drop> |
6d68a4cb CW |
26 | </field> |
27 | <foreignKey> | |
28 | <name>from_account_id</name> | |
29 | <table>civicrm_financial_account</table> | |
30 | <key>id</key> | |
6a488035 | 31 | <add>3.2</add> |
6d68a4cb | 32 | <drop>4.3</drop> |
6a488035 | 33 | </foreignKey> |
6d68a4cb CW |
34 | <field> |
35 | <name>to_account_id</name> | |
36 | <type>int unsigned</type> | |
37 | <comment>FK to financial_account table.</comment> | |
38 | <add>3.2</add> | |
6a488035 | 39 | <drop>4.3</drop> |
6d68a4cb CW |
40 | </field> |
41 | <foreignKey> | |
42 | <name>to_account_id</name> | |
43 | <table>civicrm_financial_account</table> | |
44 | <key>id</key> | |
6a488035 | 45 | <add>3.2</add> |
6d68a4cb | 46 | <drop>4.3</drop> |
6a488035 | 47 | </foreignKey> |
6d68a4cb CW |
48 | <field> |
49 | <name>from_financial_account_id</name> | |
50 | <type>int unsigned</type> | |
256aba1f | 51 | <title>Financial Transaction From Account</title> |
6d68a4cb | 52 | <comment>FK to financial_account table.</comment> |
6a488035 | 53 | <add>4.3</add> |
7611ae71 AS |
54 | <pseudoconstant> |
55 | <table>civicrm_financial_account</table> | |
56 | <keyColumn>id</keyColumn> | |
57 | <labelColumn>name</labelColumn> | |
58 | </pseudoconstant> | |
614d72ec | 59 | <html> |
e0991796 | 60 | <type>Select</type> |
614d72ec | 61 | </html> |
6d68a4cb CW |
62 | </field> |
63 | <foreignKey> | |
64 | <name>from_financial_account_id</name> | |
65 | <table>civicrm_financial_account</table> | |
66 | <key>id</key> | |
6a488035 TO |
67 | <add>4.3</add> |
68 | </foreignKey> | |
6d68a4cb CW |
69 | <field> |
70 | <name>to_financial_account_id</name> | |
256aba1f | 71 | <title>Financial Transaction To Account</title> |
6d68a4cb CW |
72 | <type>int unsigned</type> |
73 | <comment>FK to financial_financial_account table.</comment> | |
6a488035 | 74 | <add>4.3</add> |
7611ae71 AS |
75 | <pseudoconstant> |
76 | <table>civicrm_financial_account</table> | |
77 | <keyColumn>id</keyColumn> | |
78 | <labelColumn>name</labelColumn> | |
79 | </pseudoconstant> | |
614d72ec | 80 | <html> |
e0991796 | 81 | <type>Select</type> |
614d72ec | 82 | </html> |
6d68a4cb CW |
83 | </field> |
84 | <foreignKey> | |
85 | <name>to_financial_account_id</name> | |
86 | <table>civicrm_financial_account</table> | |
87 | <key>id</key> | |
6a488035 TO |
88 | <add>4.3</add> |
89 | </foreignKey> | |
6d68a4cb CW |
90 | <field> |
91 | <name>trxn_date</name> | |
256aba1f | 92 | <title>Financial Transaction Date</title> |
6d68a4cb CW |
93 | <type>datetime</type> |
94 | <default>NULL</default> | |
95 | <comment>date transaction occurred</comment> | |
96 | <add>1.3</add> | |
97 | </field> | |
98 | <field> | |
99 | <name>trxn_type</name> | |
256aba1f | 100 | <title>Financial Transaction Type</title> |
6d68a4cb | 101 | <type>enum</type> |
6a488035 | 102 | <values>Debit,Credit</values> |
6d68a4cb CW |
103 | <required>true</required> |
104 | <add>1.3</add> | |
6a488035 | 105 | <drop>4.3</drop> |
6d68a4cb CW |
106 | </field> |
107 | <field> | |
108 | <name>total_amount</name> | |
256aba1f | 109 | <title>Financial Total Amount</title> |
6d68a4cb | 110 | <type>decimal</type> |
6a488035 TO |
111 | <required>true</required> |
112 | <comment>amount of transaction</comment> | |
6d68a4cb CW |
113 | <add>1.3</add> |
114 | </field> | |
115 | <field> | |
116 | <name>fee_amount</name> | |
256aba1f | 117 | <title>Financial Fee Amount</title> |
6d68a4cb | 118 | <type>decimal</type> |
6a488035 | 119 | <comment>actual processor fee if known - may be 0.</comment> |
6d68a4cb CW |
120 | <add>1.3</add> |
121 | </field> | |
122 | <field> | |
123 | <name>net_amount</name> | |
256aba1f | 124 | <title>Financial Net Amount</title> |
6d68a4cb | 125 | <type>decimal</type> |
6a488035 | 126 | <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.</comment> |
6d68a4cb | 127 | <add>1.3</add> |
6a488035 TO |
128 | </field> |
129 | <field> | |
130 | <name>currency</name> | |
256aba1f | 131 | <title>Financial Currency</title> |
6a488035 TO |
132 | <type>varchar</type> |
133 | <length>3</length> | |
6d68a4cb | 134 | <default>NULL</default> |
6a488035 TO |
135 | <import>true</import> |
136 | <headerPattern>/cur(rency)?/i</headerPattern> | |
137 | <dataPattern>/^[A-Z]{3}$/</dataPattern> | |
138 | <comment>3 character string, value from config setting or input via user.</comment> | |
139 | <add>1.3</add> | |
bd44e0df AS |
140 | <pseudoconstant> |
141 | <table>civicrm_currency</table> | |
142 | <keyColumn>name</keyColumn> | |
a38a89fc | 143 | <labelColumn>full_name</labelColumn> |
c3de5c5a | 144 | <nameColumn>name</nameColumn> |
bd44e0df | 145 | </pseudoconstant> |
614d72ec | 146 | <html> |
e0991796 | 147 | <type>Select</type> |
614d72ec | 148 | </html> |
6a488035 | 149 | </field> |
3987f9b4 DG |
150 | <field> |
151 | <name>is_payment</name> | |
152 | <title>Is Payment?</title> | |
153 | <type>boolean</type> | |
154 | <default>0</default> | |
155 | <import>true</import> | |
156 | <comment>Is this entry either a payment or a reversal of a payment?</comment> | |
157 | <add>4.7</add> | |
158 | </field> | |
6d68a4cb CW |
159 | <field> |
160 | <name>payment_processor</name> | |
161 | <type>varchar</type> | |
162 | <length>64</length> | |
6a488035 | 163 | <required>true</required> |
6d68a4cb CW |
164 | <comment>derived from Processor setting in civicrm.settings.php.</comment> |
165 | <add>1.3</add> | |
6a488035 | 166 | <drop>4.3</drop> |
6d68a4cb CW |
167 | </field> |
168 | <field> | |
169 | <name>trxn_id</name> | |
256aba1f | 170 | <title>Transaction ID</title> |
6d68a4cb | 171 | <type>varchar</type> |
6a488035 | 172 | <length>255</length> |
169abce4 | 173 | <comment>Transaction id supplied by external processor. This may not be unique.</comment> |
6d68a4cb CW |
174 | <add>1.3</add> |
175 | </field> | |
169abce4 | 176 | <index> |
177 | <name>UI_ftrxn_trxn_id</name> | |
178 | <fieldName>trxn_id</fieldName> | |
179 | <add>4.7</add> | |
180 | </index> | |
6d68a4cb CW |
181 | <field> |
182 | <name>trxn_result_code</name> | |
7a39e5e9 | 183 | <title>Transaction Result Code</title> |
6d68a4cb CW |
184 | <type>varchar</type> |
185 | <length>255</length> | |
186 | <comment>processor result code</comment> | |
187 | <add>1.3</add> | |
188 | </field> | |
6a488035 TO |
189 | <field> |
190 | <name>status_id</name> | |
191 | <title>Financial Transaction Status Id</title> | |
192 | <type>int unsigned</type> | |
193 | <import>true</import> | |
6d68a4cb | 194 | <export>true</export> |
566f87a4 | 195 | <pseudoconstant> |
196 | <optionGroupName>contribution_status</optionGroupName> | |
197 | </pseudoconstant> | |
198 | <comment>pseudo FK to civicrm_option_value of contribution_status_id option_group</comment> | |
6a488035 TO |
199 | <headerPattern>/status/i</headerPattern> |
200 | <add>4.3</add> | |
201 | </field> | |
6d68a4cb CW |
202 | <field> |
203 | <name>payment_processor_id</name> | |
256aba1f | 204 | <title>Payment Processor</title> |
6d68a4cb CW |
205 | <type>int unsigned</type> |
206 | <comment>Payment Processor for this financial transaction</comment> | |
207 | <add>4.3</add> | |
208 | </field> | |
209 | <foreignKey> | |
210 | <name>payment_processor_id</name> | |
211 | <table>civicrm_payment_processor</table> | |
212 | <key>id</key> | |
6a488035 | 213 | <onDelete>SET NULL</onDelete> |
6d68a4cb | 214 | <add>4.3</add> |
6a488035 TO |
215 | </foreignKey> |
216 | <field> | |
217 | <name>payment_instrument_id</name> | |
218 | <uniqueName>financial_trxn_payment_instrument_id</uniqueName> | |
536f0e02 | 219 | <title>Payment Method</title> |
6a488035 TO |
220 | <type>int unsigned</type> |
221 | <comment>FK to payment_instrument option group values</comment> | |
222 | <pseudoconstant> | |
6d68a4cb | 223 | <optionGroupName>payment_instrument</optionGroupName> |
6a488035 | 224 | </pseudoconstant> |
614d72ec | 225 | <html> |
e0991796 | 226 | <type>Select</type> |
614d72ec | 227 | </html> |
6a488035 TO |
228 | <add>4.3</add> |
229 | </field> | |
230 | <index> | |
231 | <name>UI_ftrxn_payment_instrument_id</name> | |
232 | <fieldName>payment_instrument_id</fieldName> | |
233 | <add>4.3</add> | |
234 | </index> | |
235 | <field> | |
236 | <name>check_number</name> | |
237 | <uniqueName>financial_trxn_check_number</uniqueName> | |
238 | <title>Check Number</title> | |
239 | <comment>Check number</comment> | |
240 | <type>varchar</type> | |
241 | <length>255</length> | |
614d72ec | 242 | <html> |
243 | <type>Text</type> | |
54f5e87f | 244 | <size>6</size> |
614d72ec | 245 | </html> |
6a488035 TO |
246 | <add>4.3</add> |
247 | </field> | |
248 | <index> | |
249 | <name>UI_ftrxn_check_number</name> | |
250 | <fieldName>check_number</fieldName> | |
251 | <add>4.3</add> | |
252 | </index> | |
253 | </table> |