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> | |
11 | <type>int unsigned</type> | |
12 | <required>true</required> | |
13 | <add>1.3</add> | |
14 | </field> | |
15 | <primaryKey> | |
16 | <name>id</name> | |
17 | <autoincrement>true</autoincrement> | |
18 | </primaryKey> | |
19 | <field> | |
20 | <name>from_account_id</name> | |
21 | <type>int unsigned</type> | |
22 | <comment>FK to financial_account table.</comment> | |
23 | <add>3.2</add> | |
6a488035 | 24 | <drop>4.3</drop> |
6d68a4cb CW |
25 | </field> |
26 | <foreignKey> | |
27 | <name>from_account_id</name> | |
28 | <table>civicrm_financial_account</table> | |
29 | <key>id</key> | |
6a488035 | 30 | <add>3.2</add> |
6d68a4cb | 31 | <drop>4.3</drop> |
6a488035 | 32 | </foreignKey> |
6d68a4cb CW |
33 | <field> |
34 | <name>to_account_id</name> | |
35 | <type>int unsigned</type> | |
36 | <comment>FK to financial_account table.</comment> | |
37 | <add>3.2</add> | |
6a488035 | 38 | <drop>4.3</drop> |
6d68a4cb CW |
39 | </field> |
40 | <foreignKey> | |
41 | <name>to_account_id</name> | |
42 | <table>civicrm_financial_account</table> | |
43 | <key>id</key> | |
6a488035 | 44 | <add>3.2</add> |
6d68a4cb | 45 | <drop>4.3</drop> |
6a488035 | 46 | </foreignKey> |
6d68a4cb CW |
47 | <field> |
48 | <name>from_financial_account_id</name> | |
49 | <type>int unsigned</type> | |
50 | <comment>FK to financial_account table.</comment> | |
6a488035 | 51 | <add>4.3</add> |
7611ae71 AS |
52 | <pseudoconstant> |
53 | <table>civicrm_financial_account</table> | |
54 | <keyColumn>id</keyColumn> | |
55 | <labelColumn>name</labelColumn> | |
56 | </pseudoconstant> | |
614d72ec | 57 | <html> |
58 | <type>Select></type> | |
59 | </html> | |
6d68a4cb CW |
60 | </field> |
61 | <foreignKey> | |
62 | <name>from_financial_account_id</name> | |
63 | <table>civicrm_financial_account</table> | |
64 | <key>id</key> | |
6a488035 TO |
65 | <add>4.3</add> |
66 | </foreignKey> | |
6d68a4cb CW |
67 | <field> |
68 | <name>to_financial_account_id</name> | |
69 | <type>int unsigned</type> | |
70 | <comment>FK to financial_financial_account table.</comment> | |
6a488035 | 71 | <add>4.3</add> |
7611ae71 AS |
72 | <pseudoconstant> |
73 | <table>civicrm_financial_account</table> | |
74 | <keyColumn>id</keyColumn> | |
75 | <labelColumn>name</labelColumn> | |
76 | </pseudoconstant> | |
614d72ec | 77 | <html> |
78 | <type>Select></type> | |
79 | </html> | |
6d68a4cb CW |
80 | </field> |
81 | <foreignKey> | |
82 | <name>to_financial_account_id</name> | |
83 | <table>civicrm_financial_account</table> | |
84 | <key>id</key> | |
6a488035 TO |
85 | <add>4.3</add> |
86 | </foreignKey> | |
6d68a4cb CW |
87 | <field> |
88 | <name>trxn_date</name> | |
89 | <type>datetime</type> | |
90 | <default>NULL</default> | |
91 | <comment>date transaction occurred</comment> | |
92 | <add>1.3</add> | |
93 | </field> | |
94 | <field> | |
95 | <name>trxn_type</name> | |
96 | <type>enum</type> | |
6a488035 | 97 | <values>Debit,Credit</values> |
6d68a4cb CW |
98 | <required>true</required> |
99 | <add>1.3</add> | |
6a488035 | 100 | <drop>4.3</drop> |
6d68a4cb CW |
101 | </field> |
102 | <field> | |
103 | <name>total_amount</name> | |
104 | <type>decimal</type> | |
6a488035 TO |
105 | <required>true</required> |
106 | <comment>amount of transaction</comment> | |
6d68a4cb CW |
107 | <add>1.3</add> |
108 | </field> | |
109 | <field> | |
110 | <name>fee_amount</name> | |
111 | <type>decimal</type> | |
6a488035 | 112 | <comment>actual processor fee if known - may be 0.</comment> |
6d68a4cb CW |
113 | <add>1.3</add> |
114 | </field> | |
115 | <field> | |
116 | <name>net_amount</name> | |
117 | <type>decimal</type> | |
6a488035 | 118 | <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 | 119 | <add>1.3</add> |
6a488035 TO |
120 | </field> |
121 | <field> | |
122 | <name>currency</name> | |
123 | <type>varchar</type> | |
124 | <length>3</length> | |
6d68a4cb | 125 | <default>NULL</default> |
6a488035 TO |
126 | <import>true</import> |
127 | <headerPattern>/cur(rency)?/i</headerPattern> | |
128 | <dataPattern>/^[A-Z]{3}$/</dataPattern> | |
129 | <comment>3 character string, value from config setting or input via user.</comment> | |
130 | <add>1.3</add> | |
bd44e0df AS |
131 | <pseudoconstant> |
132 | <table>civicrm_currency</table> | |
133 | <keyColumn>name</keyColumn> | |
a38a89fc CW |
134 | <labelColumn>full_name</labelColumn> |
135 | <nameColumn>numeric_code</nameColumn> | |
bd44e0df | 136 | </pseudoconstant> |
614d72ec | 137 | <html> |
138 | <type>Select></type> | |
139 | </html> | |
6a488035 | 140 | </field> |
6d68a4cb CW |
141 | <field> |
142 | <name>payment_processor</name> | |
143 | <type>varchar</type> | |
144 | <length>64</length> | |
6a488035 | 145 | <required>true</required> |
6d68a4cb CW |
146 | <comment>derived from Processor setting in civicrm.settings.php.</comment> |
147 | <add>1.3</add> | |
6a488035 | 148 | <drop>4.3</drop> |
6d68a4cb CW |
149 | </field> |
150 | <field> | |
151 | <name>trxn_id</name> | |
152 | <type>varchar</type> | |
6a488035 | 153 | <length>255</length> |
6d68a4cb CW |
154 | <comment>user-specified unique processor transaction id, bank id + trans id,... depending on payment_method</comment> |
155 | <add>1.3</add> | |
156 | </field> | |
157 | <field> | |
158 | <name>trxn_result_code</name> | |
159 | <type>varchar</type> | |
160 | <length>255</length> | |
161 | <comment>processor result code</comment> | |
162 | <add>1.3</add> | |
163 | </field> | |
6a488035 TO |
164 | <field> |
165 | <name>status_id</name> | |
166 | <title>Financial Transaction Status Id</title> | |
167 | <type>int unsigned</type> | |
168 | <import>true</import> | |
6d68a4cb CW |
169 | <export>true</export> |
170 | <comment>pseudo FK to civicrm_option_value of financial_item status option_group</comment> | |
6a488035 TO |
171 | <headerPattern>/status/i</headerPattern> |
172 | <add>4.3</add> | |
173 | </field> | |
6d68a4cb CW |
174 | <field> |
175 | <name>payment_processor_id</name> | |
176 | <type>int unsigned</type> | |
177 | <comment>Payment Processor for this financial transaction</comment> | |
178 | <add>4.3</add> | |
179 | </field> | |
180 | <foreignKey> | |
181 | <name>payment_processor_id</name> | |
182 | <table>civicrm_payment_processor</table> | |
183 | <key>id</key> | |
6a488035 | 184 | <onDelete>SET NULL</onDelete> |
6d68a4cb | 185 | <add>4.3</add> |
6a488035 TO |
186 | </foreignKey> |
187 | <field> | |
188 | <name>payment_instrument_id</name> | |
189 | <uniqueName>financial_trxn_payment_instrument_id</uniqueName> | |
190 | <title>Payment Instrument</title> | |
191 | <type>int unsigned</type> | |
192 | <comment>FK to payment_instrument option group values</comment> | |
193 | <pseudoconstant> | |
6d68a4cb | 194 | <optionGroupName>payment_instrument</optionGroupName> |
6a488035 | 195 | </pseudoconstant> |
614d72ec | 196 | <html> |
197 | <type>Select></type> | |
198 | </html> | |
6a488035 TO |
199 | <add>4.3</add> |
200 | </field> | |
201 | <index> | |
202 | <name>UI_ftrxn_payment_instrument_id</name> | |
203 | <fieldName>payment_instrument_id</fieldName> | |
204 | <add>4.3</add> | |
205 | </index> | |
206 | <field> | |
207 | <name>check_number</name> | |
208 | <uniqueName>financial_trxn_check_number</uniqueName> | |
209 | <title>Check Number</title> | |
210 | <comment>Check number</comment> | |
211 | <type>varchar</type> | |
212 | <length>255</length> | |
614d72ec | 213 | <html> |
214 | <type>Text</type> | |
215 | <size>SIX</size> | |
216 | </html> | |
6a488035 TO |
217 | <add>4.3</add> |
218 | </field> | |
219 | <index> | |
220 | <name>UI_ftrxn_check_number</name> | |
221 | <fieldName>check_number</fieldName> | |
222 | <add>4.3</add> | |
223 | </index> | |
224 | </table> | |
225 |