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